;license:MIT ;(c) 2021 by Frank M. !cpu 6502 !to "res/DEMO/NI",plain *=$300 !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 #5-1 ; we also need to copy the length byte - lda newpath,x sta $BFD0,x dex bpl - lda #$60 sta $404B jsr $4000 ; decompress lda #$4C sta $8C24 sta $8C35 sta $1669 lda #0 sta $8C24+1 sta $8C35+1 lda #1 sta $8C24+2 sta $8C35+2 ; set exits lda #<(count+1) sta $1669+1 lda #>(count+1) sta $1669+2 ; decrement custom counter after demo cycle and eventually exit +DISABLE_ACCEL jmp $1206 count !byte $03 dec count beq + jmp $128E + jmp $100 newpath !byte 4 !text "X/NI" title !byte x_e-x_b x_b !text "X/NI/NI" x_e !if * > $3F0 { !error "code is too large, ends at ", * }