4cade/src/demo/short.circuit.a
frankmilliron 17df238792
better Short Circuit demo exit (#425)
* Add files via upload

* Add files via upload
2021-11-05 20:31:00 -04:00

64 lines
1.3 KiB
Plaintext

;license:MIT
;(c) 2021 by Frank M.
!cpu 6502
!to "res/DEMO/SHORT.CIRCUIT",plain
*=$210
!source "src/constants.a" ; no code in these
!source "src/macros.a"
+READ_RAM2_WRITE_RAM2
jsr EnableAccelerator
;+LOAD_FILE_KEEP_DIR
ldx #0 ; read to main memory
stx ldrhi
stx ldrlo
+LDADDR title
jsr iLoadFileDirect
ldx #16-1 ; we also need to copy the length byte
- lda newpath,x
sta $BFD0,x
dex
bpl -
lda #$60
sta $207C
jsr $2000 ; decompress
lda #$4C
sta $A248
lda #0
sta $A248+1
sta $A7B4+1
lda #1
sta $A248+2 ; set exit on keypress
sta $A7B4+2 ; set exit at end of demo cycle
lda #$D0
sta $A654
sta $A665
sta $9494
sta $ABD9
sta $1F36
sta $1F3E
sta $9998 ; disable sound
+DISABLE_ACCEL
jmp $A100
newpath
!byte 15
!text "X/SHORT.CIRCUIT"
title !byte x_e-x_b
x_b !text "X/SHORT.CIRCUIT/SHORT.CIRCUIT"
x_e
!if * > $300 {
!error "code is too large, ends at ", *
}