Re: A86: Asm: Strings, Asm, Asm + Strings...


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

Re: A86: Asm: Strings, Asm, Asm + Strings...



 

Roy Wong wrote:

 No, strings are really needed for the flexability i want this program to have, and without it, there is no way i am going to make the page cut with one prog... thanks though! Damnation
The best thing for you to do is to put it all into one large string and then copy the whole string to page 1.
That way, you only have to search for the string and change pages once, and you also know the address of
every sprite without having to calculate abs addresses.

 ld hl,stringname
 rst 20h
 rst 10h
 jp c,$415d
 ld a,b
 ex de,hl
 push af
 push hl
 call _load_ram_ahl  ;set page
 call $33     ;hl now contains length of string to load
 sub a
 call _SET_MM_NUM_BYTES     ;load hl into abs # of bytes
 pop hl
 pop af
 call $4c3f       ;ahl += 2
 call _SET_ABS_SRC_ADDR
 ld a,1
 ld hl,0      ;abs addr of $8000 on page 1
 call _SET_ABS_DEST_ADDR
 call _mm_ldir        ;copy to page 1
 call _RAM_PAGE_1          ;return the ram page

 


References: