Re: A85: Shell usage


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

Re: A85: Shell usage





Its just a matter of rellocating any frequently used variables and storing
them in text mem.

In SimCity, I frequently use a pointer to the map, so in the first couple
line lines, I've got
ld hl, dataMap
ld de, (PROGRAM_ADDR) ; mapPtr = TEXT_MEM
add hl, de
ld (mapPtr), hl
ld hl, sprites
add hl, de
ld (spritePtr), hl ; spritePtr = TEXT_MEM+2

whenever I need to access the map, I use ld hl, (mapPtr)
which is a bit slower than just loaidn hl with a lable, but it akes the
same space, and the amount of time used is very negligible.


On Wed, 13 May 1998, Richardlewis wrote:

> 
> I'd like to hear more about this new relocation idea. 
>  
> ->  That I am. Partly because there's no Usgard string maker for the Mac (I 
> -> am working on this though), and partly because I've found my own way of 
> -> kinda implementing rellocation that isn't shell specific. I'm wokring on 
> -> how to apply this to calls and jumps too. right now, it only works on 
> -> variables and labels. 
> ->  
Erik Huizing
ehuizing@acs.ucalgary.ca
http://www.ucalgary.ca/~ehuizing




References: