Move the initialization code from conio.s as constructor/destructor code
into the cgetc and cputc modules. Fix color routines using additional snippets from MagerValp. git-svn-id: svn://svn.cc65.org/cc65/trunk@1789 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -4,45 +4,7 @@
|
||||
; Low level stuff for screen output/console input
|
||||
;
|
||||
|
||||
.export initconio, doneconio
|
||||
.exportzp CURS_X, CURS_Y
|
||||
.import xsize, ysize
|
||||
|
||||
.include "c128.inc"
|
||||
.include "../cbm/cbm.inc"
|
||||
|
||||
.bss
|
||||
keyvec: .res 2
|
||||
|
||||
|
||||
.code
|
||||
|
||||
initconio:
|
||||
|
||||
lda #$80
|
||||
sta SCROLL
|
||||
|
||||
; Save the old vector
|
||||
|
||||
lda KeyStoreVec
|
||||
sta keyvec
|
||||
lda KeyStoreVec+1
|
||||
sta keyvec+1
|
||||
|
||||
; Set the new vector. I can only hope that this works for other C128
|
||||
; versions...
|
||||
|
||||
lda #<$C6B7
|
||||
ldx #>$C6B7
|
||||
|
||||
SetVec: sei
|
||||
sta KeyStoreVec
|
||||
stx KeyStoreVec+1
|
||||
cli
|
||||
rts
|
||||
|
||||
doneconio:
|
||||
lda keyvec
|
||||
ldx keyvec+1
|
||||
bne SetVec
|
||||
|
||||
|
||||
Reference in New Issue
Block a user