Author Topic: Unrecognized instruction (TASM)  (Read 10672 times)

0 Members and 1 Guest are viewing this topic.

Offline Anima

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 133
  • Rating: +4/-0
    • View Profile
Unrecognized instruction (TASM)
« on: February 13, 2012, 08:09:07 pm »
Hi,

I want to learn ASM with the tutorial "Assembly In 28 Days". So, when I want to compile a z80 file, it shows me the following errors:

"c:\asm\source\hello.z80 line 0007: unrecognized instruction. (B_CALL(_CLRLCDFULL))"
"c:\asm\source\hello.z80 line 0011: unrecognized instruction. (B_CALL(_PUTS))"
"c:\asm\source\hello.z80 line 0012: unrecognied instruction. (B_CALL(_NEWLINE))"

That's the ti83plus.inc file, which I've copied to my tasm directory and here is my source file (hello.z80):

Code: [Select]
.nolist
#include "ti83plus.inc"
#define    ProgStart    $9D95
.list
.org    ProgStart - 2
    .db    t2ByteTok, tAsmCmp
    b_call(_ClrLCDFull)
    ld    hl, 0
    ld    (PenCol), hl
    ld    hl, msg
    b_call(_PutS)            ; Display the text
    b_call(_NewLine)
    ret

msg:
    .db "Hello world!", 0
.end
.end

So, is something wrong with my code? Hope you can help me.


Sorry for my bad English. I'm German.

Offline Runer112

  • Moderator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Unrecognized instruction (TASM)
« Reply #1 on: February 13, 2012, 08:12:42 pm »
The ti83plus.inc file that you're using has only defined bcall(), not b_call(). You should probably edit your include file to have the second notation as well. So find this line:

#define bcall(xxxx) rst 28h \ .dw xxxx

And make a copy of it that includes the underscore. You should probably also make a copy of the bjump() macro with an underscore.

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: Unrecognized instruction (TASM)
« Reply #2 on: February 13, 2012, 10:27:36 pm »
Although it is your choice to use what software you desire, may I recommend softwares such as the Doors CS SDK or WabbitStudio instead of TASM? TASM dates back in the '90s and can be a major hassle to use, especially due to weird compiling errors even when your code is right. On top of that if you ever switch to a new computer with a 64 bit OS, then  TASM will no longer run.

Offline thydowulays

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 184
  • Rating: +12/-1
  • Don't gimme dat lip
    • View Profile
    • Thy Gaming Forum
Re: Unrecognized instruction (TASM)
« Reply #3 on: February 13, 2012, 10:37:34 pm »
I agree with DJ_O, TASM is a hassle and has weird errors that new compilers today just don't have. Also, (though this isn't the best idea, but it's easy to learn on), you can use Mimas, which is an on-calc z80 editor and assembler, so it's portable and really fast. You will rarely get a syntax error on it because it will tell you your syntax errors before you compile. This isn't the best thing to use though, because it lets you take "shortcuts", such as doing something like xpos = appBackUpScreen instead of xpos .equ appBackUpScreen. It's your choice though.
Current Projects:
-Sparta GUI Library: 25% - Alpha Stage
-Grapher - 75% - Beta Stage *on hiatus




Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Unrecognized instruction (TASM)
« Reply #4 on: February 13, 2012, 10:41:50 pm »
This isn't the best thing to use though, because it lets you take "shortcuts", such as doing something like xpos = appBackUpScreen instead of xpos .equ appBackUpScreen. It's your choice though.
I didn't even know Mimas allowed equates :o But = is a pretty standard substitute for .equ, and it's defined in many versions of ti83plus.inc.

As DJ_O suggested, I recommend using Spasm (the assembler part of WabbitStudio), Brass, or another newer assembler designed for TI-83 Plus–series calculators, if you're mainly coding on the computer. If you prefer programming on your calculator, Mimas is the way to go.
« Last Edit: February 13, 2012, 10:42:55 pm by Deep Thought »




Offline NanoWar

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 140
  • Rating: +18/-6
    • View Profile
Re: Unrecognized instruction (TASM)
« Reply #5 on: February 14, 2012, 05:02:13 am »
Also check this out for an independent list: http://wikiti.brandonw.net/index.php?title=Assemblers

Offline DrDnar

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 546
  • Rating: +97/-1
    • View Profile
Re: Unrecognized instruction (TASM)
« Reply #6 on: February 14, 2012, 12:52:13 pm »
This isn't the best thing to use though, because it lets you take "shortcuts", such as doing something like xpos = appBackUpScreen instead of xpos .equ appBackUpScreen. It's your choice though.
I didn't even know Mimas allowed equates :o But = is a pretty standard substitute for .equ, and it's defined in many versions of ti83plus.inc.
It's in the readme. Besides, how do you expect to define variables?
"No tools will make a man a skilled workman, or master of defense, nor be of any use to him who has not learned how to handle them, and has never bestowed any attention upon them. . . . Yes, [] the tools which would teach men their own use would be beyond price."—Plato's The Republic, circa 380 BC

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Unrecognized instruction (TASM)
« Reply #7 on: February 14, 2012, 04:57:58 pm »
The dumb way (adding from defined pointers) XD Guess I should read the readme next time.