Omnimaga
Calculator Community => TI Calculators => ASM => Topic started by: Anima 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 (http://www.brandonw.net/calcstuff/ti83plus.txt) file, which I've copied to my tasm directory and here is my source file (hello.z80):
.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.
-
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.
-
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.
-
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.
-
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.
-
Also check this out for an independent list: http://wikiti.brandonw.net/index.php?title=Assemblers
-
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?
-
The dumb way (adding from defined pointers) XD Guess I should read the readme next time.