2001-09-13 21:37:59 +00:00
|
|
|
;
|
|
|
|
; Ullrich von Bassewitz, 13.09.2001
|
|
|
|
;
|
|
|
|
; void pokebsys (unsigned Addr, unsigned char Val);
|
|
|
|
; void pokewsys (unsigned Addr, unsigned Val);
|
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
.export _pokebsys, _pokewsys
|
|
|
|
.import popsreg
|
|
|
|
.importzp sreg, tmp1
|
2001-09-13 21:37:59 +00:00
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
.include "cbm510.inc"
|
2001-09-13 21:37:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
; ------------------------------------------------------------------------
|
|
|
|
;
|
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
.proc _pokebsys
|
2001-09-13 21:37:59 +00:00
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
jsr popsreg ; Get the address
|
|
|
|
ldx IndReg
|
|
|
|
ldy #$0F
|
|
|
|
sty IndReg ; Switch to the system bank
|
|
|
|
ldy #$00
|
|
|
|
sta (sreg),y
|
|
|
|
stx IndReg
|
|
|
|
rts
|
2001-09-13 21:37:59 +00:00
|
|
|
|
|
|
|
.endproc
|
|
|
|
|
|
|
|
; ------------------------------------------------------------------------
|
|
|
|
;
|
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
.proc _pokewsys
|
|
|
|
|
|
|
|
stx tmp1 ; Save high byte
|
|
|
|
jsr popsreg ; Get the address
|
|
|
|
ldx IndReg
|
|
|
|
ldy #$0F
|
|
|
|
sty IndReg ; Switch to the system bank
|
|
|
|
ldy #$00
|
|
|
|
sta (sreg),y
|
|
|
|
iny
|
|
|
|
lda tmp1
|
|
|
|
sta (sreg),y
|
|
|
|
stx IndReg
|
|
|
|
rts
|
2001-09-13 21:37:59 +00:00
|
|
|
|
|
|
|
.endproc
|
|
|
|
|