First public commit.
This commit is contained in:
parent
2a48f52979
commit
4bac9d83ed
288 changed files with 18417 additions and 1076 deletions
48
lenser/atari/viewer/awyt.i
Normal file
48
lenser/atari/viewer/awyt.i
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
; Shared "how long to show the picture" epilogue for the Atari viewers.
|
||||
; Selected at assembly time by WAITMODE (set by atari/viewer/assemble.py):
|
||||
; 0 forever -- loop, just defeating attract mode
|
||||
; 1 until a key -- poll CH ($2FC), then warm-start the OS
|
||||
; 2 WAITSECS secs -- count RTCLOK frames (RATE per second), then warm-start
|
||||
; "Exit" warm-starts the OS ($E474); on the XL that brings back a usable system.
|
||||
|
||||
#if WAITMODE == 0
|
||||
awloop:
|
||||
lda #$00
|
||||
sta $4d ; defeat attract mode
|
||||
jmp awloop
|
||||
#endif
|
||||
|
||||
#if WAITMODE == 1
|
||||
lda #$ff
|
||||
sta $2fc ; clear CH (last-key register; $FF = no key)
|
||||
awloop:
|
||||
lda #$00
|
||||
sta $4d
|
||||
lda $2fc
|
||||
cmp #$ff
|
||||
beq awloop
|
||||
lda #$00
|
||||
sta $09 ; clear BOOT? so warmstart enters BASIC, not re-boot
|
||||
jmp $e474 ; warm-start
|
||||
#endif
|
||||
|
||||
#if WAITMODE == 2
|
||||
lda #$00
|
||||
sta $12
|
||||
sta $13
|
||||
sta $14 ; reset RTCLOK frame counter (16-bit in $13,$14)
|
||||
awloop:
|
||||
lda #$00
|
||||
sta $4d
|
||||
lda $13
|
||||
cmp #>(WAITSECS*RATE)
|
||||
bcc awloop
|
||||
bne awdone
|
||||
lda $14
|
||||
cmp #<(WAITSECS*RATE)
|
||||
bcc awloop
|
||||
awdone:
|
||||
lda #$00
|
||||
sta $09 ; clear BOOT? so warmstart enters BASIC, not re-boot
|
||||
jmp $e474 ; warm-start
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue