Re: A86: Re: Porting Question


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

Re: A86: Re: Porting Question




Right, 2-7 are user memory, so your string will be in there.  To compile
something as a string, use Asm Studio's "compile as string" option :) 
To copy the string onto page 1, I would do something like this...

	ld hl,string-1
	rst 20h
	rst 10h
	ret c
	ex de,hl
	ld a,b
	call _load_ram_ahl
	call _RAM_PAGE_1
	out (5),a
	ld de,-16384
	add hl,de
	ld de,$8100
	ld c,(hl)
	inc hl
	ld b,(hl)
	inc hl
copyloop:
	ldi
	dec bc
	ld a,b
	or c
	ret z
	ld a,h
	rla
	jr nc,copyloop	
	ld h,$40
	in a,(5)
	inc a
	out (5),a
	jr copyloop

...but that's just because I like doing things the hard way.  _mm_ldir
would probably be better, I'm sure someone else will post something
about it...

ADAMMAN106@aol.com wrote:
> 
> Ok, I think I got it...so (RAM) page 0 is basically system memory and asm
> exec memory.  page 1 is completely free (but whats the deal with the FPS
> stack and ops?).  pages 2-7 is just storage.  Is that right?
> so assuming my string is store on one of pages 2-7...how do I copy from one
> swapping page to another?  and how do I compile as a string?
> thanks,
> 
> ~Adamman


References: