A86: Re: Re: Re: Re: divide by 2


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

A86: Re: Re: Re: Re: divide by 2




Umm...

_asm_exec_ram starts at $d748 and ends wherever your stack ends (starts?).
The stack begins (ends) at $fbff and grows DOWNWARDS into _asm_exec_ram.
Why they chose to do this, I have no idea.  IMHO, memory should have been
layed out with ram page 7 being located (and swapable!) at $8000, like the
85.  Then your asm program could execute at the end of it and have almost
30k of contiguous ram.  And putting the stack right below video ram is bad
also, because if you want two contiguous grayscale planes, you have to move
the stack.  No big deal, but why should you have to waste space when the
program loader could do it?

Do you mean you want to fill an area with a number?  Do this...

  ld hl,Start
  ld de,Start+1
  ld bc,Length-1
  ld (hl),n
  ldir

>
>one more question.  Am i right in thinking that the _asm area is about 9000
>some bytes long.  Anyway how do I make let's say hl point to the end of it.
>
>example of what i want to do:
>    hl = end of asm
>    n = integeter
>
>       ld (hl),n
>        sbc (hl),8
>
>    do this a couple of times.
>
>100 or so