Omnimaga

Calculator Community => TI Calculators => ASM => Topic started by: the_mad_joob on July 29, 2011, 12:49:02 pm

Title: tasm80ud errors
Post by: the_mad_joob on July 29, 2011, 12:49:02 pm
Yo there...

Before reading any further, this topic concerns tasm users who use the enhanced tasm80.tab (the one including undocumented instructions, by joe wingbermuehle).
Here are the errors you need to correct if you want all instructions to work properly.

There we go :



1) instruction name errors

replace :
IN   F,(C)   70ED   2   NOP   1
by :
IN   (C)   70ED   2   NOP   1

replace :
OUT   F,(C)   71ED   2   NOP   1
by :
OUT   (C),0   71ED   2   NOP   1

2) op error (This one is particularly awfull...)

replace :
DEC   IYH   24FD   2   NOP   1
by :
DEC   IYH   25FD   2   NOP   1

3) instruction lines with wrong position in the file, causing tasm to interpret, for example, LD IXH,A as LD IXH,label_A

move :
LD   IXH,*   26DD   3   NOP   1
after :
LD   IXH,A   67DD   2   NOP   1

move :
LD   IXL,*   2EDD   3   NOP   1
after :
LD   IXL,A   6FDD   2   NOP   1

move :
LD   IYH,*   26FD   3   NOP   1
after :
LD   IYH,A   67FD   2   NOP   1

move :
LD   IYL,*   2EFD   3   NOP   1
after :
LD   IYL,A   6FFD   2   NOP   1



Anyway, fat thx to joe for having provided such a useful file at that time =]
Title: Re: tasm80ud errors
Post by: DJ Omnimaga on July 29, 2011, 06:52:57 pm
Yeah personally I would recommend maybe switching to something like Spasm or Doors CS SDK, because TASM is quite buggy and outdated and since it doesn't run on 64-bit computers, fewer and fewer people use it anymore nor can help.

However if people prefer to stick with TASM, that could be helpful. :)
Title: Re: tasm80ud errors
Post by: the_mad_joob on July 29, 2011, 07:38:12 pm
An infinite pleasure to see ya back dj =]

Regarding tasm, it's not the first time i hear about bugs.
From my personnal experience, the only "bugs" i have ever encountered were always triggered by non-respect of the rules.
Stuff in post 1 is definitely a good example.

Anyway, i hope this topic will be useful for those who, like me, are stuck in the past =]
Title: Re: tasm80ud errors
Post by: DJ Omnimaga on July 29, 2011, 08:01:10 pm
Thanks, and yeah actually the main issue is that it's very picky about syntax and sometimes even the right ASM syntax is not supported. There are also quirks like how it can't check the last line, so you get stuff like No END directive before EOF, so you need to add an extra linebreak.

(By the way I learned ASM with TASM because back then Spasm and Latenite/Brass didn't exist :P)
Title: Re: tasm80ud errors
Post by: calc84maniac on July 29, 2011, 10:42:49 pm
replace :
OUT   F,(C)   71ED   2   NOP   1
by :
OUT   (C),F   71ED   2   NOP   1
Actually, that should be OUT (C),0
Title: Re: tasm80ud errors
Post by: the_mad_joob on July 30, 2011, 07:53:46 am
Thanks, and yeah actually the main issue is that it's very picky about syntax and sometimes even the right ASM syntax is not supported. There are also quirks like how it can't check the last line, so you get stuff like No END directive before EOF, so you need to add an extra linebreak.

Yeah, always heard about those bugs but never had the opportunity to encounter any of them at all.
I'm probably just lucky there...

Actually, that should be OUT (C),0

There seem to be different schools about that one.

On wikiti, it's indeed named as OUT (C),0.
But, if you look closely at the op value, it's the exact opposite of IN F,(C).
More precisely, the following is true for every register written|read (A|B|C|D|E|F|H|L) :

IN reg,(C) > $ED,$40+reg_op
OUT (C),reg > $ED,$41+reg_op

That's to say, the direction of the transfer is defined by the value of bit 0 on byte 2.
As if it has the exact opposite effect, i honestly don't know, since i'm not familiar with those instructions.
Wikiti says the value sent to port (C) "varies with cpu", which is far from being precise.
Maybe noone ever realized that this value is in fact the content of tmp (as it's called on wikiti).
I'm quite interested in some more in depth clarification about that one, especially since i'm currently writing my own instruction interpreter, and, will have to decide whether the better syntax should be "F" or "0".
Title: Re: tasm80ud errors
Post by: calc84maniac on July 30, 2011, 11:43:07 am
Well, from what I've heard, some CPUs output $00 and others output $FF. I'm pretty sure the TI processors output $00. And besides, IN F,(C) is also a misleading mnemonic. It doesn't actually write the input value to F, it simply affects flags and doesn't write the input value anywhere. I personally prefer the IN (C) mnemonic for that instruction.
Title: Re: tasm80ud errors
Post by: the_mad_joob on July 30, 2011, 01:44:43 pm
Thx =]

Did some additionnal web readings and indeed, those 2 instructions are often reffered as "null input|output instructions".

> first post edited