OK, I have started to learn z80 ASM today and I have run into a couple of problems. I am trying to use a very simple IDE (Assembly Studio 8x). I have two beginner tutorials that I found on ticalc.org, and I think I understand the concepts, I just can't get the program to compile. Here is the extremely simple program:
#include "ti83plus.inc"
#define ProgStart $9D95
.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
It is right from a tutorial. Anyway, I am getting errors at the lines where I am making the ROM calls (B_CALL). It is saying that I have th wrong number of arguments for B_CALL. I looked through the "ti83plus.inc" file, but I do not know enough ASM to know what I am doing wrong. Any help is greatly appreciated!
Edit: here are the relavent parts of the ti83plus.inc file:
;
; macro to call base code from an app,
;
rBR_CALL equ 28h ; NEEDED FOR APPS
BRT_JUMP0 equ 50h
.addinstr BCALL * EF 3 NOP 1
.addinstr BJUMP * 0050CD 5 NOP 1
#define B_CALL BCALL
#define B_JUMP BJUMP
;#define B_JUMP(label) call BRT_JUMP0 \ .dw label
;
;B_CALL macro label
; rst rBR_CALL
; dw _&label
; .endm
;B_JUMP macro label
; call BRT_JUMP0 ; fixed location on page 0
; dw _&label
; .endm
;
; entry points
;
...
_ClrLCD equ 4543h
_ClrLCDFull equ 4540h
...
_NewLine equ 452Eh
...
_PutS equ 450Ah
...
.end
The B_CALL parts are near the top...
[Edited by - Sr_Guapo on October 3, 2004 9:04:02 PM]