Problem with TASM 3.2

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
Bean
Posts: 60
Joined: Fri Aug 01, 2014 8:40 pm

Problem with TASM 3.2

Post 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

User avatar
XavSnap
Posts: 892
Joined: Sat May 10, 2008 4:23 pm

Re: Problem with TASM 3.2

Post 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:
Xavier

User avatar
Andy Rea
Posts: 1553
Joined: Fri May 09, 2008 2:48 pm

Re: Problem with TASM 3.2

Post 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
AFK

User avatar
XavSnap
Posts: 892
Joined: Sat May 10, 2008 4:23 pm

Re: Problem with TASM 3.2

Post 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:
Xavier

User avatar
Andy Rea
Posts: 1553
Joined: Fri May 09, 2008 2:48 pm

Re: Problem with TASM 3.2

Post 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
Last edited by Andy Rea on Fri Sep 27, 2019 11:38 am, edited 1 time in total.
AFK

User avatar
Andy Rea
Posts: 1553
Joined: Fri May 09, 2008 2:48 pm

Re: Problem with TASM 3.2

Post by Andy Rea »

quoted instead of edit :( sorry
Last edited by Andy Rea on Fri Sep 27, 2019 11:40 am, edited 1 time in total.
AFK

User avatar
XavSnap
Posts: 892
Joined: Sat May 10, 2008 4:23 pm

Re: Problem with TASM 3.2

Post 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 !
;)
Xavier

User avatar
XavSnap
Posts: 892
Joined: Sat May 10, 2008 4:23 pm

Re: Problem with TASM 3.2

Post 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)
Last edited by XavSnap on Fri Sep 27, 2019 11:45 am, edited 1 time in total.
Xavier

User avatar
Andy Rea
Posts: 1553
Joined: Fri May 09, 2008 2:48 pm

Re: Problem with TASM 3.2

Post by Andy Rea »

yes JR 4 bits lol nope..

JR and index offsets both 8bit SIGNED
AFK

User avatar
XavSnap
Posts: 892
Joined: Sat May 10, 2008 4:23 pm

Re: Problem with TASM 3.2

Post by XavSnap »

Tasm don't known what it is !
:lol:
Xavier

Post Reply