Adding CBM510 support
git-svn-id: svn://svn.cc65.org/cc65/trunk@913 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
49
libsrc/cbm510/pokesys.s
Normal file
49
libsrc/cbm510/pokesys.s
Normal file
@@ -0,0 +1,49 @@
|
||||
;
|
||||
; Ullrich von Bassewitz, 13.09.2001
|
||||
;
|
||||
; void pokebsys (unsigned Addr, unsigned char Val);
|
||||
; void pokewsys (unsigned Addr, unsigned Val);
|
||||
|
||||
.export _pokebsys, _pokewsys
|
||||
.import popsreg
|
||||
.importzp sreg, tmp1
|
||||
|
||||
.include "zeropage.inc"
|
||||
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
;
|
||||
|
||||
.proc _pokebsys
|
||||
|
||||
jsr popsreg ; Get the address
|
||||
ldx IndReg
|
||||
ldy #$0F
|
||||
sty IndReg ; Switch to the system bank
|
||||
ldy #$00
|
||||
sta (sreg),y
|
||||
stx IndReg
|
||||
rts
|
||||
|
||||
.endproc
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
;
|
||||
|
||||
.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
|
||||
|
||||
.endproc
|
||||
|
||||
Reference in New Issue
Block a user