Re: A82: Definition help
[Prev][Next][Index][Thread]
Re: A82: Definition help
Inside
In a message dated 98-05-30 07:17:41 EDT, you write:
> This is a definition from mines82.asm by Wouter Demuynck:
>
> #define TEXT_ZM(Xloc,Yloc,Addr) .db %00100001 \ .db Xloc,Yloc \ LD
> (CURSOR_X),hl \ .db %00100001 \ .dw Addr \ ROM_CALL(D_ZM_STR)
>
> Evidently this works, since he must have been able to compile a working
> game with it.
>
really?!?!?!?!?! I've been trying to figure out how to get multiple args into
a definition for a while! I didn't think you could w/ TASM. It actually
looks like the .dbs and .dws would crash the calc. I'd like Wouter to explain
>
> This is my definition:
>
> .define text(x,y,string) ld hl,(x*256)+y \ ld (GRAF_CURS),hl \ ld
> hl,string \ call DISPLAY_STRING
>
> .
> .
> .
>
> DISPLAY_STRING:
> ROM_CALL(D_ZM_STR)
> ret
>
>
> Mine does not work. Why? Anyone?
1.) use #define instead of .define because it stands out more
2.) why not say ROM_CALL(D_ZM_STR) instead of call DISPLAY_STRING?
3.) you need to have the string defined beforehand to display it
4.) take out the parentheses in the ld hl... instruction
I'm not sure how to do this exactly. I've tried it but it never worked for me
~Adamman
Follow-Ups: