This commit was generated by cvs2svn to compensate for changes in r2,
which included commits to RCS files with non-trunk default branches. git-svn-id: svn://svn.cc65.org/cc65/trunk@3 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
58
libsrc/cbm610/crtc.s
Normal file
58
libsrc/cbm610/crtc.s
Normal file
@@ -0,0 +1,58 @@
|
||||
;
|
||||
; Ullrich von Bassewitz, 28.09.1998
|
||||
;
|
||||
; Write to the CRTC.
|
||||
;
|
||||
|
||||
.export write_crtc, read_crtc
|
||||
.importzp crtc
|
||||
|
||||
.include "cbm610.inc"
|
||||
.include "zeropage.inc"
|
||||
|
||||
|
||||
; Write a value to the CRTC. The index is in Y, the value in A
|
||||
|
||||
.proc write_crtc
|
||||
sta sedt1
|
||||
lda IndReg
|
||||
pha
|
||||
lda #$0F
|
||||
sta IndReg
|
||||
tya
|
||||
ldy #$00
|
||||
sei
|
||||
sta (crtc),y
|
||||
iny
|
||||
lda sedt1
|
||||
sta (crtc),y
|
||||
cli
|
||||
pla
|
||||
sta IndReg
|
||||
lda sedt1
|
||||
rts
|
||||
.endproc
|
||||
|
||||
|
||||
.proc read_crtc
|
||||
sty sedt1
|
||||
lda IndReg
|
||||
pha
|
||||
lda #$0F
|
||||
sta IndReg
|
||||
lda sedt1
|
||||
ldy #$00
|
||||
sei
|
||||
sta (crtc),y
|
||||
iny
|
||||
lda (crtc),y
|
||||
cli
|
||||
tay
|
||||
pla
|
||||
sta IndReg
|
||||
tya
|
||||
ldy sedt1
|
||||
rts
|
||||
.endproc
|
||||
|
||||
|
||||
Reference in New Issue
Block a user