2001-09-13 21:09:19 +00:00
|
|
|
;
|
2003-12-27 16:11:14 +00:00
|
|
|
; Ullrich von Bassewitz, 28.09.1998
|
2001-09-13 21:09:19 +00:00
|
|
|
;
|
2003-12-27 16:11:14 +00:00
|
|
|
; Banking routines for the 610.
|
2001-09-13 21:09:19 +00:00
|
|
|
;
|
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
.export set_bank, sys_bank, restore_bank
|
|
|
|
.importzp ptr1, segsave
|
2001-09-13 21:09:19 +00:00
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
.include "cbm510.inc"
|
2001-09-13 21:09:19 +00:00
|
|
|
|
|
|
|
.code
|
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
.proc sys_bank
|
|
|
|
pha
|
|
|
|
lda IndReg
|
|
|
|
sta segsave
|
|
|
|
lda #$0F
|
|
|
|
sta IndReg
|
|
|
|
pla
|
|
|
|
rts
|
2001-09-13 21:09:19 +00:00
|
|
|
.endproc
|
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
.proc set_bank
|
|
|
|
pha
|
|
|
|
lda IndReg
|
|
|
|
sta segsave
|
|
|
|
pla
|
|
|
|
sta IndReg
|
|
|
|
rts
|
2001-09-13 21:09:19 +00:00
|
|
|
.endproc
|
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
.proc restore_bank
|
|
|
|
pha
|
|
|
|
lda segsave
|
|
|
|
sta IndReg
|
|
|
|
pla
|
|
|
|
rts
|
2001-09-13 21:09:19 +00:00
|
|
|
.endproc
|
|
|
|
|
|
|
|
|