mirror of
https://github.com/cc65/cc65.git
synced 2024-11-18 15:05:14 +00:00
Merge pull request #609 from polluks/master
Added missing PCE conio functions.
This commit is contained in:
commit
316d8e9d37
25
libsrc/pce/cclear.s
Normal file
25
libsrc/pce/cclear.s
Normal file
@ -0,0 +1,25 @@
|
||||
;
|
||||
; Ullrich von Bassewitz, 08.08.1998
|
||||
;
|
||||
; void cclearxy (unsigned char x, unsigned char y, unsigned char length);
|
||||
; void cclear (unsigned char length);
|
||||
;
|
||||
|
||||
.export _cclearxy, _cclear
|
||||
.import gotoxy, cputdirect
|
||||
.importzp tmp1
|
||||
|
||||
_cclearxy:
|
||||
pha ; Save the length
|
||||
jsr gotoxy ; Call this one, will pop params
|
||||
pla ; Restore the length and run into _cclear
|
||||
|
||||
_cclear:
|
||||
cmp #0 ; Is the length zero?
|
||||
beq L9 ; Jump if done
|
||||
sta tmp1
|
||||
L1: lda #$20 ; Blank - screen code
|
||||
jsr cputdirect ; Direct output
|
||||
dec tmp1
|
||||
bne L1
|
||||
L9: rts
|
@ -6,10 +6,13 @@
|
||||
|
||||
|
||||
.export _textcolor, _bgcolor, _bordercolor
|
||||
.import return0
|
||||
|
||||
.include "pce.inc"
|
||||
.include "extzp.inc"
|
||||
|
||||
_bordercolor = return0
|
||||
|
||||
_textcolor:
|
||||
ldx CHARCOLOR ; get old value
|
||||
sta CHARCOLOR ; set new value
|
||||
@ -32,11 +35,6 @@ _bgcolor:
|
||||
txa
|
||||
rts
|
||||
|
||||
_bordercolor:
|
||||
lda #0
|
||||
tax
|
||||
rts
|
||||
|
||||
.rodata
|
||||
.export colors
|
||||
|
||||
|
24
libsrc/pce/wherex.s
Normal file
24
libsrc/pce/wherex.s
Normal file
@ -0,0 +1,24 @@
|
||||
;
|
||||
; Ullrich von Bassewitz, 2003-05-02
|
||||
;
|
||||
; unsigned char wherex (void);
|
||||
;
|
||||
|
||||
.export _wherex
|
||||
|
||||
.include "pce.inc"
|
||||
.include "extzp.inc"
|
||||
|
||||
.proc _wherex
|
||||
|
||||
lda CURS_X
|
||||
ldx #$00
|
||||
rts
|
||||
|
||||
.endproc
|
||||
|
||||
;-------------------------------------------------------------------------------
|
||||
; force the init constructor to be imported
|
||||
|
||||
.import initconio
|
||||
conio_init = initconio
|
24
libsrc/pce/wherey.s
Normal file
24
libsrc/pce/wherey.s
Normal file
@ -0,0 +1,24 @@
|
||||
;
|
||||
; Ullrich von Bassewitz, 2003-05-02
|
||||
;
|
||||
; unsigned char wherey (void);
|
||||
;
|
||||
|
||||
.export _wherey
|
||||
|
||||
.include "pce.inc"
|
||||
.include "extzp.inc"
|
||||
|
||||
.proc _wherey
|
||||
|
||||
lda CURS_Y
|
||||
ldx #$00
|
||||
rts
|
||||
|
||||
.endproc
|
||||
|
||||
;-------------------------------------------------------------------------------
|
||||
; force the init constructor to be imported
|
||||
|
||||
.import initconio
|
||||
conio_init = initconio
|
Loading…
Reference in New Issue
Block a user