Re: LZ: ZShell to Usgard converter?


[Prev][Next][Index][Thread]

Re: LZ: ZShell to Usgard converter?



Erik Huizing wrote:
> 
>  Acutally, I think somthing like this may be possible. There'd be two
> ways
> to go about this. Does anyone know if TASM supports the preprocessor
> commands #undef, #ifdef, #elseif and #endif?
>  If it does, then you could simeply put
> #define ZSHELL
> #define USGARD
> #undef USGARD ; turn off usgard version (ie compile for zshell)
> 
> then you code..
> #ifdef ZSHELL
> ld hl, sprite
> ld de, (PROGRAM_ADDR)
> add hl, de
> #elseif
> ld hl, &sprite
> #endif
> 
> this would work if TASM supports the full range of preprocessor
> commands

To simplify it, you could do something like this:
#define callx(xx)  ld hl, xx \ ld de, (PROGRAM_ADDR) \ add hl,de
#define callx(xx)  ld hl, &xx

and just comment the one you don't want.

-- 
Jonathan Anderson
sarlok@geocities.com

"I can't be wrong - my modem is error correcting."


References: