mirror of
https://github.com/A2osX/A2osX.git
synced 2024-06-01 07:41:51 +00:00
Kernel 0.93+
This commit is contained in:
parent
f1797cca6f
commit
e9beaf983c
Binary file not shown.
|
@ -15,7 +15,7 @@ cclock_0
|
||||||
clc set e = 0 to set native mode
|
clc set e = 0 to set native mode
|
||||||
xce
|
xce
|
||||||
* LONG I,M 16 bit mode.
|
* LONG I,M 16 bit mode.
|
||||||
lda #$0000 zero out result space.
|
lda ##$0000 zero out result space.
|
||||||
pha push 4 words for hex time result
|
pha push 4 words for hex time result
|
||||||
pha
|
pha
|
||||||
pha
|
pha
|
||||||
|
|
|
@ -3,7 +3,7 @@ NEW
|
||||||
* object code = mli_1
|
* object code = mli_1
|
||||||
* global page
|
* global page
|
||||||
|
|
||||||
ofsG .EQ $E00-MLI offset to global org
|
ofsG .EQ $2E00-MLI offset to global org
|
||||||
|
|
||||||
H2E00 jmp mlient1 $2E00-2EFF moved to $BF00
|
H2E00 jmp mlient1 $2E00-2EFF moved to $BF00
|
||||||
jspare .EQ *-ofsG
|
jspare .EQ *-ofsG
|
||||||
|
|
|
@ -89,11 +89,11 @@ set3 php
|
||||||
ora #$40
|
ora #$40
|
||||||
bpl H20FD always taken.
|
bpl H20FD always taken.
|
||||||
|
|
||||||
mach2 inc cflag //c or later
|
mach2 inc cflag //c or later
|
||||||
bvs H20FD
|
bvs H20FD
|
||||||
set7 ora #$80
|
set7 ora #$80
|
||||||
|
|
||||||
H20FD sta idapple
|
H20FD sta idapple
|
||||||
lda RROMBNK2 read ROM
|
lda RROMBNK2 read ROM
|
||||||
sec
|
sec
|
||||||
jsr idroutine returns system info
|
jsr idroutine returns system info
|
||||||
|
@ -106,12 +106,12 @@ H20FD sta idapple
|
||||||
|
|
||||||
* running from gs/os shell so zero out os_boot for appletalk
|
* running from gs/os shell so zero out os_boot for appletalk
|
||||||
|
|
||||||
sta >OS_BOOT indicates O/S initially booted.
|
sta OS_BOOT indicates O/S initially booted.
|
||||||
jsr patch101 patch for gs/os - rev note #101
|
jsr patch101 patch for gs/os - rev note #101
|
||||||
|
|
||||||
* put dispatcher in bank 2 of language card
|
* put dispatcher in bank 2 of language card
|
||||||
|
|
||||||
H211D lda LDR.MLIONLINE.P+1 place boot devnum in globals
|
H211D lda LDR.MLIONLINE.P+1 place boot devnum in globals
|
||||||
sta LDR.MLIREADBLOCK.P+1
|
sta LDR.MLIREADBLOCK.P+1
|
||||||
sta devnum last device used
|
sta devnum last device used
|
||||||
jsr devsrch finish setting up globals
|
jsr devsrch finish setting up globals
|
||||||
|
@ -122,7 +122,7 @@ H211D lda LDR.MLIONLINE.P+1 place boot devnum in globals
|
||||||
ldy /rlclk64
|
ldy /rlclk64
|
||||||
jsr reloc
|
jsr reloc
|
||||||
|
|
||||||
H2139 bcs H20CE
|
H2139 bcs H20CE
|
||||||
lda #calldisp
|
lda #calldisp
|
||||||
sta jspare+1 P8 system death vector
|
sta jspare+1 P8 system death vector
|
||||||
lda /calldisp
|
lda /calldisp
|
||||||
|
@ -146,7 +146,7 @@ H2139 bcs H20CE
|
||||||
ldy /dsp64
|
ldy /dsp64
|
||||||
inc newquitflag using old quit code so set flag
|
inc newquitflag using old quit code so set flag
|
||||||
|
|
||||||
H216E jsr reloc
|
H216E jsr reloc
|
||||||
lda #$EE byte to distinguish LC bank 2
|
lda #$EE byte to distinguish LC bank 2
|
||||||
sta $D000
|
sta $D000
|
||||||
jsr lc1in switch in LC bank 1
|
jsr lc1in switch in LC bank 1
|
||||||
|
@ -189,7 +189,7 @@ noramdsk lda RROMWRAMBNK2 read ROM/write RAM bank 2
|
||||||
sty irqv
|
sty irqv
|
||||||
lda #$01
|
lda #$01
|
||||||
|
|
||||||
H21C5 sta irqflag 1 = new roms
|
H21C5 sta irqflag 1 = new roms
|
||||||
stz cortflag assume not Cortland system
|
stz cortflag assume not Cortland system
|
||||||
lda cortland running on a Cortland ?
|
lda cortland running on a Cortland ?
|
||||||
beq H21D5 branch if not.
|
beq H21D5 branch if not.
|
||||||
|
@ -198,16 +198,16 @@ H21C5 sta irqflag 1 = new roms
|
||||||
|
|
||||||
* check for a rom in slot 3. if no rom, use internal $C300 firmware
|
* check for a rom in slot 3. if no rom, use internal $C300 firmware
|
||||||
|
|
||||||
H21D5 sta CLRC3ROM enable internal slot 3 ROM
|
H21D5 sta CLRC3ROM enable internal slot 3 ROM
|
||||||
lda rommap slot ROM bit map
|
lda rommap slot ROM bit map
|
||||||
and #$08 mask all but slot 3
|
and #$08 mask all but slot 3
|
||||||
bne isRROMBNK23 taken if rom in slot 3
|
bne isromin3 taken if rom in slot 3
|
||||||
bra H2247 else continue booting
|
bra H2247 else continue booting
|
||||||
|
|
||||||
* found a rom in slot 3. is it an external, identifiable 80 col card
|
* found a rom in slot 3. is it an external, identifiable 80 col card
|
||||||
* with interrupt routines? if so, enable it else use internal $C300 firmware.
|
* with interrupt routines? if so, enable it else use internal $C300 firmware.
|
||||||
|
|
||||||
isRROMBNK23 sta SETC3ROM enable slot 3 rom
|
isromin3 sta SETC3ROM enable slot 3 rom
|
||||||
lda $C305 check card id bytes
|
lda $C305 check card id bytes
|
||||||
cmp #$38
|
cmp #$38
|
||||||
bne hitswtch not terminal card
|
bne hitswtch not terminal card
|
||||||
|
@ -244,19 +244,19 @@ hitswtch sta CLRC3ROM enable internal $C300 firmware
|
||||||
lsr
|
lsr
|
||||||
lsr txtp2
|
lsr txtp2
|
||||||
cmp txtp2
|
cmp txtp2
|
||||||
|
.BS *-$2230
|
||||||
H2230 sta CLRPAGE2 main memory
|
H2230 sta CLRPAGE2 main memory
|
||||||
sta CLR80STORE disable 80-col store
|
sta CLR80STORE disable 80-col store
|
||||||
beq docard branch if card is there
|
beq docard branch if card is there
|
||||||
lda machid machine ID byte
|
lda machid machine ID byte
|
||||||
and #$FD clear 80-col bit 2 (no card)
|
and #$FD clear 80-col bit 2 (no card)
|
||||||
bne H2244 always
|
bne H2244 always
|
||||||
|
|
||||||
docard lda machid
|
docard lda machid
|
||||||
ora #$02 turn bit 2 on (80-col card is present)
|
ora #$02 turn bit 2 on (80-col card is present)
|
||||||
|
|
||||||
H2244 sta machid
|
H2244 sta machid
|
||||||
H2247 lda cortland are we running on a //gs ?
|
H2247 lda cortland are we running on a //gs ?
|
||||||
beq H225D if not.
|
beq H225D if not.
|
||||||
lda #$4C enable clock routine by putting a jmp
|
lda #$4C enable clock routine by putting a jmp
|
||||||
sta clockv in front of clock vector
|
sta clockv in front of clock vector
|
||||||
|
@ -266,7 +266,7 @@ H2247 lda cortland are we running on a //gs ?
|
||||||
lda #$01 set bit 0 = clock present
|
lda #$01 set bit 0 = clock present
|
||||||
tsb machid
|
tsb machid
|
||||||
|
|
||||||
H225D lda setuprts get setup entry point flag
|
H225D lda setuprts get setup entry point flag
|
||||||
beq H2267 taken if normal boot.
|
beq H2267 taken if normal boot.
|
||||||
lda RROMBNK2 read ROM
|
lda RROMBNK2 read ROM
|
||||||
rts return to caller at setup entry point.
|
rts return to caller at setup entry point.
|
||||||
|
@ -275,7 +275,7 @@ setuprts .DA #$00 0 = normal boot, <>0 = return
|
||||||
|
|
||||||
* set prefix to boot device
|
* set prefix to boot device
|
||||||
|
|
||||||
H2267 jsr MLI online
|
H2267 jsr MLI online
|
||||||
.DA #MLIONLINE
|
.DA #MLIONLINE
|
||||||
.DA LDR.MLIONLINE.P
|
.DA LDR.MLIONLINE.P
|
||||||
bcs relocerr
|
bcs relocerr
|
||||||
|
@ -299,7 +299,7 @@ H2267 jsr MLI online
|
||||||
ldy #$02 read directory into buffer
|
ldy #$02 read directory into buffer
|
||||||
lda /DirBlkBuf
|
lda /DirBlkBuf
|
||||||
|
|
||||||
H228E sta dst+1
|
H228E sta dst+1
|
||||||
sta LDR.MLIREADBLOCK.P+4
|
sta LDR.MLIREADBLOCK.P+4
|
||||||
sty LDR.MLIREADBLOCK.P+5
|
sty LDR.MLIREADBLOCK.P+5
|
||||||
stx LDR.MLIREADBLOCK.P+6
|
stx LDR.MLIREADBLOCK.P+6
|
||||||
|
@ -323,7 +323,7 @@ H228E sta dst+1
|
||||||
cmp /dbuf+$800 until it points past end of buffer.
|
cmp /dbuf+$800 until it points past end of buffer.
|
||||||
bcc H228E if ok, read next block.
|
bcc H228E if ok, read next block.
|
||||||
|
|
||||||
H22B7 jmp lodintrp jmp to 'licode' (load interpreter)
|
H22B7 jmp lodintrp jmp to 'licode' (load interpreter)
|
||||||
|
|
||||||
* relocation/configuration error
|
* relocation/configuration error
|
||||||
|
|
||||||
|
@ -332,25 +332,25 @@ relocerr sta RROMBNK2 read ROM
|
||||||
|
|
||||||
ldy #$1D
|
ldy #$1D
|
||||||
|
|
||||||
.1 lda LDR.MSG.LdrErr,y
|
.1 lda LDR.MSG.LdrErr,y
|
||||||
sta vline12+4,y
|
sta vline12+4,y
|
||||||
dey
|
dey
|
||||||
bpl .1
|
bpl .1
|
||||||
|
|
||||||
bmi *
|
bmi *
|
||||||
|
|
||||||
LDR.MSG.LdrErr .AS "Relocation/Configuration Error"
|
LDR.MSG.LdrErr .AS -"Relocation/Configuration Error"
|
||||||
|
|
||||||
H22EB ldy #$23
|
H22EB ldy #$23
|
||||||
|
|
||||||
.1 lda LDR.MSG.EnhErr,y
|
.1 lda LDR.MSG.EnhErr,y
|
||||||
sta vline14+2,y
|
sta vline14+2,y
|
||||||
dey
|
dey
|
||||||
bpl .1
|
bpl .1
|
||||||
|
|
||||||
bmi *
|
bmi *
|
||||||
|
|
||||||
LDR.MSG.EnhErr .AS "REQUIRES ENHANCED APPLE IIE OR LATER"
|
LDR.MSG.EnhErr .AS -"REQUIRES ENHANCED APPLE IIE OR LATER"
|
||||||
|
|
||||||
LDR.MLIONLINE.P .DA #2
|
LDR.MLIONLINE.P .DA #2
|
||||||
.DA #$60
|
.DA #$60
|
||||||
|
@ -369,399 +369,400 @@ LDR.MLIREADBLOCK.P
|
||||||
cortland .BS 1 cortland loader flag (1 = Cortland)
|
cortland .BS 1 cortland loader flag (1 = Cortland)
|
||||||
newquitflag .BS 1 1 = old quit code
|
newquitflag .BS 1 1 = old quit code
|
||||||
|
|
||||||
H232B .DA #1 move interpreter loader code
|
H232B .DA #1 move interpreter loader code
|
||||||
.DA lodintrp destination address
|
.DA lodintrp destination address
|
||||||
.DA H257B-licode length to move
|
.DA H257B-licode length to move
|
||||||
.DA licode source address
|
.DA licode source address
|
||||||
.DA #$01 move $3F0 vectors
|
.DA #$01 move $3F0 vectors
|
||||||
.DA p3vect destination
|
.DA p3vect destination
|
||||||
.DA $0010 16 bytes to move
|
.DA $0010 16 bytes to move
|
||||||
.DA H257B source
|
.DA H257B source
|
||||||
.DA #$01
|
.DA #$01
|
||||||
.DA lookptr
|
.DA lookptr
|
||||||
.DA $0002
|
.DA $0002
|
||||||
.DA dst
|
.DA dst
|
||||||
.DA #$01 move 128k test to zero page
|
.DA #$01 move 128k test to zero page
|
||||||
.DA tst128 destination
|
.DA tst128 destination
|
||||||
.DA LDR.Test128.Len
|
.DA LDR.Test128.Len
|
||||||
.DA LDR.Test128
|
.DA LDR.Test128
|
||||||
.HS FF done
|
.HS FF done
|
||||||
|
|
||||||
dsp64 .DA #$01 move p8 dispatcher code
|
dsp64 .DA #$01 move p8 dispatcher code
|
||||||
.DA displc2 destination
|
.DA displc2 destination
|
||||||
.DA birdbye-disp1obj length (must be <= 3 pages)
|
.DA birdbye-disp1obj length (must be <= 3 pages)
|
||||||
.DA disp1obj source
|
.DA disp1obj source
|
||||||
.HS FF done
|
.HS FF done
|
||||||
|
|
||||||
newquitbl .DA #$01 move Bird's Bye code
|
newquitbl .DA #$01 move Bird's Bye code
|
||||||
.DA displc2 dest
|
.DA displc2 dest
|
||||||
.DA GQdisp-birdbye length (must be <= 3 pages)
|
.DA GQdisp-birdbye length (must be <= 3 pages)
|
||||||
.DA birdbye source
|
.DA birdbye source
|
||||||
.HS FF done
|
.HS FF done
|
||||||
|
|
||||||
altdsptbl .DA #$01 move GQuit launcher
|
altdsptbl .DA #$01 move GQuit launcher
|
||||||
.DA displc2 destination
|
.DA displc2 destination
|
||||||
.DA $0300 length (must be <= 3 pages)
|
.DA $0300 length (must be <= 3 pages)
|
||||||
.DA GQdisp source
|
.DA GQdisp source
|
||||||
.DA #$01 move a copy of GQuit launcher
|
.DA #$01 move a copy of GQuit launcher
|
||||||
.DA dispadr to dispadr for gsos
|
.DA dispadr to dispadr for gsos
|
||||||
.DA $0300 length (must be <= 3 pages)
|
.DA $0300 length (must be <= 3 pages)
|
||||||
.DA GQdisp source
|
.DA GQdisp source
|
||||||
.HS FF done
|
.HS FF done
|
||||||
|
|
||||||
* tables for moving 64k version of mli for execution
|
* tables for moving 64k version of mli for execution
|
||||||
|
|
||||||
H2367 .DA #$01 relocation table. 1=move src to dst
|
H2367 .DA #$01 relocation table. 1=move src to dst
|
||||||
.DA lanirq destination
|
.DA lanirq destination
|
||||||
.DA H2E00-H2D9B length to move
|
.DA H2E00-H2D9B length to move
|
||||||
.DA H2D9B source
|
.DA H2D9B source
|
||||||
.DA #$01
|
.DA #$01
|
||||||
.DA MLI globals
|
.DA MLI globals
|
||||||
.DA $0100 in one page
|
.DA $0100 in one page
|
||||||
.DA H2E00
|
.DA H2E00
|
||||||
.HS 00 0=clear buffers $D700-$DDFF
|
.HS 00 0=clear buffers $D700-$DDFF
|
||||||
.DA pathbuf
|
.DA pathbuf
|
||||||
.DA xdosorg-pathbuf
|
.DA xdosorg-pathbuf
|
||||||
.DA #$01
|
.DA #$01
|
||||||
.DA xdosorg
|
.DA xdosorg
|
||||||
.DA ramsrc-xdosobj length of mli
|
.DA ramsrc-xdosobj length of mli
|
||||||
.DA xdosobj
|
.DA xdosobj
|
||||||
.DA #$01
|
.DA #$01
|
||||||
.DA rwts
|
.DA rwts
|
||||||
.DA disp1obj-blockio length of disk ii driver
|
.DA disp1obj-blockio length of disk ii driver
|
||||||
.DA blockio
|
.DA blockio
|
||||||
.HS FF done
|
.HS FF done
|
||||||
|
|
||||||
* move thunderclock
|
* move thunderclock
|
||||||
|
|
||||||
rlclk64 .DA #$01 relocation table. 1=move src to dst
|
rlclk64 .DA #$01 relocation table. 1=move src to dst
|
||||||
.DA tclk_in destination
|
.DA tclk_in destination
|
||||||
.DA tclk_end-tclock_0 length of thunderclock driver
|
.DA tclk_end-tclock_0 length of thunderclock driver
|
||||||
.DA tclock_0 source
|
.DA tclock_0 source
|
||||||
.DA #$04 4=relocate and move program
|
.DA #$04 4=relocate and move program
|
||||||
.DA tclk_in
|
.DA tclk_in
|
||||||
.DA H2F69-tclock_0
|
.DA H2F69-tclock_0
|
||||||
.DA tclk_in
|
.DA tclk_in
|
||||||
.HS 00
|
.HS 00
|
||||||
.HS C1C1
|
.HS C1C1
|
||||||
clock64 .DA #$00
|
clock64 .DA #$00
|
||||||
.HS FF done
|
.HS FF done
|
||||||
|
|
||||||
* move cortland clock
|
* move cortland clock
|
||||||
|
|
||||||
cortclock .DA #$01 relocation table. 1=move src to dst
|
cortclock .DA #$01 relocation table. 1=move src to dst
|
||||||
.DA tclk_in destination
|
.DA tclk_in destination
|
||||||
.DA cclk_end-cclock_0 length of cortland clock driver
|
.DA cclk_end-cclock_0 length of cortland clock driver
|
||||||
.DA cclock_0 source
|
.DA cclock_0 source
|
||||||
.HS FF done
|
.HS FF done
|
||||||
|
|
||||||
* load and run appletalk configuration file (atinit) if present
|
* load and run appletalk configuration file (atinit) if present
|
||||||
* or continue loading and running .system file
|
* or continue loading and running .system file
|
||||||
|
|
||||||
* loader origin $800
|
* loader origin $800
|
||||||
|
|
||||||
ofsL .EQ *-lodintrp offset from loader org
|
ofsL .EQ *-lodintrp offset from loader org
|
||||||
|
|
||||||
licode jsr MLI check for file 'atinit'
|
licode jsr MLI check for file 'atinit'
|
||||||
.DA #MLIGETFILEINFO
|
.DA #MLIGETFILEINFO
|
||||||
.DA gfi_list
|
.DA gfi_list
|
||||||
bcc gfi_ok branch if 'atinit' file found
|
bcc gfi_ok branch if 'atinit' file found
|
||||||
cmp #$46 file not found?
|
cmp #$46 file not found?
|
||||||
beq H23DF if so, continue loading interpreter
|
beq H23DF if so, continue loading interpreter
|
||||||
bne H23E2
|
bne H23E2
|
||||||
gfi_ok lda gfi_type
|
gfi_ok lda gfi_type
|
||||||
cmp #$E2 is 'atinit' correct file type?
|
cmp #$E2 is 'atinit' correct file type?
|
||||||
bne H23E2 error - wrong file type
|
bne H23E2 error - wrong file type
|
||||||
jsr MLI open 'atinit' file
|
jsr MLI open 'atinit' file
|
||||||
.DA #$C8
|
.DA #$C8
|
||||||
.DA atopen parms
|
.DA atopen parms
|
||||||
bne H23E2 error
|
bne H23E2 error
|
||||||
lda #$9F max size = 39.75k ($2000-$BF00)
|
lda #$9F max size = 39.75k ($2000-$BF00)
|
||||||
sta rdlen+1
|
sta rdlen+1
|
||||||
stz rdlen
|
stz rdlen
|
||||||
jsr MLI read 'atinit' file to 'sysentry'
|
jsr MLI read 'atinit' file to 'sysentry'
|
||||||
.DA #$CA
|
.DA #$CA
|
||||||
.DA rdparm
|
.DA rdparm
|
||||||
bne H23E2 error - too big
|
bne H23E2 error - too big
|
||||||
jsr MLI close 'atinit' file
|
jsr MLI close 'atinit' file
|
||||||
.DA #$CC
|
.DA #$CC
|
||||||
.DA clparm
|
.DA clparm
|
||||||
bne H23E2 error
|
bne H23E2 error
|
||||||
lda RROMBNK2 enable ROM
|
lda RROMBNK2 enable ROM
|
||||||
jsr sysentry execute ATinit
|
jsr sysentry execute ATinit
|
||||||
H23DF jmp goloadint execute .system file
|
H23DF jmp goloadint execute .system file
|
||||||
|
|
||||||
* fatal error
|
* fatal error
|
||||||
|
|
||||||
H23E2 ldx H23F0
|
H23E2 ldx H23F0
|
||||||
H23E5 lda H23F0,x
|
H23E5 lda H23F0,x
|
||||||
sta vline16,x
|
sta vline16,x
|
||||||
dex
|
dex
|
||||||
bne H23E5
|
bne H23E5
|
||||||
beq *
|
beq *
|
||||||
|
|
||||||
H23F0 .DA #$1A length of message
|
H23F0 .DA #$1A length of message
|
||||||
.AS "Unable to load ATInit file"
|
.AS -"Unable to load ATInit file"
|
||||||
|
|
||||||
gfi_list .EQ *-ofsL
|
gfi_list .EQ *-ofsL
|
||||||
.DA #$0A
|
.DA #$0A
|
||||||
.DA atinitname
|
.DA atinitname
|
||||||
.HS 00
|
.HS 00
|
||||||
gfi_type .EQ *-ofsL
|
gfi_type .EQ *-ofsL
|
||||||
.HS 00000000
|
.HS 00000000
|
||||||
.HS 0000000000000000
|
.HS 0000000000000000
|
||||||
.HS 0000
|
.HS 0000
|
||||||
atopen .EQ *-ofsL parms to open 'atinit'
|
atopen .EQ *-ofsL parms to open 'atinit'
|
||||||
.HS 03
|
.HS 03
|
||||||
.DA atinitname
|
.DA atinitname
|
||||||
.DA iobuf i/o buffer
|
.DA iobuf i/o buffer
|
||||||
.HS 01 ref# hard coded since no other files
|
.HS 01 ref# hard coded since no other files
|
||||||
atinitname .EQ *-ofsL
|
atinitname .EQ *-ofsL
|
||||||
.DA #06 length of name
|
.DA #06 length of name
|
||||||
.AS "atinit" name of appletalk config file
|
.AS -"atinit" name of appletalk config file
|
||||||
goloadint .EQ *-ofsL
|
goloadint .EQ *-ofsL
|
||||||
lda /dbuf search directory buffer
|
|
||||||
sta idxl+1
|
lda /dbuf search directory buffer
|
||||||
lda #$04 start 1 entry past header
|
sta idxl+1
|
||||||
bne H2434 always.
|
lda #$04 start 1 entry past header
|
||||||
H2432 lda idxl calc next entry position
|
bne H2434 always.
|
||||||
H2434 clc
|
H2432 lda idxl calc next entry position
|
||||||
adc dbuf+35 inc to next entry address
|
H2434 clc
|
||||||
sta idxl
|
adc dbuf+35 inc to next entry address
|
||||||
bcs H2451 branch if page cross.
|
sta idxl
|
||||||
adc dbuf+35 test for end of block.
|
bcs H2451 branch if page cross.
|
||||||
bcc H2453 branch if not page cross
|
adc dbuf+35 test for end of block.
|
||||||
lda idxl+1
|
bcc H2453 branch if not page cross
|
||||||
lsr end of block?
|
lda idxl+1
|
||||||
bcc H2453 no.
|
lsr end of block?
|
||||||
cmp #$09 end of directory?
|
bcc H2453 no.
|
||||||
bne H244D no.
|
cmp #$09 end of directory?
|
||||||
jmp nointrp no interpreter, go quit.
|
bne H244D no.
|
||||||
H244D lda #$04 reset index to 1st entry in next block.
|
jmp nointrp no interpreter, go quit.
|
||||||
sta idxl
|
H244D lda #$04 reset index to 1st entry in next block.
|
||||||
H2451 inc idxl+1 inc to next page.
|
sta idxl
|
||||||
H2453 ldy #$10 check file type.
|
H2451 inc idxl+1 inc to next page.
|
||||||
lda #$FF must be a prodos sys file
|
H2453 ldy #$10 check file type.
|
||||||
eor (idxl),y
|
lda #$FF must be a prodos sys file
|
||||||
bne H2432 if not sys.
|
eor (idxl),y
|
||||||
tay see if active
|
bne H2432 if not sys.
|
||||||
lda (idxl),y
|
tay see if active
|
||||||
beq H2432 if deleted file.
|
lda (idxl),y
|
||||||
and #$0F strip file 'kind'.
|
beq H2432 if deleted file.
|
||||||
sta pbuf save length of name.
|
and #$0F strip file 'kind'.
|
||||||
cmp #$08 must be at least 'x.system'
|
sta pbuf save length of name.
|
||||||
bcc H2432 else, ignore it.
|
cmp #$08 must be at least 'x.system'
|
||||||
tay compare last 7 chars for '.system'
|
bcc H2432 else, ignore it.
|
||||||
ldx #$06
|
tay compare last 7 chars for '.system'
|
||||||
H246C lda (idxl),y
|
ldx #$06
|
||||||
eor iterp,x
|
H246C lda (idxl),y
|
||||||
asl
|
eor iterp,x
|
||||||
bne H2432 branch if something else
|
asl
|
||||||
dey
|
bne H2432 branch if something else
|
||||||
dex
|
dey
|
||||||
bpl H246C
|
dex
|
||||||
ldy #$00
|
bpl H246C
|
||||||
H247A iny
|
ldy #$00
|
||||||
lda (idxl),y
|
H247A iny
|
||||||
sta pbuf,y
|
lda (idxl),y
|
||||||
ora #$80 msb on so can be displayed if error
|
sta pbuf,y
|
||||||
sta iomess+$11,y
|
ora #$80 msb on so can be displayed if error
|
||||||
cpy pbuf
|
sta iomess+$11,y
|
||||||
bne H247A
|
cpy pbuf
|
||||||
lda #$A0 space after name
|
bne H247A
|
||||||
sta iomess+$12,y
|
lda #$A0 space after name
|
||||||
tya error message length
|
sta iomess+$12,y
|
||||||
adc #$13 (carry set)
|
tya error message length
|
||||||
sta ierlen
|
adc #$13 (carry set)
|
||||||
jsr MLI open interpreter file
|
sta ierlen
|
||||||
.DA #$C8
|
jsr MLI open interpreter file
|
||||||
.DA opparm
|
.DA #$C8
|
||||||
bne badlod
|
.DA opparm
|
||||||
jsr MLI get eof (length of file)
|
bne badlod
|
||||||
.DA #$D1
|
jsr MLI get eof (length of file)
|
||||||
.DA efparm
|
.DA #$D1
|
||||||
bne badlod
|
.DA efparm
|
||||||
lda eof+2
|
bne badlod
|
||||||
bne toolong
|
lda eof+2
|
||||||
lda eof+1
|
bne toolong
|
||||||
cmp #$9F max size = 39.75k ($2000-$BF00)
|
lda eof+1
|
||||||
bcs toolong
|
cmp #$9F max size = 39.75k ($2000-$BF00)
|
||||||
sta rdlen+1
|
bcs toolong
|
||||||
lda eof
|
sta rdlen+1
|
||||||
sta rdlen (read entire file)
|
lda eof
|
||||||
jsr MLI read interpreter file
|
sta rdlen (read entire file)
|
||||||
.DA #$CA
|
jsr MLI read interpreter file
|
||||||
.DA rdparm
|
.DA #$CA
|
||||||
beq H24C8 go close if successfully read.
|
.DA rdparm
|
||||||
cmp #$56 memory conflict?
|
beq H24C8 go close if successfully read.
|
||||||
beq toolong then too large
|
cmp #$56 memory conflict?
|
||||||
bne badlod else, unable to load.
|
beq toolong then too large
|
||||||
H24C8 jsr MLI close interpreter file
|
bne badlod else, unable to load.
|
||||||
.DA #$CC
|
H24C8 jsr MLI close interpreter file
|
||||||
.DA clparm
|
.DA #$CC
|
||||||
bne badlod hopefully never taken
|
.DA clparm
|
||||||
|
bne badlod hopefully never taken
|
||||||
|
|
||||||
* if booting on a //c then see if esc is in keyboard buffer
|
* if booting on a //c then see if esc is in keyboard buffer
|
||||||
* and clear it. it may have been pressed to shift speed
|
* and clear it. it may have been pressed to shift speed
|
||||||
* of accelerator chip
|
* of accelerator chip
|
||||||
|
|
||||||
lda cflag
|
lda cflag
|
||||||
beq H24DF taken if not booting on a //c
|
beq H24DF taken if not booting on a //c
|
||||||
lda kbd else, check for keypress
|
lda kbd else, check for keypress
|
||||||
cmp #$9B escape?
|
cmp #$9B escape?
|
||||||
bne H24DF if not.
|
bne H24DF if not.
|
||||||
sta KBDSTROBE clear keyboard
|
sta KBDSTROBE clear keyboard
|
||||||
H24DF lda RROMBNK2 enable ROM
|
H24DF lda RROMBNK2 enable ROM
|
||||||
jmp sysentry go run interpreter
|
jmp sysentry go run interpreter
|
||||||
cflag .EQ *-ofsL
|
cflag .EQ *-ofsL
|
||||||
.HS 00 set if a //c.
|
.HS 00 set if a //c.
|
||||||
nointrp .EQ *-ofsL no interpreter found,
|
nointrp .EQ *-ofsL no interpreter found,
|
||||||
jsr MLI so quit.
|
jsr MLI so quit.
|
||||||
.DA #$65
|
.DA #$65
|
||||||
.DA quitparm
|
.DA quitparm
|
||||||
badlod ldy ierlen center the error message
|
badlod ldy ierlen center the error message
|
||||||
lda #$27
|
lda #$27
|
||||||
sec
|
sec
|
||||||
sbc ierlen
|
sbc ierlen
|
||||||
lsr
|
lsr
|
||||||
adc ierlen
|
adc ierlen
|
||||||
tax
|
tax
|
||||||
H24FA lda iomess,y
|
H24FA lda iomess,y
|
||||||
sta vline16,x
|
sta vline16,x
|
||||||
dex
|
dex
|
||||||
dey
|
dey
|
||||||
bpl H24FA
|
bpl H24FA
|
||||||
bmi H2511
|
bmi H2511
|
||||||
toolong ldy #$1E
|
toolong ldy #$1E
|
||||||
H2508 lda lgmess,y
|
H2508 lda lgmess,y
|
||||||
sta vline16+5,y
|
sta vline16+5,y
|
||||||
dey
|
dey
|
||||||
bpl H2508
|
bpl H2508
|
||||||
H2511 bmi H2511
|
H2511 bmi H2511
|
||||||
lgmess .EQ *-ofsL
|
lgmess .EQ *-ofsL
|
||||||
.AS "** System program too large **"
|
.AS -"** System program too large **"
|
||||||
iomess .EQ *-ofsL
|
iomess .EQ *-ofsL
|
||||||
.AS "** Unable to load"
|
.AS -"** Unable to load"
|
||||||
.AS " X.System *********"
|
.AS -" X.System *********"
|
||||||
ierlen .EQ *-ofsL
|
ierlen .EQ *-ofsL
|
||||||
.HS 00
|
.HS 00
|
||||||
opparm .EQ *-ofsL parms for open call
|
opparm .EQ *-ofsL parms for open call
|
||||||
.HS 03
|
.HS 03
|
||||||
.DA pbuf
|
.DA pbuf
|
||||||
.DA iobuf
|
.DA iobuf
|
||||||
.HS 01
|
.HS 01
|
||||||
efparm .EQ *-ofsL parms for get eof call
|
efparm .EQ *-ofsL parms for get eof call
|
||||||
.HS 02
|
.HS 02
|
||||||
.DA #01
|
.DA #01
|
||||||
eof .EQ *-ofsL
|
eof .EQ *-ofsL
|
||||||
.HS 000000 length of file.
|
.HS 000000 length of file.
|
||||||
rdparm .EQ *-ofsL parms for read call
|
rdparm .EQ *-ofsL parms for read call
|
||||||
.HS 04
|
.HS 04
|
||||||
.HS 01
|
.HS 01
|
||||||
.DA sysentry
|
.DA sysentry
|
||||||
rdlen .EQ *-ofsL
|
rdlen .EQ *-ofsL
|
||||||
.HS 0000
|
.HS 0000
|
||||||
.HS 0000
|
.HS 0000
|
||||||
clparm .EQ *-ofsL parms for close call
|
clparm .EQ *-ofsL parms for close call
|
||||||
.HS 01
|
.HS 01
|
||||||
.HS 00
|
.HS 00
|
||||||
quitparm .EQ *-ofsL parms for quit call
|
quitparm .EQ *-ofsL parms for quit call
|
||||||
.HS 04
|
.HS 04
|
||||||
.HS 00
|
.HS 00
|
||||||
.HS 0000
|
.HS 0000
|
||||||
.HS 00
|
.HS 00
|
||||||
.HS 0000
|
.HS 0000
|
||||||
iterp .EQ *-ofsL interpreter suffix that is required
|
iterp .EQ *-ofsL interpreter suffix that is required
|
||||||
.AS ".SYSTEM"
|
.AS -".SYSTEM"
|
||||||
|
|
||||||
* 16 bytes moved to $03F0 vectors
|
* 16 bytes moved to $03F0 vectors
|
||||||
|
|
||||||
H257B .DA breakv
|
H257B .DA breakv
|
||||||
.DA oldrst
|
.DA oldrst
|
||||||
.DA #$5A powerup byte
|
.DA #$5A powerup byte
|
||||||
jmp oldrst '&' vector
|
jmp oldrst '&' vector
|
||||||
jmp oldrst ctrl-y vector
|
jmp oldrst ctrl-y vector
|
||||||
.HS 004000
|
.HS 004000
|
||||||
.DA irqent global page interrupt vector
|
.DA irqent global page interrupt vector
|
||||||
lc1in lda RRAMWRAMBNK1 read/write language card RAM bank 1
|
lc1in lda RRAMWRAMBNK1 read/write language card RAM bank 1
|
||||||
lda RRAMWRAMBNK1
|
lda RRAMWRAMBNK1
|
||||||
rts
|
rts
|
||||||
|
|
||||||
* determine which system model and save in machine id (idapple)
|
* determine which system model and save in machine id (idapple)
|
||||||
|
|
||||||
whchrom stz idapple assume standard apple //
|
whchrom stz idapple assume standard apple //
|
||||||
ldx version check hardware id
|
ldx version check hardware id
|
||||||
cpx #$38 is it apple // (autostart rom)?
|
cpx #$38 is it apple // (autostart rom)?
|
||||||
beq H25BE if yes
|
beq H25BE if yes
|
||||||
lda #$80
|
lda #$80
|
||||||
cpx #$06 apple //e?
|
cpx #$06 apple //e?
|
||||||
beq H25BC if yes
|
beq H25BC if yes
|
||||||
lda #$40
|
lda #$40
|
||||||
cpx #$EA apple //+?
|
cpx #$EA apple //+?
|
||||||
bne H25B6 it not, then machine is unknown.
|
bne H25B6 it not, then machine is unknown.
|
||||||
ldx $FB1E apple /// in emulation?
|
ldx $FB1E apple /// in emulation?
|
||||||
cpx #$AD
|
cpx #$AD
|
||||||
beq H25BC taken if apple //+.
|
beq H25BC taken if apple //+.
|
||||||
lda #$D0 test again for apple /// emulation
|
lda #$D0 test again for apple /// emulation
|
||||||
cpx #$8A because will only have 48k memory.
|
cpx #$8A because will only have 48k memory.
|
||||||
bne H25B6 if taken, then machine is unknown.
|
bne H25B6 if taken, then machine is unknown.
|
||||||
H25B4 sec apple /// emulation is not allowed
|
H25B4 sec apple /// emulation is not allowed
|
||||||
rts because insufficient memory.
|
rts because insufficient memory.
|
||||||
H25B6 lda #$02 machine unknown
|
H25B6 lda #$02 machine unknown
|
||||||
sta (dst),y
|
sta (dst),y
|
||||||
bne H25D9 always.
|
bne H25D9 always.
|
||||||
H25BC sta idapple save machine id
|
H25BC sta idapple save machine id
|
||||||
|
|
||||||
* check for language card ram
|
* check for language card ram
|
||||||
|
|
||||||
H25BE jsr lc1in switch in language card bank 1
|
H25BE jsr lc1in switch in language card bank 1
|
||||||
lda #$AA
|
lda #$AA
|
||||||
sta $D000
|
sta $D000
|
||||||
eor $D000 if LC present, result = 0.
|
eor $D000 if LC present, result = 0.
|
||||||
bne H25B4 othewise, insufficient memory.
|
bne H25B4 othewise, insufficient memory.
|
||||||
lsr $D000 check lc again
|
lsr $D000 check lc again
|
||||||
lda #$55
|
lda #$55
|
||||||
eor $D000
|
eor $D000
|
||||||
bne H25B4 not sufficent memory.
|
bne H25B4 not sufficent memory.
|
||||||
lda #$20 LC ram is available
|
lda #$20 LC ram is available
|
||||||
ora idapple
|
ora idapple
|
||||||
H25D9 jmp tst128 jumps to page 0 routine below
|
H25D9 jmp tst128 jumps to page 0 routine below
|
||||||
|
|
||||||
* test for 128k. use page 0 for this routine
|
* test for 128k. use page 0 for this routine
|
||||||
|
|
||||||
LDR.Test128 sta idapple H25DC-2621 was moved to location tst128
|
LDR.Test128 sta idapple H25DC-2621 was moved to location tst128
|
||||||
bpl not128 if already determined < 128k
|
bpl not128 if already determined < 128k
|
||||||
lda #$EE
|
lda #$EE
|
||||||
sta SETWRITEAUX write to aux mem while on main zp
|
sta SETWRITEAUX write to aux mem while on main zp
|
||||||
sta SETREADAUX and read aux mem.
|
sta SETREADAUX and read aux mem.
|
||||||
sta dbuf write these locs just to test aux mem
|
sta dbuf write these locs just to test aux mem
|
||||||
sta lodintrp 1k apart from each other.
|
sta lodintrp 1k apart from each other.
|
||||||
lda dbuf
|
lda dbuf
|
||||||
cmp #$EE
|
cmp #$EE
|
||||||
bne noaux
|
bne noaux
|
||||||
asl dbuf may be sparse mem mapping so
|
asl dbuf may be sparse mem mapping so
|
||||||
asl change value and see what happens.
|
asl change value and see what happens.
|
||||||
cmp dbuf
|
cmp dbuf
|
||||||
bne noaux branch if not sparse mapping.
|
bne noaux branch if not sparse mapping.
|
||||||
cmp lodintrp
|
cmp lodintrp
|
||||||
bne H2606 if not sparse.
|
bne H2606 if not sparse.
|
||||||
noaux sec no aux memory available.
|
noaux sec no aux memory available.
|
||||||
bcs H2607
|
bcs H2607
|
||||||
H2606 clc
|
H2606 clc
|
||||||
H2607 sta CLRWRITEAUX switch back to main memory
|
H2607 sta CLRWRITEAUX switch back to main memory
|
||||||
sta CLRREADAUX
|
sta CLRREADAUX
|
||||||
bcs not128 if < 128k
|
bcs not128 if < 128k
|
||||||
lda idapple
|
lda idapple
|
||||||
ora #$30 set id = 128k present
|
ora #$30 set id = 128k present
|
||||||
sta idapple
|
sta idapple
|
||||||
not128 lda lookptr+1
|
not128 lda lookptr+1
|
||||||
sec
|
sec
|
||||||
sbc #$05
|
sbc #$05
|
||||||
sta lookptr+1
|
sta lookptr+1
|
||||||
bcs H2620
|
bcs H2620
|
||||||
dec lookptr
|
dec lookptr
|
||||||
H2620 clc
|
H2620 clc
|
||||||
rts
|
rts
|
||||||
LDR.Test128.len .EQ *-LDR.Test128
|
LDR.Test128.len .EQ *-LDR.Test128
|
||||||
MAN
|
MAN
|
||||||
SAVE USR/SRC/PRODOS.203/PRODOS.S.LDR.A
|
SAVE USR/SRC/PRODOS.203/PRODOS.S.LDR.A
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -305,7 +305,7 @@ BITMAP .EQ *-ofsR0
|
||||||
.HS FFFFFFFE
|
.HS FFFFFFFE
|
||||||
VDIR .EQ *-ofsR0 start of vdir.
|
VDIR .EQ *-ofsR0 start of vdir.
|
||||||
.HS F3 storage type = F, name length = 3
|
.HS F3 storage type = F, name length = 3
|
||||||
.AS "RAM"
|
.AS -"RAM"
|
||||||
access .EQ *-ofsR0
|
access .EQ *-ofsR0
|
||||||
.DA #$C3 destroy, rename, read enabled
|
.DA #$C3 destroy, rename, read enabled
|
||||||
.HS 27 entry length
|
.HS 27 entry length
|
||||||
|
|
|
@ -18,7 +18,7 @@ ofsQ .EQ *-dispadr offset to GQuit dispatcher org
|
||||||
GQdisp lda RRAMWRAMBNK1 read/write LC bank 1
|
GQdisp lda RRAMWRAMBNK1 read/write LC bank 1
|
||||||
clc
|
clc
|
||||||
xce 16 bit native mode.
|
xce 16 bit native mode.
|
||||||
jmp >P8QUIT go to GQuit.
|
jmp P8QUIT go to GQuit.
|
||||||
.DA #0000000000 offset to paragraph boundary.
|
.DA #0000000000 offset to paragraph boundary.
|
||||||
.AS "GQ" id bytes so GQuit can identify this
|
.AS "GQ" id bytes so GQuit can identify this
|
||||||
|
|
||||||
|
|
|
@ -4,9 +4,9 @@ NEW
|
||||||
*
|
*
|
||||||
* allocate buffer in memory tables
|
* allocate buffer in memory tables
|
||||||
|
|
||||||
alcbuffr .EQ *-ofsX
|
alcbuffr .EQ *-ofsX
|
||||||
ldy #$04 index to user specified buffer.
|
ldy #$04 index to user specified buffer.
|
||||||
alcbufr1 .EQ *-ofsX
|
alcbufr1 .EQ *-ofsX
|
||||||
lda (A3L),y this buffer must be on a page boundary.
|
lda (A3L),y this buffer must be on a page boundary.
|
||||||
tax save for validation.
|
tax save for validation.
|
||||||
cmp #$08
|
cmp #$08
|
||||||
|
@ -22,7 +22,7 @@ alcbufr1 .EQ *-ofsX
|
||||||
inx
|
inx
|
||||||
inx
|
inx
|
||||||
inx
|
inx
|
||||||
L4DED dex test for conflicts.
|
L4DED dex test for conflicts.
|
||||||
jsr cmembit test for free buffer space
|
jsr cmembit test for free buffer space
|
||||||
and memmap,y P8 memory bitmap
|
and memmap,y P8 memory bitmap
|
||||||
bne L4E1E report memory conflict, if any.
|
bne L4E1E report memory conflict, if any.
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
NEW
|
NEW
|
||||||
AUTO 3,1
|
AUTO 3,1
|
||||||
.LIST OFF
|
.LIST OFF
|
||||||
.OP 65816
|
.OP 65816
|
||||||
.OR $0000
|
.OR $0000
|
||||||
.TF PRODOS203,TSYS
|
.TF PRODOS203,TSYS
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.INB INC/ZP.I
|
.INB INC/ZP.I
|
||||||
.INB INC/IO.I
|
.INB INC/IO.I
|
||||||
.INB INC/MONITOR.I
|
.INB INC/MONITOR.I
|
||||||
.INB INC/MLI.I
|
.INB INC/MLI.I
|
||||||
.INB INC/MLI.E.I
|
.INB INC/MLI.E.I
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
MMStartUp .EQ $0202
|
MMStartUp .EQ $0202
|
||||||
NewHandle .EQ $0902
|
NewHandle .EQ $0902
|
||||||
|
@ -20,10 +20,12 @@ MMShutDown .EQ $0303
|
||||||
ReadTimeHex .EQ $0D03
|
ReadTimeHex .EQ $0D03
|
||||||
Int2Hex .EQ $220B
|
Int2Hex .EQ $220B
|
||||||
TLTextMountVolume .EQ $1201
|
TLTextMountVolume .EQ $1201
|
||||||
|
*--------------------------------------
|
||||||
.MA IIGS
|
.MA IIGS
|
||||||
ldx ##]1
|
ldx ##]1
|
||||||
jsl $E10000
|
jsl $E10000
|
||||||
.EM
|
.EM
|
||||||
|
*--------------------------------------
|
||||||
P8QUIT .EQ $E0D000
|
P8QUIT .EQ $E0D000
|
||||||
GSOS .EQ $E100A8
|
GSOS .EQ $E100A8
|
||||||
GSOS2 .EQ $E100B0
|
GSOS2 .EQ $E100B0
|
||||||
|
@ -156,7 +158,7 @@ lcdest .EQ $FF00
|
||||||
* $5D00 sel_1 enhanced quit code (Bird's Better Bye)
|
* $5D00 sel_1 enhanced quit code (Bird's Better Bye)
|
||||||
* $6000 sel_2 GQuit dispatcher support
|
* $6000 sel_2 GQuit dispatcher support
|
||||||
|
|
||||||
.PH $2000
|
.PH $2000
|
||||||
|
|
||||||
.INB USR/SRC/PRODOS.203/PRODOS.S.LDR.A
|
.INB USR/SRC/PRODOS.203/PRODOS.S.LDR.A
|
||||||
.INB USR/SRC/PRODOS.203/PRODOS.S.LDR.B
|
.INB USR/SRC/PRODOS.203/PRODOS.S.LDR.B
|
||||||
|
@ -179,7 +181,7 @@ lcdest .EQ $FF00
|
||||||
.INB USR/SRC/PRODOS.203/PRODOS.S.SEL1
|
.INB USR/SRC/PRODOS.203/PRODOS.S.SEL1
|
||||||
.INB USR/SRC/PRODOS.203/PRODOS.S.SEL2
|
.INB USR/SRC/PRODOS.203/PRODOS.S.SEL2
|
||||||
|
|
||||||
.EP
|
.EP
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
MAN
|
MAN
|
||||||
SAVE USR/SRC/PRODOS.203/PRODOS.S
|
SAVE USR/SRC/PRODOS.203/PRODOS.S
|
||||||
|
|
Loading…
Reference in New Issue
Block a user