Fix tabs
This commit is contained in:
@@ -27,31 +27,31 @@
|
||||
.constructor mono_init_cursor
|
||||
.interruptor mono_blink_cursor
|
||||
|
||||
.importzp sp
|
||||
.import _mono_zones
|
||||
.import cursor
|
||||
.import pusha, incsp1, pusha0, pushax, popa
|
||||
.importzp sp
|
||||
.import _mono_zones
|
||||
.import cursor
|
||||
.import pusha, incsp1, pusha0, pushax, popa
|
||||
.include "atari7800.inc"
|
||||
.include "extzp.inc"
|
||||
|
||||
.macpack generic
|
||||
|
||||
.data
|
||||
.data
|
||||
;-----------------------------------------------------------------------------
|
||||
; The variables used by cursor functions
|
||||
;
|
||||
|
||||
blink_time:
|
||||
.byte 140
|
||||
.byte 140
|
||||
|
||||
.code
|
||||
.code
|
||||
|
||||
;---------------------------------------------------------------------------
|
||||
; 8x16 routine
|
||||
|
||||
umula0:
|
||||
ldy #8 ; Number of bits
|
||||
lda #0
|
||||
lda #0
|
||||
lsr ptr7800 ; Get first bit into carry
|
||||
@L0: bcc @L1
|
||||
|
||||
@@ -81,25 +81,25 @@ umula0:
|
||||
; A = CURS_Y
|
||||
.proc calccursorzone
|
||||
|
||||
sta ptr7800
|
||||
lda #16
|
||||
sta ptrtmp
|
||||
lda #0
|
||||
sta ptr7800+1
|
||||
sta ptrtmp+1
|
||||
jsr umula0
|
||||
clc
|
||||
adc #10
|
||||
bcc @L1
|
||||
inx
|
||||
@L1: clc
|
||||
adc #<_mono_zones
|
||||
sta cursorzone ; calculate new cursorzone
|
||||
txa
|
||||
clc
|
||||
adc #>_mono_zones
|
||||
sta cursorzone+1
|
||||
rts
|
||||
sta ptr7800
|
||||
lda #16
|
||||
sta ptrtmp
|
||||
lda #0
|
||||
sta ptr7800+1
|
||||
sta ptrtmp+1
|
||||
jsr umula0
|
||||
clc
|
||||
adc #10
|
||||
bcc @L1
|
||||
inx
|
||||
@L1: clc
|
||||
adc #<_mono_zones
|
||||
sta cursorzone ; calculate new cursorzone
|
||||
txa
|
||||
clc
|
||||
adc #>_mono_zones
|
||||
sta cursorzone+1
|
||||
rts
|
||||
|
||||
.endproc
|
||||
|
||||
@@ -120,21 +120,21 @@ umula0:
|
||||
;
|
||||
.proc _mono_gotoy
|
||||
|
||||
pha
|
||||
lda CURS_Y
|
||||
jsr calccursorzone
|
||||
ldy #1
|
||||
lda #0
|
||||
sta (cursorzone),y ; disable cursor
|
||||
pla
|
||||
sta CURS_Y
|
||||
jsr calccursorzone
|
||||
lda cursor
|
||||
beq @L1
|
||||
lda #31 ; enable cursor
|
||||
@L1: ldy #1
|
||||
sta (cursorzone),y
|
||||
rts
|
||||
pha
|
||||
lda CURS_Y
|
||||
jsr calccursorzone
|
||||
ldy #1
|
||||
lda #0
|
||||
sta (cursorzone),y ; disable cursor
|
||||
pla
|
||||
sta CURS_Y
|
||||
jsr calccursorzone
|
||||
lda cursor
|
||||
beq @L1
|
||||
lda #31 ; enable cursor
|
||||
@L1: ldy #1
|
||||
sta (cursorzone),y
|
||||
rts
|
||||
|
||||
.endproc
|
||||
|
||||
@@ -145,51 +145,51 @@ umula0:
|
||||
;
|
||||
.proc _mono_gotox
|
||||
|
||||
sta CURS_X
|
||||
ldy #3
|
||||
clc
|
||||
rol
|
||||
rol
|
||||
sta (cursorzone),y
|
||||
rts
|
||||
sta CURS_X
|
||||
ldy #3
|
||||
clc
|
||||
rol
|
||||
rol
|
||||
sta (cursorzone),y
|
||||
rts
|
||||
|
||||
.endproc
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
; Set cursor to desired position (X,Y)
|
||||
;
|
||||
.proc _mono_gotoxy
|
||||
.proc _mono_gotoxy
|
||||
|
||||
jsr _mono_gotoy
|
||||
jsr popa
|
||||
jsr _mono_gotox
|
||||
rts
|
||||
.endproc
|
||||
jsr _mono_gotoy
|
||||
jsr popa
|
||||
jsr _mono_gotox
|
||||
rts
|
||||
.endproc
|
||||
|
||||
.proc mono_gotoxy
|
||||
jsr popa
|
||||
jmp _mono_gotoxy
|
||||
.endproc
|
||||
.proc mono_gotoxy
|
||||
jsr popa
|
||||
jmp _mono_gotoxy
|
||||
.endproc
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
; Initialize cursorzone at startup
|
||||
; Offset to cursor zone 5.
|
||||
;
|
||||
.proc mono_blink_cursor
|
||||
inc blink_time
|
||||
bne @L3
|
||||
lda #140
|
||||
sta blink_time
|
||||
ldy #0
|
||||
lda (cursorzone),y
|
||||
cmp #32
|
||||
bne @L1
|
||||
lda #95
|
||||
bne @L2
|
||||
@L1: lda #32
|
||||
@L2: sta (cursorzone),y
|
||||
@L3: rts
|
||||
.endproc
|
||||
.proc mono_blink_cursor
|
||||
inc blink_time
|
||||
bne @L3
|
||||
lda #140
|
||||
sta blink_time
|
||||
ldy #0
|
||||
lda (cursorzone),y
|
||||
cmp #32
|
||||
bne @L1
|
||||
lda #95
|
||||
bne @L2
|
||||
@L1: lda #32
|
||||
@L2: sta (cursorzone),y
|
||||
@L3: rts
|
||||
.endproc
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
; Initialize cursorzone at startup
|
||||
@@ -197,9 +197,9 @@ umula0:
|
||||
;
|
||||
.segment "ONCE"
|
||||
mono_init_cursor:
|
||||
lda #0
|
||||
jsr calccursorzone
|
||||
rts
|
||||
lda #0
|
||||
jsr calccursorzone
|
||||
rts
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
; force the init constructor to be imported
|
||||
|
||||
Reference in New Issue
Block a user