sc38asm Assembler question

Discussion forum for JP1 software tools currently in use, or being developed, such as IR, KM, RemoteMaster, and other misc apps/tools.

Moderator: Moderators

Post Reply
Haggis
Posts: 27
Joined: Sun Sep 14, 2003 8:10 pm
Location: Brisbane

sc38asm Assembler question

Post by Haggis »

I am new to using the sc38asm assembler (downloaded from the files area)and would like to know why the following type of instructions give me errors:

BITS R73.5
BTJRF label_1,R73.5
BTJRT label_2,R73.7

Thanks in advance.
johnsfine
Site Admin
Posts: 4766
Joined: Sun Aug 10, 2003 5:00 pm
Location: Bedford, MA
Contact:

Post by johnsfine »

The machine language (that the assembler code must get translated into) has two different ways to encode register numbers. One of those ways uses 8 bits and can refer to any register. The other uses only 4 bits and can refer only to a register that is part of one of two special groups of eight.

While the special groups can be changed, it is rare to do so. If you don't change them then they are RC0 - RC7 and RC8-RCF.

Instructions (such as the examples you posted) that use 4 bit register numbers are limited to the registers that can be referenced by 4 bit register numbers.
Post Reply