Page 1 of 2

Problem with TASM 3.2

Posted: Fri Sep 27, 2019 12:38 am
by Bean
I'm using TASM version 3.2 and it won't let me use an offset greater than $7F.

For example I want to use
BIT 7,(IY+$FF)

Is there any updates to TASM that will allow this ?
Or is there a different assembler that will support it ?

Bean

Re: Problem with TASM 3.2

Posted: Fri Sep 27, 2019 1:31 am
by XavSnap
.db $FD,$CB,$FF,$7E

http://clrhome.org/table/

But, the mnemonic 's wrong!
BIT 7,(IY+$FF)
In TASM, you can't assigne an Hexadécimal value in a relative jump !
BIT 7,(IY+255)
Will work…

:mrgreen:

Re: Problem with TASM 3.2

Posted: Fri Sep 27, 2019 9:55 am
by Andy Rea
when using the index registers the offset byte is signed so -128 to +127 is the maximum range allowed.

same as relative jumps.

tasm allows you to enter negative numbers.

regards Andy

Re: Problem with TASM 3.2

Posted: Fri Sep 27, 2019 11:11 am
by XavSnap
True, but the IX and IY value can't be a négative value.
I had to try it, but TASM need DosBox on Win10...
:evil:

Re: Problem with TASM 3.2

Posted: Fri Sep 27, 2019 11:28 am
by Andy Rea
haha your right the IX and IY registers can't be negative but for example say they are holding the value $0000 and you add a negative offset it will roll round to $ffff for -1 $fffe for -2 $fffd fro -3 and so on...

btw

LD IY,-20000 ; is perfectly valid and results in the following bytes DD 21 E0 B1 , $B1E0 been equal to 45536 ( the two's compliment of -20000 )

Andy

Re: Problem with TASM 3.2

Posted: Fri Sep 27, 2019 11:29 am
by Andy Rea
quoted instead of edit :( sorry

Re: Problem with TASM 3.2

Posted: Fri Sep 27, 2019 11:36 am
by XavSnap
hi,
I tried it and the binary file seem to be ok!
The comment "something's wrong!" (!!) don't affect the value up to 127 !
;)

Re: Problem with TASM 3.2

Posted: Fri Sep 27, 2019 11:42 am
by XavSnap
I had a look to the Z80 specifications…
RJ p
BIT 0,(LX+pp)
p=4 bits
pp=8 bits
:o

In fact, it's not a relative value, it's a positive memory decay on the Ix & Iy value ( Lx AND $FFFF; Ly AND $FFFF)

Re: Problem with TASM 3.2

Posted: Fri Sep 27, 2019 11:45 am
by Andy Rea
yes JR 4 bits lol nope..

JR and index offsets both 8bit SIGNED

Re: Problem with TASM 3.2

Posted: Fri Sep 27, 2019 11:47 am
by XavSnap
Tasm don't known what it is !
:lol: