11-13-2024, 11:37 AM
hello, good day.
I found something for the bank and did a test.
https://worldofspectrum.org/faq/referenc...erence.htm
I wrote in bank 3 and bank4 :
_bank3()
poke($c00a,128)
_bank4()
poke($c007,5)
I then did the bank test and it works great.
how can you pass the value for the bank in the asm program? I don't know.
That's why I wrote the asm program twice.
thanks
-----------------------------
Sub _bank4 ()
ASM
ld a,(0x5b5c)
and 0xf8
or 4 ;bank 4 auswählen
ld bc,0x7ffd
di
ld (0x5b5c),a
out ©,a
ei
END ASM
end sub
Sub _bank3 ()
ASM
ld a,(0x5b5c)
and 0xf8
or 3 ;bank 3 auswählen
ld bc,0x7ffd
di
ld (0x5b5c),a
out ©,a
ei
END ASM
end sub
CLS
_bank3()
poke($c00a,128)
_bank4()
poke($c007,5)
_bank3()
print peek($c000)
print peek($c00a)
_bank4()
print peek($c000)
print peek($c007)
WHILE INKEY$ = ""
END WHILE
-----------------------------------------
I found something for the bank and did a test.
https://worldofspectrum.org/faq/referenc...erence.htm
I wrote in bank 3 and bank4 :
_bank3()
poke($c00a,128)
_bank4()
poke($c007,5)
I then did the bank test and it works great.
how can you pass the value for the bank in the asm program? I don't know.
That's why I wrote the asm program twice.
thanks
-----------------------------
Sub _bank4 ()
ASM
ld a,(0x5b5c)
and 0xf8
or 4 ;bank 4 auswählen
ld bc,0x7ffd
di
ld (0x5b5c),a
out ©,a
ei
END ASM
end sub
Sub _bank3 ()
ASM
ld a,(0x5b5c)
and 0xf8
or 3 ;bank 3 auswählen
ld bc,0x7ffd
di
ld (0x5b5c),a
out ©,a
ei
END ASM
end sub
CLS
_bank3()
poke($c00a,128)
_bank4()
poke($c007,5)
_bank3()
print peek($c000)
print peek($c00a)
_bank4()
print peek($c000)
print peek($c007)
WHILE INKEY$ = ""
END WHILE
-----------------------------------------