Author Topic: Roller-RAM from Joyce  (Read 812 times)

0 Members and 1 Guest are viewing this topic.

Offline funkheld

  • 464 Plus
  • *****
  • Posts: 386
  • Liked: 20
  • Likes Given: 0
Roller-RAM from Joyce
« on: 21: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
-----------------------------------


Offline GeoffB17

  • 6128 Plus
  • ******
  • Posts: 794
  • Country: gb
  • PCW since '85, more CP/M than Loco
  • Liked: 169
  • Likes Given: 9
Re: Roller-RAM from Joyce
« Reply #1 on: 23: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

Offline funkheld

  • 464 Plus
  • *****
  • Posts: 386
  • Liked: 20
  • Likes Given: 0
Re: Roller-RAM from Joyce
« Reply #2 on: 00:18, 20 October 20 »
hello thanks.

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

Code: [Select]
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 
« Last Edit: 18:38, 20 October 20 by funkheld »