Dealing with banks is a bit complicated and the compiler does not support them.
Maybe someone else can help you here, or, as said, ask for help in the Telegram channel, since many people is doing things with banking already.
EDIT: You can write pure asm functions using Fastcall, and the 1st parameter comes in A register if the parameter is 8 bits sized:
Maybe someone else can help you here, or, as said, ask for help in the Telegram channel, since many people is doing things with banking already.
EDIT: You can write pure asm functions using Fastcall, and the 1st parameter comes in A register if the parameter is 8 bits sized:
Code:
Sub fastcall _bank(n as UByte)
ASM
ld c, a ; A register contains the n parameter
ld a,(0x5b5c)
and 0xf8
or c ;bank N auswählen
ld bc,0x7ffd
di
ld (0x5b5c),a
out (c),a
ei
END ASM
end sub