CPCWiki forum

General Category => NC100, NC200, PCW, PDA600 - the rest of the Family! => Topic started by: funkheld on 19:11, 19 October 20

Title: Roller-RAM from Joyce
Post by: funkheld on 19:11, 19 October 20
Hi good afternoon.


actually a byte with 255 should be at address b600.
why does this simple program not work with one byte.


Thank you.
greeting

-------------------------

org  #0100


xbios   equ   0FC5Ah     
screen   equ   00E9h     
roller   equ   0B600h   

ld a,255   
ld hl,roller
ld   (hl),a
call   xbios     
dw   screen   

ende
  jp ende   

ret
-----------------------------------

Title: Re: Roller-RAM from Joyce
Post by: GeoffB17 on 21:11, 19 October 20
Hello,

Please - think back to the code examples from John Elliott that you were playing with before.

You've written a little prog which is sitting in the SYSTEM memory, i.e. the 4 banks that are active normally.

BUT, the SCREEN ram (is in a different bank, and you're not doing a bank swap as per the earlier progs, so the FF will be set in a byte in the SYSTEM memory map and NOT in the SCREEN RAM.

Maybe if the 3 lines to place the data in RAM were after the 2 lines which (I think) are doing the swap this might help, BUT I don't think you've placed the 3 lines where they'll be available after the bank swap??

Again, refer back to the earlier progs.

Geoff
Title: Re: Roller-RAM from Joyce
Post by: funkheld on 22:18, 19 October 20
hello thanks.

actually it should work.
but doesn't do it.
greeting


org  #0100

xbios     equ   0FC5Ah     
screen   equ   00E9h     
roladr   equ   0B600h   

start:
  ld de,roladr
  jr weiter
  ret
 
weiter:
  ld   bc,routine
  call xbios     
  dw    screen   
  ret

routine:
  ld hl,160
  jr setzen

setzen:
  add hl,de
  ld a,255
  ld (hl),a
  jr ende
 
ende:
  ret 
Powered by SMFPacks Menu Editor Mod