Hi good afternoon.
How is this routine implemented in ASM?
-----------------------------------------
POKE & B7C6, & 40
CALL & BC06, & 40
----------------------------------------
This does not work:
-----------------------------------
ld hl, # b7c6
ld (hl), # 40
Id a, # 40
call # bc06
--------------------------------
Thank you.
Greeting
I replied to you on the other thread, why did you create a new one? Use DE, not A:
ld hl, # b7c6
ld (hl), # 40
ld de, # 40
call # bc06
Hello thanks for the help.
greeting.
this is on error.
in the picture, bytes also move.
memory &3fff
start by &8000
ld hl,#b7c6
ld (hl),#40
ld de,#40
call #bc06
thanks.
greeting
Mmmh, I'm no firmware expert, but you probably want to try to change the screen offset to #4000, is that correct?
According to this page (http://www.cantrell.org.uk/david/tech/cpc/cpc-firmware/), the call is #bc08, not #bc06, exact?
And A must be #40 for #4000.
So...
ld a,#40
call #bc08
Please tell us exactly what you want.
- I would like to switch in asm the screen on # 4000 and with the
screen # 4000 work (print etc ...,).
- I would like to switch the screen on # C000 in asm and with the
screen # C000 work (print etc ...,)
Thnaks.
greeting.
- I would like to switch in asm the screen on # 4000 and with the
screen # 4000 work (print etc ...,).
- I would like to switch the screen on # C000 in asm and with the
screen # C000 work (print etc ...,)
Thnaks.
greeting.
ld a,&40
call &bc08
That will set the screen base to #4000 and the firmware routines like PRINT etc will write to that screen. It won't clear the screen or anything, so if there is anything in that memory you'll see junk on the screen until you do a CLEAR or MODE - MODE is probably preferable as that will also reset the screen offset (alternately call the firmware routine at &BC05 with HL =0 to reset the offset)
@HAL 6128 (http://www.cpcwiki.eu/forum/index.php?action=profile;u=365) made an BASIC example in the Hisoft Pascal 4T (http://www.cpcwiki.eu/forum/programming/hisoft-pascal-4t/msg51548/#msg51548) thread which animates a Bouncing Ball between screens placed at &4000 and &C000 to reduce flicker, is this what you're interested in? Their example uses OUT to switch screens, however POKE is used to switch screens without displaying it, so then the screen can be cleared and drawing taking place without display and the OUT commands take care of the rest.
Obviously that approach is going to use more memory, so any ASM would have to be below &4000 or &8000 onwards.
hello thanks for the info.
greeting.