Author Topic: tasm80ud errors  (Read 3625 times)

0 Members and 1 Guest are viewing this topic.

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 346
  • Rating: +47/-0
    • View Profile
tasm80ud errors
« 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 =]
« Last Edit: July 30, 2011, 01:48:12 pm by the_mad_joob »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: tasm80ud errors
« Reply #1 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. :)
« Last Edit: July 29, 2011, 06:54:06 pm by DJ_O »

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 346
  • Rating: +47/-0
    • View Profile
Re: tasm80ud errors
« Reply #2 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 =]

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: tasm80ud errors
« Reply #3 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)

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: tasm80ud errors
« Reply #4 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
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 346
  • Rating: +47/-0
    • View Profile
Re: tasm80ud errors
« Reply #5 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".
« Last Edit: July 30, 2011, 09:10:15 am by the_mad_joob »

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: tasm80ud errors
« Reply #6 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.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 346
  • Rating: +47/-0
    • View Profile
Re: tasm80ud errors
« Reply #7 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
« Last Edit: July 30, 2011, 01:49:08 pm by the_mad_joob »