[A83] Re: Special ram areas?


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

[A83] Re: Special ram areas?




>> From: "Ronald Teune" <rtwolf@gmx.net>
>>
>> > > The stack grows downwards, so you would want to do ld (fe6fh+199).
>>
>> That sounds weird to me. If I want something at the bottom of the stack,
>> thus the most 'growed' stack, and the stack grows downwards, shouldn't I
>do
>> (fe6fh-199) (just thinking)?
>
>Well, actually, the stack starts at FFFFh and grows downwards. There are
400
>bytes reserved for the stack and FFFFh-400d is FE6Fh. So, the stack is
>located at FE6F-FFFF.

OK, than I can load it at FE6F, probably. Thanks!

shouldn't this work then? It crashes the vti calc after a few runs.

  ld hl,$FE6F
  ld a,(hl)
  cp 40
  call z,ok
  inc hl
  ld a,(hl)
  cp 40
  call z,ok
  dec hl
  ld (hl),40
  inc hl
  ld (hl),40
  ret
ok:
  push hl
  ld hl,ok
  bcall(_PutS)
  pop hl
  ret
  nop    ;zero termination

Groeten,
        Ronald Teune
        Using Opera since 08/10/2001
        http://www.zeekoe.cjb.net
        http://cloud.prohosting.com/zeekoe *NEW* (English)
        iets@zeekoe.cjb.net
=================================
Anything that is good and useful is made of chocolate.
A hen is an eggs way to make a new egg.