mirror of
https://github.com/cc65/cc65.git
synced 2024-11-18 15:05:14 +00:00
Merge branch 'master' of https://github.com/cc65/cc65
This commit is contained in:
commit
9948ab7d79
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
|
@ -5,11 +5,14 @@
|
|||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
.export _textcolor, _bgcolor, _bordercolor
|
.export _textcolor, _bgcolor, _bordercolor
|
||||||
|
.import return0
|
||||||
|
|
||||||
.include "pce.inc"
|
.include "pce.inc"
|
||||||
.include "extzp.inc"
|
.include "extzp.inc"
|
||||||
|
|
||||||
|
_bordercolor = return0
|
||||||
|
|
||||||
_textcolor:
|
_textcolor:
|
||||||
ldx CHARCOLOR ; get old value
|
ldx CHARCOLOR ; get old value
|
||||||
sta CHARCOLOR ; set new value
|
sta CHARCOLOR ; set new value
|
||||||
@ -32,11 +35,6 @@ _bgcolor:
|
|||||||
txa
|
txa
|
||||||
rts
|
rts
|
||||||
|
|
||||||
_bordercolor:
|
|
||||||
lda #0
|
|
||||||
tax
|
|
||||||
rts
|
|
||||||
|
|
||||||
.rodata
|
.rodata
|
||||||
.export colors
|
.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
|
@ -1,5 +1,6 @@
|
|||||||
;
|
;
|
||||||
; Ullrich von Bassewitz, 29.12.1999
|
; Piotr Fusik, 09.03.2018
|
||||||
|
; originally by Ullrich von Bassewitz
|
||||||
;
|
;
|
||||||
; CC65 runtime: Decrement eax by value in Y
|
; CC65 runtime: Decrement eax by value in Y
|
||||||
;
|
;
|
||||||
@ -11,16 +12,25 @@ deceaxy:
|
|||||||
sty tmp1
|
sty tmp1
|
||||||
sec
|
sec
|
||||||
sbc tmp1
|
sbc tmp1
|
||||||
sta tmp1
|
bcs @L9
|
||||||
txa
|
|
||||||
sbc #0
|
; Borrow from X.
|
||||||
tax
|
|
||||||
lda sreg
|
dex
|
||||||
sbc #0
|
cpx #$FF
|
||||||
sta sreg
|
bne @L9
|
||||||
lda sreg+1
|
|
||||||
sbc #0
|
; X wrapped from zero to $FF, borrow from sreg.
|
||||||
sta sreg+1
|
|
||||||
lda tmp1
|
dec sreg
|
||||||
rts
|
cpx sreg
|
||||||
|
bne @L9
|
||||||
|
|
||||||
|
; sreg wrapped from zero to $FF, borrow from sreg+1.
|
||||||
|
|
||||||
|
dec sreg+1
|
||||||
|
|
||||||
|
; Done.
|
||||||
|
|
||||||
|
@L9: rts
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@ const OpcDesc OpcTable_65C02[256] = {
|
|||||||
{ "", 1, flIllegal, OH_Illegal, }, /* $6b */
|
{ "", 1, flIllegal, OH_Illegal, }, /* $6b */
|
||||||
{ "jmp", 3, flLabel, OH_JmpAbsoluteIndirect }, /* $6c */
|
{ "jmp", 3, flLabel, OH_JmpAbsoluteIndirect }, /* $6c */
|
||||||
{ "adc", 3, flUseLabel|flAbsOverride, OH_Absolute }, /* $6d */
|
{ "adc", 3, flUseLabel|flAbsOverride, OH_Absolute }, /* $6d */
|
||||||
{ "ror", 3, flUseLabel, OH_Absolute }, /* $6e */
|
{ "ror", 3, flUseLabel|flAbsOverride, OH_Absolute }, /* $6e */
|
||||||
{ "bbr6", 3, flUseLabel, OH_BitBranch }, /* $6f */
|
{ "bbr6", 3, flUseLabel, OH_BitBranch }, /* $6f */
|
||||||
{ "bvs", 2, flLabel, OH_Relative }, /* $70 */
|
{ "bvs", 2, flLabel, OH_Relative }, /* $70 */
|
||||||
{ "adc", 2, flUseLabel, OH_DirectIndirectY }, /* $71 */
|
{ "adc", 2, flUseLabel, OH_DirectIndirectY }, /* $71 */
|
||||||
|
Loading…
Reference in New Issue
Block a user