Add QUIT.SYSTEM
This commit is contained in:
parent
ef6d6938c7
commit
836c11c100
4
Makefile
4
Makefile
|
@ -1,12 +1,14 @@
|
||||||
all: prodos_snippits.po
|
all: prodos_snippits.po
|
||||||
|
|
||||||
prodos_snippits.po: bitsy.boot.bin setup.system.bin
|
prodos_snippits.po: bitsy.boot.bin setup.system.bin quit.system.bin
|
||||||
@ProDOS-Utilities -d prodos_snippits.po -c create \
|
@ProDOS-Utilities -d prodos_snippits.po -c create \
|
||||||
-s 280 -v PRODOS.SNIPPITS
|
-s 280 -v PRODOS.SNIPPITS
|
||||||
@ProDOS-Utilities -d prodos_snippits.po -c put \
|
@ProDOS-Utilities -d prodos_snippits.po -c put \
|
||||||
-p BITSY.BOOT -i bitsy.boot.bin -t 0xFF -a 0x2000
|
-p BITSY.BOOT -i bitsy.boot.bin -t 0xFF -a 0x2000
|
||||||
@ProDOS-Utilities -d prodos_snippits.po -c put \
|
@ProDOS-Utilities -d prodos_snippits.po -c put \
|
||||||
-p SETUP.SYSTEM -i setup.system.bin -t 0xFF -a 0x2000
|
-p SETUP.SYSTEM -i setup.system.bin -t 0xFF -a 0x2000
|
||||||
|
@ProDOS-Utilities -d prodos_snippits.po -c put \
|
||||||
|
-p QUIT.SYSTEM -i quit.system.bin -t 0xFF -a 0x2000
|
||||||
@ProDOS-Utilities -c ls -d prodos_snippits.po
|
@ProDOS-Utilities -c ls -d prodos_snippits.po
|
||||||
|
|
||||||
%.bin: %.s
|
%.bin: %.s
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
; QUIT.SYSTEM from ProDOS-2.4.2
|
||||||
|
|
||||||
|
PRODOS_MLI := $BF00
|
||||||
|
INIT := $FB2F
|
||||||
|
HOME := $FC58
|
||||||
|
SETKBD := $FE89
|
||||||
|
SETVID := $FE93
|
||||||
|
|
||||||
|
CLR80COL := $C000
|
||||||
|
CLR80VID := $C00C
|
||||||
|
|
||||||
|
.macpack apple2
|
||||||
|
.setcpu "6502"
|
||||||
|
.org $2000
|
||||||
|
|
||||||
|
sta CLR80VID
|
||||||
|
sta CLR80COL
|
||||||
|
jsr SETVID
|
||||||
|
jsr SETKBD
|
||||||
|
jsr INIT
|
||||||
|
jsr HOME
|
||||||
|
jsr PRODOS_MLI
|
||||||
|
.byte $65 ; quit
|
||||||
|
.word THING
|
||||||
|
scrcode "By John Brooks. 9/15/2016"
|
||||||
|
THING: .byte $04, $00, $00, $00, $00, $00, $00
|
|
@ -24,8 +24,6 @@
|
||||||
|
|
||||||
.macpack apple2
|
.macpack apple2
|
||||||
|
|
||||||
.org $BD00 ;load at $2000, but run at $BD00
|
|
||||||
|
|
||||||
; equates
|
; equates
|
||||||
CH := $24
|
CH := $24
|
||||||
IN2 := $280
|
IN2 := $280
|
||||||
|
@ -46,10 +44,11 @@ SETKBD := $FE89
|
||||||
SETNORM := $FE84
|
SETNORM := $FE84
|
||||||
|
|
||||||
; boot code
|
; boot code
|
||||||
|
.org $BD00 ;load at $2000, but run at $BD00
|
||||||
|
|
||||||
VOLNAME = * ;The first 17 bytes are overwritten with the
|
VOLNAME = * ;The first 17 bytes are overwritten with the
|
||||||
;name of the volume from which this was run.
|
;name of the volume from which this was run.
|
||||||
LDX #1 ;mark page $BD as free in the system bitmap
|
LDX #%00000001 ;mark page $BD as free in the system bitmap
|
||||||
STX BITMAP+23 ;so we can put Online result in our code.
|
STX BITMAP+23 ;so we can put Online result in our code.
|
||||||
DEX ;relocate this program to $BD00-BEFF
|
DEX ;relocate this program to $BD00-BEFF
|
||||||
LOOP1: LDA $2000,X
|
LOOP1: LDA $2000,X
|
||||||
|
@ -72,14 +71,15 @@ ENTER: LDA DEVNUM ;get name of last volume accessed
|
||||||
.byte $C5 ;ONLINE
|
.byte $C5 ;ONLINE
|
||||||
.word ONLINEP
|
.word ONLINEP
|
||||||
|
|
||||||
|
.ifdef OLDANDBUSTED
|
||||||
; this maybe worked with old ProDOS?
|
; this maybe worked with old ProDOS?
|
||||||
; LDA VOLNAME+1 ; 3
|
LDA VOLNAME+1 ; 3
|
||||||
; AND #$0F ; 2
|
AND #$0F ; 2
|
||||||
; TAX ; 1
|
TAX ; 1
|
||||||
; INX ; 1
|
INX ; 1
|
||||||
; STX VOLNAME ; 3
|
STX VOLNAME ; 3
|
||||||
; STA VOLNAME+1 ; 3 = 13
|
STA VOLNAME+1 ; 3 = 13
|
||||||
|
.else
|
||||||
; this does what it was documented as trying to do
|
; this does what it was documented as trying to do
|
||||||
LDX VOLNAME+1 ; 3
|
LDX VOLNAME+1 ; 3
|
||||||
INX ; 1
|
INX ; 1
|
||||||
|
@ -87,6 +87,7 @@ ENTER: LDA DEVNUM ;get name of last volume accessed
|
||||||
LDA #'/' ; 2
|
LDA #'/' ; 2
|
||||||
STA VOLNAME+1 ; 3
|
STA VOLNAME+1 ; 3
|
||||||
NOP ; 1 -- for binary-size compatibility
|
NOP ; 1 -- for binary-size compatibility
|
||||||
|
.endif
|
||||||
|
|
||||||
LDA QUITVECT+1 ;save original quit vector
|
LDA QUITVECT+1 ;save original quit vector
|
||||||
STA QUITMOD1+1
|
STA QUITMOD1+1
|
||||||
|
@ -156,7 +157,7 @@ VOLOK: JSR NEXTFILE ;get name of next file at IN2
|
||||||
; Load and call setup file
|
; Load and call setup file
|
||||||
|
|
||||||
JSR PRODOS ;set prefix to SETUPS
|
JSR PRODOS ;set prefix to SETUPS
|
||||||
.byte $C6 ;SET PREFIX
|
.byte $C6 ;SET PREFIX
|
||||||
.word PFX1P
|
.word PFX1P
|
||||||
JSR READFILE ;read in file whose name is at IN@
|
JSR READFILE ;read in file whose name is at IN@
|
||||||
;and call it if there was no error.
|
;and call it if there was no error.
|
||||||
|
|
Loading…
Reference in New Issue