1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-25 02:29:52 +00:00

Split files

This commit is contained in:
Karri Kaksonen 2022-04-16 19:15:19 +03:00 committed by mrdudz
parent e0c7880e34
commit f0e16514e0
3 changed files with 181 additions and 197 deletions

View File

@ -7,7 +7,7 @@
.export _cputc .export _cputc
.export _textcolor .export _textcolor
.import _gotoxy, _gotox, _gotoy, pusha0 .import _gotoxy, gotox, gotoy, pusha0
.import pushax .import pushax
.import _screen .import _screen
.import CURS_X, CURS_Y .import CURS_X, CURS_Y
@ -101,9 +101,9 @@ umula0:
beq @L3 beq @L3
@L2: clc @L2: clc
adc #1 adc #1
@L3: jsr _gotoy @L3: jsr gotoy
lda #0 lda #0
jmp _gotox jmp gotox
@L4: @L4:
cmp #$20 ; ' ' cmp #$20 ; ' '
@ -168,7 +168,7 @@ umula0:
beq @L1 beq @L1
clc clc
adc #1 adc #1
jmp _gotox jmp gotox
.endproc .endproc

View File

@ -23,7 +23,7 @@
; definitely not allow direct access to the variables. ; definitely not allow direct access to the variables.
; ;
.export gotoxy, _gotoxy, _gotox, _gotoy, _wherex, _wherey .export gotoxy, _gotoxy, gotox, gotoy
.export CURS_X, CURS_Y .export CURS_X, CURS_Y
.constructor init_cursor .constructor init_cursor
.interruptor blink_cursor .interruptor blink_cursor
@ -122,7 +122,7 @@ umula0:
; Enable cursor ; Enable cursor
; if showcursor cursorzone[1] = 30 ; if showcursor cursorzone[1] = 30
; ;
.proc _gotoy .proc gotoy
pha pha
lda CURS_Y lda CURS_Y
@ -147,7 +147,7 @@ umula0:
; You also need to set the hpos offset to the correct value on this line ; You also need to set the hpos offset to the correct value on this line
; cursorzone[3] = 8 * CURS_X ; cursorzone[3] = 8 * CURS_X
; ;
.proc _gotox .proc gotox
sta CURS_X sta CURS_X
ldy #3 ldy #3
@ -165,9 +165,9 @@ umula0:
; ;
.proc _gotoxy .proc _gotoxy
jsr _gotoy jsr gotoy
jsr popa jsr popa
jsr _gotox jsr gotox
rts rts
.endproc .endproc
@ -175,23 +175,6 @@ umula0:
jsr popa jsr popa
jmp _gotoxy jmp _gotoxy
.endproc .endproc
;-----------------------------------------------------------------------------
; Get cursor X position
;
.proc _wherex
lda CURS_X
rts
.endproc
;-----------------------------------------------------------------------------
; Get cursor Y position
;
.proc _wherey
lda CURS_Y
rts
.endproc
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
; Initialize cursorzone at startup ; Initialize cursorzone at startup

View File

@ -12,6 +12,7 @@
; ;
.proc _wherex .proc _wherex
ldx #0
lda CURS_X lda CURS_X
rts rts
.endproc .endproc