RE: A82: New Versions of CrASH...
[Prev][Next][Index][Thread]
RE: A82: New Versions of CrASH...
While you're at it, how 'bout a macro for setting the rom page? And for setting/resetting inversed text? (As if we programmers weren't lazy enough.) Then after you've done that, you can go through 82-rom.txt and define every single ROM_CALL in CrASH82.inc. Wouldn't that be loads of fun? :) CrASH82.inc should be at least 100k when you're done Hideaki. :) Whoa, I think I should get to bed now.
--
<snip>
>>> > -> Macros for some op-code combinations
>>> > LD_HL_BC, NEG_HL, etc.
>>>
>>> I think I understand that Macros have the Compiler just copy that
>>> section of
>>> code into spots of the code whenever a referrence is made to that Macro.
>>> However, does this save space? Why not just include these two
>>> routines and
>>> "etc" as subroutines within CrASH?
>>
>>Well, some macros take up the same space or a negligible amount over the
>>number of bytes required to simply do a CALL. (like 2 to 5 bytes, and CALL
>>is 3 bytes) The extra CALL/RET combo requires 27 clocks, so for
>>speed-sensitive code, I thought it would be better to use macros. I do plan
>>to have other macros too, like ADD_HL_A, and CMP_HL_DE, and the like.
>>
>
>Macros are cool. :)
>#define text(x,y,string) ld hl,256*x+y \ ld (GRAF_CURS),hl \ ld hl,string \ ROM_CALL(D_ZM_STR)
>Like basic :)
>
<snip>
HotBot - Search smarter.
http://www.hotbot.com