mirror of
https://github.com/cc65/cc65.git
synced 2025-01-24 20:30:08 +00:00
some CONIO fixes
This commit is contained in:
parent
8cb68071cd
commit
0f2f19ef5b
@ -57,8 +57,8 @@ PADDL7 = $18 ;POT7 "
|
||||
|
||||
; cc65 runtime zero page variables
|
||||
|
||||
COLCRS_5200 = $19
|
||||
ROWCRS_5200 = $1A
|
||||
ROWCRS_5200 = $19
|
||||
COLCRS_5200 = $1A
|
||||
SAVMSC = $1B ; pointer to screen memory (conio)
|
||||
|
||||
;-------------------------------------------------------------------------
|
||||
|
@ -31,6 +31,19 @@ clrscr: sta (SAVMSC),y
|
||||
cpx #$FF
|
||||
bne clrscr
|
||||
|
||||
; set default colors
|
||||
|
||||
lda #40
|
||||
sta COLOR0
|
||||
lda #202
|
||||
sta COLOR1
|
||||
lda #148
|
||||
sta COLOR2
|
||||
lda #70
|
||||
sta COLOR3
|
||||
lda #0
|
||||
sta COLOR4
|
||||
|
||||
; set display list
|
||||
|
||||
lda #<dlist
|
||||
|
@ -54,7 +54,7 @@ cputdirect: ; accepts screen code
|
||||
; advance cursor
|
||||
inc COLCRS_5200
|
||||
lda COLCRS_5200
|
||||
cmp #40
|
||||
cmp #20
|
||||
bcc plot
|
||||
lda #0
|
||||
sta COLCRS_5200
|
||||
@ -72,7 +72,6 @@ plot: jsr setcursor
|
||||
ldx ROWCRS_5200
|
||||
rts
|
||||
|
||||
; turn off cursor, update screen, turn on cursor
|
||||
putchar:
|
||||
pha ; save char
|
||||
|
||||
|
@ -10,6 +10,4 @@
|
||||
|
||||
_gotox:
|
||||
sta COLCRS_5200 ; Set X
|
||||
lda #0
|
||||
sta COLCRS_5200+1
|
||||
jmp setcursor
|
||||
|
@ -14,6 +14,4 @@ _gotoxy: ; Set the cursor position
|
||||
sta ROWCRS_5200 ; Set Y
|
||||
jsr popa ; Get X
|
||||
sta COLCRS_5200 ; Set X
|
||||
lda #0
|
||||
sta COLCRS_5200+1 ;
|
||||
jmp setcursor
|
||||
|
Loading…
x
Reference in New Issue
Block a user