.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
z80 assembly: Errors when trying to assemble a simple program with TASM
Hey I am beginning to learn z80 assembly and I am having some problems getting started. I am trying to compile this code:
I am getting these errors:
ti83plus.inc line 4054: Duplicate Label: (noname._LdHLInd)
... about 8 that are similar to this ...
and some that say this:
D:\TI-84_Dev\Source\hello.z80 line 0007: unrecognized instruction (B_CALL(_PUTS))
and two more on lines 11 and 12.
I have no clue how to solve these because I am just learning assembly language. Could someone tell me what these errors are caused by??
I assume b_call is meant to be a macro, right? Because the assembler doesn't seem to recognize it. Are you sure that it's defined in ti83plus.inc? (just use the search tool of the editor in that file and look for "b_call")
That's what I thought too. But the macros are defined in the file:
#define bcall(xxxx) rst 28h \ .dw xxxx
#define B_CALL(xxxx) rst 28h \ .dw xxxx
#define B_CALL xxxx rst 28h \ .dw xxxx
#define bcall(xxxx) rst 28h \ .dw xxxx
#define B_CALL(xxxx) rst 28h \ .dw xxxx
#define B_CALL xxxx rst 28h \ .dw xxxx
I looked through the ti83plus.inc file and found the "duplicate labels" that the compiler is complaining about:
there's a bunch more in that list that the compiler isn't complaining about and they look exactly the same. I'm really confused on why this is...
_LdHLInd equ 4009h_NewLine equ 452Eh_Mon equ 401Eh_PutAway equ 403Ch_AppInit equ 404Bh_IsA2ByteTok equ 42A3h_BufLeft equ 4903h_BufRight equ 4906h_BufDelete equ 4912h_BufReplace equ 490Fh_BufDelete equ 4912h_CloseEditEqu equ 496Ch_DispTail equ 495Dh_GetPrevTok equ 496Fh_CursorLeft equ 493Fh_IsEditEmpty equ 492Dh
there's a bunch more in that list that the compiler isn't complaining about and they look exactly the same. I'm really confused on why this is...
Well... I think I figured it out. The macros b_call() wasn't defined in the file. but bcall() was so I used that. It looks like they pretty much do the same thing looking at the ti83plus.inc file. I erased all the duplicate labels in the ti83basic.inc and saved them in another file for later. We'll see how this works tho :(
If the duplicate labels had the same values then most likely it should work. I normally would just do the call itself directly instead of using a macro, I'm too low level when it comes to that kind of programming to be honest =P But don't follow that if you don't feel like doing it >_>
By the way, I'm just wondering, from where did you get that file? Did it come with a devkit or what?
By the way, I'm just wondering, from where did you get that file? Did it come with a devkit or what?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement