Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
where can I get help with the memory on the spectrum 128k?
#4
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:
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
Reply


Messages In This Thread
RE: where can I get help with the memory on the spectrum 128k? - by boriel - 11-13-2024, 01:22 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)