Removed (pretty inconsistently used) tab chars from source code base.

This commit is contained in:
Oliver Schmidt
2013-05-09 13:56:54 +02:00
parent 44fd1082ae
commit 85885001b1
1773 changed files with 62864 additions and 62868 deletions

View File

@@ -13,79 +13,79 @@
; If you change the numbers there, then change them here, too.
;
.export _clock, __clk_tck, clock_count
.interruptor update_clock, 2 ; (low priority)
.constructor init_clock
.export _clock, __clk_tck, clock_count
.interruptor update_clock, 2 ; (low priority)
.constructor init_clock
.import sreg: zp
.include "lynx.inc"
.import sreg: zp
.include "lynx.inc"
.macpack generic
.macpack generic
.proc _clock
php
sei ; Disable interrupts
.proc _clock
php
sei ; Disable interrupts
; Read the clock counter.
lda clock_count
ldx clock_count+1
ldy clock_count+2
lda clock_count
ldx clock_count+1
ldy clock_count+2
plp ; Re-enable interrupts
sty sreg
stz sreg+1 ; Promote 24 bits up to 32 bits
rts
.endproc
plp ; Re-enable interrupts
sty sreg
stz sreg+1 ; Promote 24 bits up to 32 bits
rts
.endproc
;-----------------------------------------------------------------------------
; Return the number of clock ticks in one second.
;
__clk_tck:
ldx #$00 ; >50, >60, >75
ldy PBKUP
lda #<75
cpy #$20 + 1
blt @ok
lda #<60
cpy #$29 + 1
blt @ok
lda #<50
@ok: stz sreg ; return 32 bits
stz sreg+1
rts
ldx #$00 ; >50, >60, >75
ldy PBKUP
lda #<75
cpy #$20 + 1
blt @ok
lda #<60
cpy #$29 + 1
blt @ok
lda #<50
@ok: stz sreg ; return 32 bits
stz sreg+1
rts
;-----------------------------------------------------------------------------
; This interrupt handler increments a 24-bit counter at every video
; vertical-blanking time.
;
.segment "LOWCODE"
.segment "LOWCODE"
update_clock:
lda INTSET
and #%00000100
beq @NotVBlank ; Not vertical-blank interrupt
lda INTSET
and #%00000100
beq @NotVBlank ; Not vertical-blank interrupt
inc clock_count
bne @L1
inc clock_count+1
bne @L1
inc clock_count+2
@L1: ;clc ; General interrupt was not reset
inc clock_count
bne @L1
inc clock_count+1
bne @L1
inc clock_count+2
@L1: ;clc ; General interrupt was not reset
@NotVBlank:
rts
rts
;-----------------------------------------------------------------------------
; Enable the interrupt that update_clock needs.
;
.segment "INIT"
.segment "INIT"
init_clock:
lda #%10000000
tsb VTIMCTLA
rts
lda #%10000000
tsb VTIMCTLA
rts
;-----------------------------------------------------------------------------
;
.bss
.bss
clock_count:
.res 3
.res 3