[A86] Re: Breaking 8k asm limit


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

[A86] Re: Breaking 8k asm limit




The ABS addressing scheme is explained on Joshua Grams' site,
http://user1.netcarrier.com/~grams/joshua/basicmem.html
It has a nice table to convert between normal and absolute addressing.

On Monday, January 07, 2002, David wrote:

> I've pasted the relevant code from Zelda 86 that does the relocation.  As
> you can see, it's really quite simple.  It just grabs the string and loads
> it into RAM page 1, using the ROM's ABS routines.  ZeldaDat is the
> destination address in RAM page 1.  The reason $8000 is subtracted from
> ZeldaDat is because it uses an ABS address.  I don't remember exactly how
> ABS addresses work (they're pretty simple), but they are relative.  HL
> contains the address relative to the RAM page, and A contains the page
> number (maybe that's all there is to them).  $9300 is $1300 bytes into the
> page, so that is the value used.

> ZeldaDat    = $9300         ; [...]

> LoadData:
>  ld hl,ZeldaDatVar-1
>  rst 20h
>  rst 10h
>  ret c
>  call _ex_ahl_bde
>  call _get_word_ahl
>  call _set_abs_src_addr
>  ld a,1
>  ld hl,ZeldaDat-$8000
>  call _set_abs_dest_addr
>  sub a
>  ex de,hl
>  call _set_mm_num_bytes
>  call _mm_ldir
>  call _ram_page_1

> ZeldaDatVar:
>  .db 8,"zeldadat"

>> I'm no good at all trying to manipulate the vat, i'll be glad if someone
>> could write it or tell me that this is a useless post...



--
Hail Ants! 
Aaron
acurti1@umbc.edu





References: