mirror of
https://github.com/A2osX/A2osX.git
synced 2024-06-13 11:29:44 +00:00
Kernel 0.93+
This commit is contained in:
parent
834281c40b
commit
bdcf96401e
Binary file not shown.
|
@ -8,57 +8,57 @@ NEW
|
||||||
ofsC .EQ cclock_0-tclk_in offset to Cortland clock org
|
ofsC .EQ cclock_0-tclk_in offset to Cortland clock org
|
||||||
|
|
||||||
cclock_0 SHORT I,M 8 bit mode.
|
cclock_0 SHORT I,M 8 bit mode.
|
||||||
lda statereg state register.
|
lda statereg state register.
|
||||||
sta savestate save for restore after tool call.
|
sta savestate save for restore after tool call.
|
||||||
and #$CF clear the read/write aux memory bits.
|
and #$CF clear the read/write aux memory bits.
|
||||||
sta statereg make it real
|
sta statereg make it real
|
||||||
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
|
||||||
pha
|
pha
|
||||||
_ReadTimeHex
|
_ReadTimeHex
|
||||||
SHORT M back to 8 bit to get results from stack
|
SHORT M back to 8 bit to get results from stack
|
||||||
lda savestate restore state register
|
lda savestate restore state register
|
||||||
sta statereg
|
sta statereg
|
||||||
pla pull off seconds and ignore
|
pla pull off seconds and ignore
|
||||||
pla
|
pla
|
||||||
sta p8time minutes
|
sta p8time minutes
|
||||||
pla
|
pla
|
||||||
sta p8time+1 hours
|
sta p8time+1 hours
|
||||||
pla year
|
pla year
|
||||||
H2FB1 cmp #100 out of range?
|
H2FB1 cmp #100 out of range?
|
||||||
bcc H2FB9 no, go ahead and store
|
bcc H2FB9 no, go ahead and store
|
||||||
sbc #$64 else put back in range.
|
sbc #$64 else put back in range.
|
||||||
bra H2FB1 try again
|
bra H2FB1 try again
|
||||||
H2FB9 sta p8date+1 year
|
H2FB9 sta p8date+1 year
|
||||||
pla
|
pla
|
||||||
inc a increment day for Prodos 8 format.
|
inc increment day for Prodos 8 format.
|
||||||
sta p8date day
|
sta p8date day
|
||||||
pla month
|
pla month
|
||||||
inc a increment month for Prodos 8 format.
|
inc increment month for Prodos 8 format.
|
||||||
asl a shift month as it sits in between
|
asl shift month as it sits in between
|
||||||
asl a the year and day values.
|
asl the year and day values.
|
||||||
asl a
|
asl
|
||||||
asl a
|
asl
|
||||||
asl a
|
asl
|
||||||
ora p8date put all but the top bit of month
|
ora p8date put all but the top bit of month
|
||||||
sta p8date value in the day byte.
|
sta p8date value in the day byte.
|
||||||
rol p8date+1 put hi bit of month in low bit of year
|
rol p8date+1 put hi bit of month in low bit of year
|
||||||
pla pull of unused byte
|
pla pull of unused byte
|
||||||
pla pull off day of week. stack now clean.
|
pla pull off day of week. stack now clean.
|
||||||
sec go back to emulation mode
|
sec go back to emulation mode
|
||||||
xce to continue with Prodos 8
|
xce to continue with Prodos 8
|
||||||
rts
|
rts
|
||||||
savestate .EQ *-ofsC
|
savestate .EQ *-ofsC
|
||||||
.HS 00 state of the state register
|
.HS 00 state of the state register
|
||||||
.AS "JIMJAYKERRY&MIKE"
|
.AS "JIMJAYKERRY&MIKE"
|
||||||
.HS 0000000000000000 pad 0's until length
|
.HS 0000000000000000 pad 0's until length
|
||||||
.HS 0000000000000000 of driver = 125 bytes.
|
.HS 0000000000000000 of driver = 125 bytes.
|
||||||
.HS 000000000000
|
.HS 000000000000
|
||||||
cclk_end .EQ * end of obj cclock_0.
|
cclk_end .EQ * end of obj cclock_0.
|
||||||
.HS 000000 pad to page boundary
|
.HS 000000 pad to page boundary
|
||||||
LONGI OFF
|
LONGI OFF
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -8,15 +8,15 @@ ofsG .EQ H2E00-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
|
||||||
jmp jspare will be changed to point to dispatcher.
|
jmp jspare will be changed to point to dispatcher.
|
||||||
clockv .EQ *-ofsG P8 clock vector
|
clockv .EQ *-ofsG P8 clock vector
|
||||||
rts changed to jmp ($4C) if clock present.
|
rts changed to jmp ($4C) if clock present.
|
||||||
.DA tclk_in clock routine entry address.
|
.DA tclk_in clock routine entry address.
|
||||||
p8errv .EQ *-ofsG error reporting hook.
|
p8errv .EQ *-ofsG error reporting hook.
|
||||||
jmp syserr1
|
jmp syserr1
|
||||||
sysdeath .EQ *-ofsG
|
sysdeath .EQ *-ofsG
|
||||||
jmp sysdeath1 system failure hook.
|
jmp sysdeath1 system failure hook.
|
||||||
p8error .EQ *-ofsG P8 error code
|
p8error .EQ *-ofsG P8 error code
|
||||||
.DA #0
|
.DA #0
|
||||||
drivertbl1 .EQ *-ofsG device driver table 1
|
drivertbl1 .EQ *-ofsG device driver table 1
|
||||||
.DA nodevice
|
.DA nodevice
|
||||||
.DA nodevice
|
.DA nodevice
|
||||||
|
@ -36,13 +36,13 @@ drivertbl2 .EQ *-ofsG device driver table 2
|
||||||
.DA nodevice
|
.DA nodevice
|
||||||
.DA nodevice
|
.DA nodevice
|
||||||
devnum .EQ *-ofsG most recent accessed device
|
devnum .EQ *-ofsG most recent accessed device
|
||||||
.DA #0
|
.DA #0
|
||||||
numdevs .EQ *-ofsG count (-1) active devices
|
numdevs .EQ *-ofsG count (-1) active devices
|
||||||
.DA #$ff
|
.DA #$ff
|
||||||
devlist .EQ *-ofsG active device list
|
devlist .EQ *-ofsG active device list
|
||||||
.HS 00000000000000 up to 14 units may be active
|
.HS 00000000000000 up to 14 units may be active
|
||||||
.HS 00000000000000
|
.HS 00000000000000
|
||||||
.DA #0
|
.DA #0
|
||||||
|
|
||||||
.AS "(C)APPLE "
|
.AS "(C)APPLE "
|
||||||
mlient1 .EQ *-ofsG
|
mlient1 .EQ *-ofsG
|
||||||
|
@ -50,83 +50,83 @@ mlient1 .EQ *-ofsG
|
||||||
sei
|
sei
|
||||||
jmp mlicont
|
jmp mlicont
|
||||||
aftirq .EQ *-ofsG irq returns here.
|
aftirq .EQ *-ofsG irq returns here.
|
||||||
sta ramin read/write RAM bank 1
|
sta ramin read/write RAM bank 1
|
||||||
jmp fix45 restore $45 after interrupt in LC
|
jmp fix45 restore $45 after interrupt in LC
|
||||||
oldacc .EQ *-ofsG
|
oldacc .EQ *-ofsG
|
||||||
.DA #0
|
.DA #0
|
||||||
afbank .EQ *-ofsG
|
afbank .EQ *-ofsG
|
||||||
.HS 0
|
.HS 0
|
||||||
|
|
||||||
* memory map of lower 48k. each bit represents 1 page.
|
* memory map of lower 48k. each bit represents 1 page.
|
||||||
* protected pages = 1, unprotected = 0
|
* protected pages = 1, unprotected = 0
|
||||||
|
|
||||||
memmap .EQ *-ofsG P8 memory bitmap
|
memmap .EQ *-ofsG P8 memory bitmap
|
||||||
.HS C000000000000000
|
.HS C000000000000000
|
||||||
.HS 0000000000000000
|
.HS 0000000000000000
|
||||||
.HS 0000000000000001
|
.HS 0000000000000001
|
||||||
|
|
||||||
* table of buffer addresses for currently open files.
|
* table of buffer addresses for currently open files.
|
||||||
* these can only be changed thru the mli call setbuf.
|
* these can only be changed thru the mli call setbuf.
|
||||||
|
|
||||||
buftbl .EQ *-ofsG
|
buftbl .EQ *-ofsG
|
||||||
.HS 0000 file #1
|
.HS 0000 file #1
|
||||||
.HS 0000 file #2
|
.HS 0000 file #2
|
||||||
.HS 0000 file #3
|
.HS 0000 file #3
|
||||||
.HS 0000 file #4
|
.HS 0000 file #4
|
||||||
.HS 0000 file #5
|
.HS 0000 file #5
|
||||||
.HS 0000 file #6
|
.HS 0000 file #6
|
||||||
.HS 0000 file #7
|
.HS 0000 file #7
|
||||||
.HS 0000 file #8
|
.HS 0000 file #8
|
||||||
|
|
||||||
* table of interrupt vectors. these can only be changed
|
* table of interrupt vectors. these can only be changed
|
||||||
* by the mli call allocate_interrupt. values of the registers
|
* by the mli call allocate_interrupt. values of the registers
|
||||||
* at the time of the most recent interrupt are stored here along
|
* at the time of the most recent interrupt are stored here along
|
||||||
* with the address interrupted.
|
* with the address interrupted.
|
||||||
|
|
||||||
inttbl .EQ *-ofsG interrupt table
|
inttbl .EQ *-ofsG interrupt table
|
||||||
.HS 0000 int #1
|
.HS 0000 int #1
|
||||||
.HS 0000 int #2
|
.HS 0000 int #2
|
||||||
.HS 0000 int #3
|
.HS 0000 int #3
|
||||||
.HS 0000 int #4
|
.HS 0000 int #4
|
||||||
p8areg .EQ *-ofsG A register savearea
|
p8areg .EQ *-ofsG A register savearea
|
||||||
.DA #0
|
.DA #0
|
||||||
p8xreg .EQ *-ofsG X register savearea
|
p8xreg .EQ *-ofsG X register savearea
|
||||||
.DA #0
|
.DA #0
|
||||||
p8yreg .EQ *-ofsG Y register savearea
|
p8yreg .EQ *-ofsG Y register savearea
|
||||||
.DA #0
|
.DA #0
|
||||||
p8sreg .EQ *-ofsG S register savearea
|
p8sreg .EQ *-ofsG S register savearea
|
||||||
.DA #0
|
.DA #0
|
||||||
p8preg .EQ *-ofsG P register savearea
|
p8preg .EQ *-ofsG P register savearea
|
||||||
.DA #0
|
.DA #0
|
||||||
bankid .EQ *-ofsG bank ID byte (ROM/RAM)
|
bankid .EQ *-ofsG bank ID byte (ROM/RAM)
|
||||||
.DA #1
|
.DA #1
|
||||||
intadr .EQ *-ofsG interrupt return address
|
intadr .EQ *-ofsG interrupt return address
|
||||||
.HS 0000
|
.HS 0000
|
||||||
p8date .EQ *-ofsG bits 15-9=yr, 8-5=mo, 4-0=day
|
p8date .EQ *-ofsG bits 15-9=yr, 8-5=mo, 4-0=day
|
||||||
.HS 0000
|
.HS 0000
|
||||||
p8time .EQ *-ofsG bits 12-8=hr, 5-0=min, low-hi format
|
p8time .EQ *-ofsG bits 12-8=hr, 5-0=min, low-hi format
|
||||||
.HS 0000
|
.HS 0000
|
||||||
flevel .EQ *-ofsG current file level
|
flevel .EQ *-ofsG current file level
|
||||||
.DA #0
|
.DA #0
|
||||||
bubit .EQ *-ofsG backup bit disable, setfileinfo only
|
bubit .EQ *-ofsG backup bit disable, setfileinfo only
|
||||||
.DA #0
|
.DA #0
|
||||||
spare1 .EQ *-ofsG used to save acc
|
spare1 .EQ *-ofsG used to save acc
|
||||||
.DA #0
|
.DA #0
|
||||||
newpfxptr .EQ *-ofsG appletalk alternate prefix ptr
|
newpfxptr .EQ *-ofsG appletalk alternate prefix ptr
|
||||||
.DA #0
|
.DA #0
|
||||||
machid .EQ *-ofsG machine ID byte
|
machid .EQ *-ofsG machine ID byte
|
||||||
.DA #0
|
.DA #0
|
||||||
rommap .EQ *-ofsG slot ROM bit map
|
rommap .EQ *-ofsG slot ROM bit map
|
||||||
.DA #0
|
.DA #0
|
||||||
preflag .EQ *-ofsG prefix active flag
|
preflag .EQ *-ofsG prefix active flag
|
||||||
.DA #0
|
.DA #0
|
||||||
mliact .EQ *-ofsG MLI active flag
|
mliact .EQ *-ofsG MLI active flag
|
||||||
.DA #0
|
.DA #0
|
||||||
mliretn .EQ *-ofsG last MLI call return address
|
mliretn .EQ *-ofsG last MLI call return address
|
||||||
.DA 0
|
.DA 0
|
||||||
mlix .EQ *-ofsG MLI X register savearea
|
mlix .EQ *-ofsG MLI X register savearea
|
||||||
.DA #0
|
.DA #0
|
||||||
mliy .EQ *-ofsG MLI Y register savearea
|
mliy .EQ *-ofsG MLI Y register savearea
|
||||||
.DA #0
|
.DA #0
|
||||||
|
|
||||||
* language card bank switching routines which must reside at $BFA0 because
|
* language card bank switching routines which must reside at $BFA0 because
|
||||||
|
@ -134,48 +134,48 @@ mliy .EQ *-ofsG MLI Y register savearea
|
||||||
|
|
||||||
HBFA0 .EQ *-ofsG
|
HBFA0 .EQ *-ofsG
|
||||||
eor $E000 test for rom enable
|
eor $E000 test for rom enable
|
||||||
beq .1 taken if ram enabled
|
beq .1 taken if ram enabled
|
||||||
sta romin read ROM
|
sta romin read ROM
|
||||||
bne .2 always
|
bne .2 always
|
||||||
.1 lda bnkbyt2 for alternate ram
|
.1 lda bnkbyt2 for alternate ram
|
||||||
eor $D000 test
|
eor $D000 test
|
||||||
beq .2 branch if not alternate ram
|
beq .2 branch if not alternate ram
|
||||||
lda altram else enable alt $D000
|
lda altram else enable alt $D000
|
||||||
.2 pla return code
|
.2 pla return code
|
||||||
rti re-enable interrupts and return
|
rti re-enable interrupts and return
|
||||||
|
|
||||||
mlicont .EQ *-ofsG
|
mlicont .EQ *-ofsG
|
||||||
sec
|
sec
|
||||||
ror mliact notify interrupt routines MLI active.
|
ror mliact notify interrupt routines MLI active.
|
||||||
lda $E000 preserve language card/rom orientation
|
lda $E000 preserve language card/rom orientation
|
||||||
sta bnkbyt1 for proper restoration when mli exits.
|
sta bnkbyt1 for proper restoration when mli exits.
|
||||||
lda $D000
|
lda $D000
|
||||||
sta bnkbyt2
|
sta bnkbyt2
|
||||||
lda ramin force ram card on
|
lda ramin force ram card on
|
||||||
lda ramin with write allowed
|
lda ramin with write allowed
|
||||||
jmp xdosmli
|
jmp xdosmli
|
||||||
|
|
||||||
irqexit .EQ *-ofsG
|
irqexit .EQ *-ofsG
|
||||||
lda bankid determine state of ram card (ROM/RAM)
|
lda bankid determine state of ram card (ROM/RAM)
|
||||||
|
|
||||||
irqxit0 .EQ *-ofsG
|
irqxit0 .EQ *-ofsG
|
||||||
beq .2 branch if ram card enabled.
|
beq .2 branch if ram card enabled.
|
||||||
bmi .1 branch if alternate $D000 enabled.
|
bmi .1 branch if alternate $D000 enabled.
|
||||||
|
|
||||||
lsr determine if no ram card present.
|
lsr determine if no ram card present.
|
||||||
bcc .3 branch if rom only system.
|
bcc .3 branch if rom only system.
|
||||||
|
|
||||||
lda romin1 enable rom
|
lda romin1 enable rom
|
||||||
bcs .3 always taken
|
bcs .3 always taken
|
||||||
|
|
||||||
.1 lda altram enable alternate $D000
|
.1 lda altram enable alternate $D000
|
||||||
.2 lda #$01 preset bankid for rom.
|
.2 lda #$01 preset bankid for rom.
|
||||||
sta bankid (reset if ram card interrupt)
|
sta bankid (reset if ram card interrupt)
|
||||||
.3 lda p8areg restore acc
|
.3 lda p8areg restore acc
|
||||||
rti exit
|
rti exit
|
||||||
|
|
||||||
irqent .EQ *-ofsG this entry only used when rom
|
irqent .EQ *-ofsG this entry only used when rom
|
||||||
bit ramin was enabled at time of interrupt.
|
bit ramin was enabled at time of interrupt.
|
||||||
bit ramin
|
bit ramin
|
||||||
jmp irqrecev
|
jmp irqrecev
|
||||||
|
|
||||||
|
@ -185,7 +185,7 @@ bnkbyt2 .EQ *-ofsG
|
||||||
.DA #0
|
.DA #0
|
||||||
.HS 00000000 pad to before $BFFA
|
.HS 00000000 pad to before $BFFA
|
||||||
.DA #4 gsos compatibility byte ($BFFA)
|
.DA #4 gsos compatibility byte ($BFFA)
|
||||||
.DA #0 pad
|
.DA #0 pad
|
||||||
.DA #0 reserved
|
.DA #0 reserved
|
||||||
.DA #0 version # of running interpreter
|
.DA #0 version # of running interpreter
|
||||||
.DA #0 preserved for System Utilities
|
.DA #0 preserved for System Utilities
|
||||||
|
|
|
@ -7,65 +7,65 @@ NEW
|
||||||
|
|
||||||
lanirq .EQ *-ofsR2
|
lanirq .EQ *-ofsR2
|
||||||
|
|
||||||
H2D9B pha $2D9B-2DFF moved to $FF9B-FFFF
|
H2D9B pha $2D9B-2DFF moved to $FF9B-FFFF
|
||||||
lda accsav
|
lda accsav
|
||||||
sta oldacc
|
sta oldacc
|
||||||
pla
|
pla
|
||||||
sta accsav
|
sta accsav
|
||||||
pla get status register from stack
|
pla get status register from stack
|
||||||
pha and put it back.
|
pha and put it back.
|
||||||
and #$10 is it a break or interrupt?
|
and #$10 is it a break or interrupt?
|
||||||
bne H2DC2 branch if break.
|
bne H2DC2 branch if break.
|
||||||
lda $D000 get ram bankid (LC1 = $D8, LC2=$EE)
|
lda $D000 get ram bankid (LC1 = $D8, LC2=$EE)
|
||||||
eor #$D8 is the system active? ($D8)
|
eor #$D8 is the system active? ($D8)
|
||||||
beq sysactv branch if it is
|
beq sysactv branch if it is
|
||||||
lda #$FF
|
lda #$FF
|
||||||
sysactv sta bankid
|
sysactv sta bankid
|
||||||
sta afbank
|
sta afbank
|
||||||
lda /aftirq setup return address
|
lda /aftirq setup return address
|
||||||
pha
|
pha
|
||||||
lda #aftirq
|
lda #aftirq
|
||||||
pha
|
pha
|
||||||
lda #$04 status reg with interrupt flag set
|
lda #$04 status reg with interrupt flag set
|
||||||
pha
|
pha
|
||||||
H2DC2 lda /romirq setup ROM re-entry
|
H2DC2 lda /romirq setup ROM re-entry
|
||||||
pha
|
pha
|
||||||
lda #romirq
|
lda #romirq
|
||||||
pha
|
pha
|
||||||
gorom .EQ *-ofsR2
|
gorom .EQ *-ofsR2
|
||||||
sta romin hits ROM rts at $FFCB
|
sta romin hits ROM rts at $FFCB
|
||||||
|
|
||||||
* 'lreset' address must = $FFCB for rom switch i/o to work
|
* 'lreset' address must = $FFCB for rom switch i/o to work
|
||||||
|
|
||||||
lreset .EQ *-ofsR2
|
lreset .EQ *-ofsR2
|
||||||
lda rreset+1
|
lda rreset+1
|
||||||
pha
|
pha
|
||||||
lda rreset
|
lda rreset
|
||||||
pha
|
pha
|
||||||
jmp gorom
|
jmp gorom
|
||||||
rreset .EQ *-ofsR2
|
rreset .EQ *-ofsR2
|
||||||
.DA resetv-1 rts to resetv
|
.DA resetv-1 rts to resetv
|
||||||
fix45 .EQ *-ofsR2
|
fix45 .EQ *-ofsR2
|
||||||
sta p8areg A register savearea
|
sta p8areg A register savearea
|
||||||
lda oldacc
|
lda oldacc
|
||||||
sta accsav
|
sta accsav
|
||||||
lda ramin read/write RAM bank 1
|
lda ramin read/write RAM bank 1
|
||||||
lda ramin
|
lda ramin
|
||||||
lda afbank
|
lda afbank
|
||||||
jmp irqxit0
|
jmp irqxit0
|
||||||
stypfx .EQ *-ofsR2 fix appletalk PFI bug
|
stypfx .EQ *-ofsR2 fix appletalk PFI bug
|
||||||
sty newpfxptr
|
sty newpfxptr
|
||||||
sty preflag prefix flag
|
sty preflag prefix flag
|
||||||
rts
|
rts
|
||||||
stapfx .EQ *-ofsR2
|
stapfx .EQ *-ofsR2
|
||||||
sta newpfxptr
|
sta newpfxptr
|
||||||
sta preflag
|
sta preflag
|
||||||
rts
|
rts
|
||||||
|
|
||||||
* these 3 vectors hard-coded into processor
|
* these 3 vectors hard-coded into processor
|
||||||
|
|
||||||
.DA nmivect nmi handler
|
.DA nmivect nmi handler
|
||||||
.DA lreset reset handler
|
.DA lreset reset handler
|
||||||
irqv .EQ *-ofsR2
|
irqv .EQ *-ofsR2
|
||||||
.DA lanirq irq handler
|
.DA lanirq irq handler
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -6,28 +6,28 @@ NEW
|
||||||
|
|
||||||
ofsR2 .EQ lcsrc-lcdest offset from ram driver org
|
ofsR2 .EQ lcsrc-lcdest offset from ram driver org
|
||||||
|
|
||||||
lcsrc cld no decimal.
|
lcsrc cld no decimal.
|
||||||
ldx #$0B save 13 bytes of parms
|
ldx #$0B save 13 bytes of parms
|
||||||
H2D03 lda A1L,x
|
H2D03 lda A1L,x
|
||||||
sta a1l1,x
|
sta a1l1,x
|
||||||
dex
|
dex
|
||||||
bpl H2D03
|
bpl H2D03
|
||||||
ldx #$01
|
ldx #$01
|
||||||
H2D0D lda passit,x save xfer vectors
|
H2D0D lda passit,x save xfer vectors
|
||||||
sta sp1,x
|
sta sp1,x
|
||||||
dex
|
dex
|
||||||
bpl H2D0D
|
bpl H2D0D
|
||||||
lda A4L get command.
|
lda A4L get command.
|
||||||
beq stat 0 = status
|
beq stat 0 = status
|
||||||
cmp #$04 check for command too high.
|
cmp #$04 check for command too high.
|
||||||
bcs ioerr if it is, i/o error
|
bcs ioerr if it is, i/o error
|
||||||
eor #$03
|
eor #$03
|
||||||
sta A4L 0=format, 2=read, 1=write
|
sta A4L 0=format, 2=read, 1=write
|
||||||
beq format
|
beq format
|
||||||
ldy bloknml+1 check for large block number.
|
ldy bloknml+1 check for large block number.
|
||||||
bne ioerr too big.
|
bne ioerr too big.
|
||||||
lda bloknml block #
|
lda bloknml block #
|
||||||
bmi ioerr largest block number is $7F
|
bmi ioerr largest block number is $7F
|
||||||
|
|
||||||
* at this point, control is passed to the code in the alternate 64k.
|
* at this point, control is passed to the code in the alternate 64k.
|
||||||
* it it used for read, write and format. after the request is completed,
|
* it it used for read, write and format. after the request is completed,
|
||||||
|
@ -37,49 +37,49 @@ format lda #ramdest card entry point
|
||||||
sta passit
|
sta passit
|
||||||
lda /ramdest
|
lda /ramdest
|
||||||
gocard .EQ *-ofsR2 also used by 'mainwrt'
|
gocard .EQ *-ofsR2 also used by 'mainwrt'
|
||||||
sta passit+1
|
sta passit+1
|
||||||
sec direction ram -> card
|
sec direction ram -> card
|
||||||
clv start with original zero page
|
clv start with original zero page
|
||||||
jmp xfer transfer control
|
jmp xfer transfer control
|
||||||
ioerr lda #$27
|
ioerr lda #$27
|
||||||
bne H2D41
|
bne H2D41
|
||||||
lda #$2B write protect error.
|
lda #$2B write protect error.
|
||||||
H2D41 sec flags error
|
H2D41 sec flags error
|
||||||
bcs H2D47
|
bcs H2D47
|
||||||
noerr .EQ *-ofsR2
|
noerr .EQ *-ofsR2
|
||||||
stat lda #$00
|
stat lda #$00
|
||||||
clc
|
clc
|
||||||
H2D47 php save status
|
H2D47 php save status
|
||||||
pha and error code.
|
pha and error code.
|
||||||
ldx #$0B restore 13 byes of parms
|
ldx #$0B restore 13 byes of parms
|
||||||
H2D4B lda a1l1,x
|
H2D4B lda a1l1,x
|
||||||
sta A1L,x
|
sta A1L,x
|
||||||
dex
|
dex
|
||||||
bpl H2D4B
|
bpl H2D4B
|
||||||
lda sp1 restore xfer parms.
|
lda sp1 restore xfer parms.
|
||||||
bit $6060 addr $FF58 must = rts ($60) as in ROM
|
bit $6060 addr $FF58 must = rts ($60) as in ROM
|
||||||
sta passit
|
sta passit
|
||||||
lda sp1+1
|
lda sp1+1
|
||||||
sta passit+1
|
sta passit+1
|
||||||
pla restore error code
|
pla restore error code
|
||||||
plp and status.
|
plp and status.
|
||||||
rts
|
rts
|
||||||
mainwrt .EQ *-ofsR2 transfer data to card.
|
mainwrt .EQ *-ofsR2 transfer data to card.
|
||||||
sta wrcardram write to alt 48K
|
sta wrcardram write to alt 48K
|
||||||
ldy #$00
|
ldy #$00
|
||||||
H2D6A lda (A1L),y pointers set in card by 'setptr'
|
H2D6A lda (A1L),y pointers set in card by 'setptr'
|
||||||
sta (A4L),y
|
sta (A4L),y
|
||||||
lda (A2L),y
|
lda (A2L),y
|
||||||
sta (A3L),y
|
sta (A3L),y
|
||||||
dey
|
dey
|
||||||
bne H2D6A
|
bne H2D6A
|
||||||
sta wrmainram write to main 48K.
|
sta wrmainram write to main 48K.
|
||||||
lda #donewrt done writing card
|
lda #donewrt done writing card
|
||||||
sta passit
|
sta passit
|
||||||
lda /donewrt
|
lda /donewrt
|
||||||
jmp gocard
|
jmp gocard
|
||||||
sp1 .EQ *-ofsR2
|
sp1 .EQ *-ofsR2
|
||||||
.HS 0000
|
.HS 0000
|
||||||
a1l1 .EQ *-ofsR2 13 bytes of storage
|
a1l1 .EQ *-ofsR2 13 bytes of storage
|
||||||
|
|
||||||
* end of obj ram_2
|
* end of obj ram_2
|
||||||
|
|
|
@ -5,12 +5,12 @@ NEW
|
||||||
* /RAM installer - transfer part of the driver to the aux bank
|
* /RAM installer - transfer part of the driver to the aux bank
|
||||||
* and front part of the driver to the main bank (language card).
|
* and front part of the driver to the main bank (language card).
|
||||||
|
|
||||||
RAM_1 .BS $2C80-*
|
RAM_1 .BS $2C80-*
|
||||||
|
|
||||||
ldy #$99 move $9A bytesfrom lcsrc to lcdest.
|
ldy #$99 move $9A bytesfrom lcsrc to lcdest.
|
||||||
|
|
||||||
.1 lda lcsrc,y transfer main bank portion of driver
|
.1 lda lcsrc,y transfer main bank portion of driver
|
||||||
sta lcdest,y
|
sta lcdest,y
|
||||||
dey
|
dey
|
||||||
cpy #$FF
|
cpy #$FF
|
||||||
bne .1
|
bne .1
|
||||||
|
@ -25,21 +25,21 @@ RAM_1 .BS $2C80-*
|
||||||
stx A2L+1
|
stx A2L+1
|
||||||
lda #ramdest
|
lda #ramdest
|
||||||
sta A4L
|
sta A4L
|
||||||
lda /ramdest ramsrc to ramdest
|
lda /ramdest ramsrc to ramdest
|
||||||
sta A4L+1
|
sta A4L+1
|
||||||
sec irection = to aux bank.
|
sec irection = to aux bank.
|
||||||
jsr auxmove move aux bank portion of driver.
|
jsr auxmove move aux bank portion of driver.
|
||||||
|
|
||||||
lda #lcdest put driver address into
|
lda #lcdest put driver address into
|
||||||
sta drivertbl2+6 slot 3, drive 2.
|
sta drivertbl2+6 slot 3, drive 2.
|
||||||
lda /lcdest
|
lda /lcdest
|
||||||
sta drivertbl2+7
|
sta drivertbl2+7
|
||||||
|
|
||||||
inc numdevs count (-1) active devices
|
inc numdevs count (-1) active devices
|
||||||
ldx numdevs
|
ldx numdevs
|
||||||
lda #$BF unit num of /RAM
|
lda #$BF unit num of /RAM
|
||||||
sta devlist,x
|
sta devlist,x
|
||||||
rts end of obj ram_1
|
rts end of obj ram_1
|
||||||
|
|
||||||
RAM_1_END .EQ * end of /RAM installer
|
RAM_1_END .EQ * end of /RAM installer
|
||||||
.BS #256-* pad 0's to page boundary
|
.BS #256-* pad 0's to page boundary
|
||||||
|
|
|
@ -8,109 +8,109 @@ object code = ram_0
|
||||||
* after the main /RAM routine has determined that the command is ok and the
|
* after the main /RAM routine has determined that the command is ok and the
|
||||||
* block to be read/written is within range, it transfers control to this
|
* block to be read/written is within range, it transfers control to this
|
||||||
* aux /RAM routine which remaps the block requested as follows:
|
* aux /RAM routine which remaps the block requested as follows:
|
||||||
* request blocks 0,1: invalid
|
* request blocks 0,1: invalid
|
||||||
* 2: returns VDIR (card block 3)
|
* 2: returns VDIR (card block 3)
|
||||||
* 3: returns BITMAP (synthesized)
|
* 3: returns BITMAP (synthesized)
|
||||||
* 4: returns card block 0
|
* 4: returns card block 0
|
||||||
* $05-$5F: returns card blocks $05-$5F
|
* $05-$5F: returns card blocks $05-$5F
|
||||||
* $60-$67: returns blocks $68-$7F in bank 1 of language card
|
* $60-$67: returns blocks $68-$7F in bank 1 of language card
|
||||||
* $68-$7F: returns blocks $68-$7F in bank 2 of language card
|
* $68-$7F: returns blocks $68-$7F in bank 2 of language card
|
||||||
|
|
||||||
ofsR0 .EQ ramsrc-ramdest offset to /RAM driver org
|
ofsR0 .EQ ramsrc-ramdest offset to /RAM driver org
|
||||||
|
|
||||||
ramsrc lda rd80col read 80 store
|
ramsrc lda rd80col read 80 store
|
||||||
pha save for later
|
pha save for later
|
||||||
sta store80off turn off 80 store
|
sta store80off turn off 80 store
|
||||||
ldx #$04 move the parameters for use:
|
ldx #$04 move the parameters for use:
|
||||||
L5109 lda A4L,x cmd, unit, bufptr and block (lo)
|
L5109 lda A4L,x cmd, unit, bufptr and block (lo)
|
||||||
sta tcmd,x -> tcmd, tunit, R2L, R2H, R01
|
sta tcmd,x -> tcmd, tunit, R2L, R2H, R01
|
||||||
dex
|
dex
|
||||||
bpl L5109
|
bpl L5109
|
||||||
and formatflg format the volume first time
|
and formatflg format the volume first time
|
||||||
bne L514F thru, or when requested.
|
bne L514F thru, or when requested.
|
||||||
ldx bloknml save R01 during format.
|
ldx bloknml save R01 during format.
|
||||||
lda #>vblock1 block to be cleared.
|
lda #>vblock1 block to be cleared.
|
||||||
jsr clrbuf1 clears all buffers.
|
jsr clrbuf1 clears all buffers.
|
||||||
ldy #$03 format volume in 2 chunks.
|
ldy #$03 format volume in 2 chunks.
|
||||||
L511F lda VDIR,y
|
L511F lda VDIR,y
|
||||||
sta vblock1+4,y
|
sta vblock1+4,y
|
||||||
dey
|
dey
|
||||||
bpl L511F
|
bpl L511F
|
||||||
lda #$FE set last block as unusable
|
lda #$FE set last block as unusable
|
||||||
sta BITMAP+15 to protect vectors.
|
sta BITMAP+15 to protect vectors.
|
||||||
tya set bitmap bits to $FF.
|
tya set bitmap bits to $FF.
|
||||||
ldy #$0E 15 bytes to set
|
ldy #$0E 15 bytes to set
|
||||||
L5130 sta BITMAP,y
|
L5130 sta BITMAP,y
|
||||||
dey
|
dey
|
||||||
bne L5130
|
bne L5130
|
||||||
sty BITMAP first byte = 0.
|
sty BITMAP first byte = 0.
|
||||||
ldy #$07 do other chunk
|
ldy #$07 do other chunk
|
||||||
L513B lda access,y
|
L513B lda access,y
|
||||||
sta vblock1+34,y
|
sta vblock1+34,y
|
||||||
dey
|
dey
|
||||||
bpl L513B
|
bpl L513B
|
||||||
lda formatflg if 0, set to $FF
|
lda formatflg if 0, set to $FF
|
||||||
bne L51AA else exitcard.
|
bne L51AA else exitcard.
|
||||||
sty formatflg y = $FF, won't format next time.
|
sty formatflg y = $FF, won't format next time.
|
||||||
stx R01 restore R01
|
stx R01 restore R01
|
||||||
|
|
||||||
* use the requested block number to determine
|
* use the requested block number to determine
|
||||||
* which routine performs the transfer
|
* which routine performs the transfer
|
||||||
|
|
||||||
L514F asl R01 block requested -> page requested.
|
L514F asl R01 block requested -> page requested.
|
||||||
lda R01 get page requested.
|
lda R01 get page requested.
|
||||||
cmp #$BF in language card ?
|
cmp #$BF in language card ?
|
||||||
bcs L5163 yes, do it.
|
bcs L5163 yes, do it.
|
||||||
cmp #$06 bitmap ?
|
cmp #$06 bitmap ?
|
||||||
bne L5160
|
bne L5160
|
||||||
jmp tbmap yes, transfer bitmap
|
jmp tbmap yes, transfer bitmap
|
||||||
L5160 jmp treg else normal transfer.
|
L5160 jmp treg else normal transfer.
|
||||||
|
|
||||||
* when a block between $60 and $7F is requested, it must be spirited into/from
|
* when a block between $60 and $7F is requested, it must be spirited into/from
|
||||||
* the language card area of the 64k card. this requires a 2 stage move:
|
* the language card area of the 64k card. this requires a 2 stage move:
|
||||||
* into the temp buffer and then to it's real destination.
|
* into the temp buffer and then to it's real destination.
|
||||||
|
|
||||||
L5163 tax save R1 for later.
|
L5163 tax save R1 for later.
|
||||||
jsr setptr get direction
|
jsr setptr get direction
|
||||||
php and save it.
|
php and save it.
|
||||||
bcs L51B8 if it's a write.
|
bcs L51B8 if it's a write.
|
||||||
lcrd .EQ *-ofsR0
|
lcrd .EQ *-ofsR0
|
||||||
txa get R1 back
|
txa get R1 back
|
||||||
cmp #$CF which bank is it in ?
|
cmp #$CF which bank is it in ?
|
||||||
bcs L5173 in main bank.
|
bcs L5173 in main bank.
|
||||||
ora #$10 in secondary bank.
|
ora #$10 in secondary bank.
|
||||||
bne L5179 branch always.
|
bne L5179 branch always.
|
||||||
L5173 sta altram turn on main $D000
|
L5173 sta altram turn on main $D000
|
||||||
sta altram
|
sta altram
|
||||||
L5179 sta R01 restore R1.
|
L5179 sta R01 restore R1.
|
||||||
lda R2H save R2 for later
|
lda R2H save R2 for later
|
||||||
pha
|
pha
|
||||||
ldx R2L
|
ldx R2L
|
||||||
sta setaltzp use alternate zero page/stack
|
sta setaltzp use alternate zero page/stack
|
||||||
lda #>dbuf set R2 to dbuf
|
lda #>dbuf set R2 to dbuf
|
||||||
sta R2H
|
sta R2H
|
||||||
lda #<dbuf
|
lda #<dbuf
|
||||||
sta R2L
|
sta R2L
|
||||||
jsr setptr set pointers
|
jsr setptr set pointers
|
||||||
tay A > 0 from setptr
|
tay A > 0 from setptr
|
||||||
L5194 lda (A1L),y move A1,A2 to A4,A3
|
L5194 lda (A1L),y move A1,A2 to A4,A3
|
||||||
sta (A4L),y
|
sta (A4L),y
|
||||||
lda (A2L),y
|
lda (A2L),y
|
||||||
sta (A3L),y
|
sta (A3L),y
|
||||||
dey
|
dey
|
||||||
bne L5194
|
bne L5194
|
||||||
sta setstdzp use main zero page/stack
|
sta setstdzp use main zero page/stack
|
||||||
L51A2 stx R2L
|
L51A2 stx R2L
|
||||||
pla restore R2
|
pla restore R2
|
||||||
sta R2H
|
sta R2H
|
||||||
plp get direction.
|
plp get direction.
|
||||||
L51AA bcs L51B5 write, done with move.
|
L51AA bcs L51B5 write, done with move.
|
||||||
sta ramin switch in MLI part of LC
|
sta ramin switch in MLI part of LC
|
||||||
sta ramin
|
sta ramin
|
||||||
jsr blockdo0 read, transfer dbuf to main
|
jsr blockdo0 read, transfer dbuf to main
|
||||||
L51B5 jmp exitcard
|
L51B5 jmp exitcard
|
||||||
L51B8 jsr blockdo0 transfer main to dbuf.
|
L51B8 jsr blockdo0 transfer main to dbuf.
|
||||||
jmp lcrd transfer dbuf to language card
|
jmp lcrd transfer dbuf to language card
|
||||||
|
|
||||||
* blockdo0 transfers a block between main memory and the 64k card. R1 contains
|
* blockdo0 transfers a block between main memory and the 64k card. R1 contains
|
||||||
* the page address of the block in the card; R2 contains the page address of
|
* the page address of the block in the card; R2 contains the page address of
|
||||||
|
@ -119,116 +119,116 @@ L51B8 jsr blockdo0 transfer main to dbuf.
|
||||||
* write is done (R2->R1); if cmd is 1, a read is done (R1->R2).
|
* write is done (R2->R1); if cmd is 1, a read is done (R1->R2).
|
||||||
|
|
||||||
blockdo0 .EQ *-ofsR0 set up R1 = dbuf
|
blockdo0 .EQ *-ofsR0 set up R1 = dbuf
|
||||||
lda #>dbuf
|
lda #>dbuf
|
||||||
blockdo1 .EQ *-ofsR0
|
blockdo1 .EQ *-ofsR0
|
||||||
sta R01
|
sta R01
|
||||||
blockdo .EQ *-ofsR0
|
blockdo .EQ *-ofsR0
|
||||||
jsr setptr set pointers.
|
jsr setptr set pointers.
|
||||||
bcs L51DB it's a write.
|
bcs L51DB it's a write.
|
||||||
sta wrmainram transfer buffer directly to main.
|
sta wrmainram transfer buffer directly to main.
|
||||||
tay 0 left from setptr.
|
tay 0 left from setptr.
|
||||||
L51CC lda (A1L),y transfer A1,A2 to A4,A3
|
L51CC lda (A1L),y transfer A1,A2 to A4,A3
|
||||||
sta (A4L),y
|
sta (A4L),y
|
||||||
lda (A2L),y
|
lda (A2L),y
|
||||||
sta (A3L),y
|
sta (A3L),y
|
||||||
dey
|
dey
|
||||||
bne L51CC
|
bne L51CC
|
||||||
sta wrcardram back the way it was.
|
sta wrcardram back the way it was.
|
||||||
donewrt .EQ *-ofsR0 mainwrt returns here
|
donewrt .EQ *-ofsR0 mainwrt returns here
|
||||||
rts
|
rts
|
||||||
L51DB lda #<mainwrt pointers set up,
|
L51DB lda #<mainwrt pointers set up,
|
||||||
sta passit pass control to main ram
|
sta passit pass control to main ram
|
||||||
lda #>mainwrt
|
lda #>mainwrt
|
||||||
jmp ex1 set passit+1 and transfer
|
jmp ex1 set passit+1 and transfer
|
||||||
|
|
||||||
* setptr is used by other routines to set up pointers and dtect read or write
|
* setptr is used by other routines to set up pointers and dtect read or write
|
||||||
|
|
||||||
setptr .EQ *-ofsR0
|
setptr .EQ *-ofsR0
|
||||||
lda tcmd is it read or write ?
|
lda tcmd is it read or write ?
|
||||||
lsr a
|
lsr a
|
||||||
bcs L5208 taken if write.
|
bcs L5208 taken if write.
|
||||||
lda R2H destination page
|
lda R2H destination page
|
||||||
sta A4L+1
|
sta A4L+1
|
||||||
sta A3L+1
|
sta A3L+1
|
||||||
lda R2L
|
lda R2L
|
||||||
sta A4L
|
sta A4L
|
||||||
sta A3L
|
sta A3L
|
||||||
lda R01 source page
|
lda R01 source page
|
||||||
sta A1L+1
|
sta A1L+1
|
||||||
sta A2L+1
|
sta A2L+1
|
||||||
lda #$00 source page aligned
|
lda #$00 source page aligned
|
||||||
sta A1L
|
sta A1L
|
||||||
sta A2L
|
sta A2L
|
||||||
beq L5223
|
beq L5223
|
||||||
L5208 lda R2H source page
|
L5208 lda R2H source page
|
||||||
sta A1L+1
|
sta A1L+1
|
||||||
sta A2L+1
|
sta A2L+1
|
||||||
lda R2L
|
lda R2L
|
||||||
sta A1L
|
sta A1L
|
||||||
sta A2L
|
sta A2L
|
||||||
lda R01 destination page
|
lda R01 destination page
|
||||||
sta A4L+1
|
sta A4L+1
|
||||||
sta A3L+1
|
sta A3L+1
|
||||||
lda #$00 destination page aligned
|
lda #$00 destination page aligned
|
||||||
sta A4L
|
sta A4L
|
||||||
sta A3L
|
sta A3L
|
||||||
L5223 inc A2L+1
|
L5223 inc2L+1
|
||||||
inc A3L+1
|
inc3L+1
|
||||||
rts
|
rts
|
||||||
|
|
||||||
* tzip is called if blocks 0,1,4,5 are requested.
|
* tzip is called if blocks 0,1,4,5 are requested.
|
||||||
* on write it does nothing, on read it returns 0's.
|
* on write it does nothing, on read it returns 0's.
|
||||||
|
|
||||||
tzip jsr clrbuf0 fill dbuf with 0's
|
tzip jsr clrbuf0 fill dbuf with 0's
|
||||||
jsr blockdo transfer the 0's
|
jsr blockdo transfer the 0's
|
||||||
jmp exitcard and return
|
jmp exitcard and return
|
||||||
|
|
||||||
* clrbuf fills the buffer indicated by R01 to 0's.
|
* clrbuf fills the buffer indicated by R01 to 0's.
|
||||||
* should only be called on a read or format.
|
* should only be called on a read or format.
|
||||||
|
|
||||||
clrbuf0 .EQ *-ofsR0
|
clrbuf0 .EQ *-ofsR0
|
||||||
lda #>dbuf dbuf is temp buffer.
|
lda #>dbuf dbuf is temp buffer.
|
||||||
clrbuf1 .EQ *-ofsR0
|
clrbuf1 .EQ *-ofsR0
|
||||||
sta R01 assign to block.
|
sta R01 assign to block.
|
||||||
clrbuf2 .EQ *-ofsR0
|
clrbuf2 .EQ *-ofsR0
|
||||||
jsr setptr set pointers
|
jsr setptr set pointers
|
||||||
tay acc = 0
|
tay acc = 0
|
||||||
L523A sta (A1L),y
|
L523A sta (A1L),y
|
||||||
sta (A2L),y
|
sta (A2L),y
|
||||||
dey
|
dey
|
||||||
bne L523A
|
bne L523A
|
||||||
rts
|
rts
|
||||||
|
|
||||||
* treg maps the requested block into the aux card
|
* treg maps the requested block into the aux card
|
||||||
* so that 8k data files will be contiguous (the index
|
* so that 8k data files will be contiguous (the index
|
||||||
* blocks will not be placed within data).
|
* blocks will not be placed within data).
|
||||||
|
|
||||||
treg .EQ *-ofsR0
|
treg .EQ *-ofsR0
|
||||||
cmp #$04 page 4 = vdir
|
cmp #$04 page 4 = vdir
|
||||||
bne L524A not vdir, continue
|
bne L524A not vdir, continue
|
||||||
lda #$07 else transfer block 7
|
lda #$07 else transfer block 7
|
||||||
bne L5258
|
bne L5258
|
||||||
L524A cmp #$0F if any page < $F (block 8) requested,
|
L524A cmp #$0F if any page < $F (block 8) requested,
|
||||||
bcc tzip it is invalid.
|
bcc tzip it is invalid.
|
||||||
ldx #$00 x = # of iterations.
|
ldx #$00 x = # of iterations.
|
||||||
lda bloknml use true block #.
|
lda bloknml use true block #.
|
||||||
cmp #$5D beyond 8k blocks ?
|
cmp #$5D beyond 8k blocks ?
|
||||||
bcc L525B no, do normal
|
bcc L525B no, do normal
|
||||||
sbc #$50 else subtract offset
|
sbc #$50 else subtract offset
|
||||||
L5258 jmp times2 and multiply by 2
|
L5258 jmp times2 and multiply by 2
|
||||||
|
|
||||||
* determine which 8k chunk it is in, place in x;
|
* determine which 8k chunk it is in, place in x;
|
||||||
* block offset into chunk goes into y.
|
* block offset into chunk goes into y.
|
||||||
|
|
||||||
L525B sec
|
L525B sec
|
||||||
sbc #$08 block=block-6
|
sbc #$08 block=block-6
|
||||||
L525E cmp #$11 if <=17 then done
|
L525E cmp #$11 if <=17 then done
|
||||||
bcc L5268
|
bcc L5268
|
||||||
sbc #$11 else block=block-17.
|
sbc #$11 else block=block-17.
|
||||||
inx iteration count.
|
inx iteration count.
|
||||||
bpl L525E should branch always
|
bpl L525E should branch always
|
||||||
.HS 00 otherwise crash !!!
|
.HS 00 otherwise crash !!!
|
||||||
L5268 tay remainder in y
|
L5268 tay remainder in y
|
||||||
|
|
||||||
* if remainder is 1 then it's an index block:
|
* if remainder is 1 then it's an index block:
|
||||||
* start index blocks at $1000,$2000...$19FF.
|
* start index blocks at $1000,$2000...$19FF.
|
||||||
|
@ -237,61 +237,61 @@ L5268 tay remainder in y
|
||||||
* otherwise, it is some other data block.
|
* otherwise, it is some other data block.
|
||||||
* page is 32 + (16 * x) + (2 * y)
|
* page is 32 + (16 * x) + (2 * y)
|
||||||
|
|
||||||
cpy #$01 is it index block ?
|
cpy #$01 is it index block ?
|
||||||
bne L5273 no.
|
bne L5273 no.
|
||||||
txa index = 2 * (8 + x)
|
txa index = 2 * (8 + x)
|
||||||
clc
|
clc
|
||||||
adc #$08
|
adc #$08
|
||||||
bne L5285 multiply by 2.
|
bne L5285 multiply by 2.
|
||||||
L5273 inx iteration + 1.
|
L5273 inx iteration + 1.
|
||||||
txa page = 2 * (16 + 8x)
|
txa page = 2 * (16 + 8x)
|
||||||
asl a
|
asl
|
||||||
asl a
|
asl
|
||||||
asl a
|
asl
|
||||||
asl a
|
asl
|
||||||
sta R01
|
sta R01
|
||||||
tya get offset into 8k chunk
|
tya get offset into 8k chunk
|
||||||
beq L5281 if 0, no offset
|
beq L5281 if 0, no offset
|
||||||
dey else offset = 2 * y
|
dey else offset = 2 * y
|
||||||
tya
|
tya
|
||||||
L5281 clc
|
L5281 clc
|
||||||
adc R01
|
adc R01
|
||||||
times2 .EQ *-ofsR0
|
times2 .EQ *-ofsR0
|
||||||
L5285 asl a acc = 2 * acc
|
L5285 asl acc = 2 * acc
|
||||||
jsr blockdo1 store in R01 and transfer
|
jsr blockdo1 store in R01 and transfer
|
||||||
jmp exitcard and return
|
jmp exitcard and return
|
||||||
|
|
||||||
* when block 3 is requested, the bitmap is returned. the real bitmap is only
|
* when block 3 is requested, the bitmap is returned. the real bitmap is only
|
||||||
* 16 bytes long; the rest of the block is synthesized. the temporary buffer
|
* 16 bytes long; the rest of the block is synthesized. the temporary buffer
|
||||||
* at $800 is used to build/read a full size bitmap block.
|
* at $800 is used to build/read a full size bitmap block.
|
||||||
|
|
||||||
tbmap .EQ *-ofsR0
|
tbmap .EQ *-ofsR0
|
||||||
lda #>dbuf use temp buffer as block
|
lda #>dbuf use temp buffer as block
|
||||||
sta R01
|
sta R01
|
||||||
jsr setptr set pointers, test read/write.
|
jsr setptr set pointers, test read/write.
|
||||||
bcs L52A9 branch if it's write.
|
bcs L52A9 branch if it's write.
|
||||||
jsr clrbuf2
|
jsr clrbuf2
|
||||||
ldy #$0F put real bitmap there
|
ldy #$0F put real bitmap there
|
||||||
L529B lda BITMAP,y
|
L529B lda BITMAP,y
|
||||||
sta (A1L),y
|
sta (A1L),y
|
||||||
dey
|
dey
|
||||||
bpl L529B
|
bpl L529B
|
||||||
jsr blockdo move temp buf to user buf
|
jsr blockdo move temp buf to user buf
|
||||||
jmp exitcard
|
jmp exitcard
|
||||||
L52A9 jsr blockdo move user buf to temp buf
|
L52A9 jsr blockdo move user buf to temp buf
|
||||||
jsr setptr
|
jsr setptr
|
||||||
ldy #$0F move temp buf to bitmap.
|
ldy #$0F move temp buf to bitmap.
|
||||||
L52B1 lda (A4L),y (pointer set by setptr)
|
L52B1 lda (A4L),y (pointer set by setptr)
|
||||||
sta BITMAP,y
|
sta BITMAP,y
|
||||||
dey
|
dey
|
||||||
bpl L52B1
|
bpl L52B1
|
||||||
jmp exitcard
|
jmp exitcard
|
||||||
|
|
||||||
formatflg .EQ *-ofsR0
|
formatflg .EQ *-ofsR0
|
||||||
.HS 00 not formatted yet
|
.HS 00 not formatted yet
|
||||||
tcmd .EQ *-ofsR0
|
tcmd .EQ *-ofsR0
|
||||||
.HS 00 command
|
.HS 00 command
|
||||||
.HS 00 unit (not used)
|
.HS 00 unit (not used)
|
||||||
R2L .EQ *-ofsR0
|
R2L .EQ *-ofsR0
|
||||||
.HS 00 R2 = user buffer
|
.HS 00 R2 = user buffer
|
||||||
R2H .EQ *-ofsR0
|
R2H .EQ *-ofsR0
|
||||||
|
@ -300,44 +300,44 @@ R01 .EQ *-ofsR0
|
||||||
.HS 00 page requested
|
.HS 00 page requested
|
||||||
BITMAP .EQ *-ofsR0
|
BITMAP .EQ *-ofsR0
|
||||||
.HS 00FFFFFF blocks 0-7 used
|
.HS 00FFFFFF blocks 0-7 used
|
||||||
.HS FFFFFFFF
|
.HS FFFFFFFF
|
||||||
.HS FFFFFFFF
|
.HS FFFFFFFF
|
||||||
.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
|
||||||
.HS 0D
|
.HS 0D
|
||||||
.HS 0000
|
.HS 0000
|
||||||
.HS 0300 block 3
|
.HS 0300 block 3
|
||||||
.HS 7F 128 blocks
|
.HS 7F 128 blocks
|
||||||
|
|
||||||
exitcard .EQ *-ofsR0
|
exitcard .EQ *-ofsR0
|
||||||
lda ramin restore language card
|
lda ramin restore language card
|
||||||
lda ramin
|
lda ramin
|
||||||
pla get 80store
|
pla get 80store
|
||||||
bpl L52EA 80store wasn't on
|
bpl L52EA 80store wasn't on
|
||||||
sta store80on enable 80store
|
sta store80on enable 80store
|
||||||
L52EA jmp bypass jump around passit
|
L52EA jmp bypass jump around passit
|
||||||
passit .EQ *-ofsR0
|
passit .EQ *-ofsR0
|
||||||
.HS 0000
|
.HS 0000
|
||||||
bypass .EQ *-ofsR0
|
bypass .EQ *-ofsR0
|
||||||
lda #noerr set up return to noerr
|
lda #noerr set up return to noerr
|
||||||
sta passit
|
sta passit
|
||||||
lda /noerr
|
lda /noerr
|
||||||
ex1 .EQ *-ofsR0
|
ex1 .EQ *-ofsR0
|
||||||
sta passit+1 also used by blockwrite
|
sta passit+1 also used by blockwrite
|
||||||
clc transfer card to main
|
clc transfer card to main
|
||||||
clv use standard zeropage/stack
|
clv use standard zeropage/stack
|
||||||
jmp xfer jmp back from language card.
|
jmp xfer jmp back from language card.
|
||||||
|
|
||||||
* NOTE: the previous section of code MUST NOT use $3FE or $3FF
|
* NOTE: the previous section of code MUST NOT use $3FE or $3FF
|
||||||
* since the interrupt vector must go there if aux interrupts
|
* since the interrupt vector must go there if aux interrupts
|
||||||
* are to be used. no room for expansion here !!
|
* are to be used. no room for expansion here !!
|
||||||
|
|
||||||
.HS 0000 $3FE-$3FF
|
.HS 0000 $3FE-$3FF
|
||||||
|
|
||||||
* end of obj ram_0
|
* end of obj ram_0
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
|
|
@ -11,307 +11,307 @@ NEW
|
||||||
|
|
||||||
ofsS .EQ disp1obj-dispadr offset to dispatcher org
|
ofsS .EQ disp1obj-dispadr offset to dispatcher org
|
||||||
|
|
||||||
disp1obj lda romin read ROM
|
disp1obj lda romin read ROM
|
||||||
sta clr80vid disable 80 col hardware
|
sta clr80vid disable 80 col hardware
|
||||||
sta clraltchar normal LC, flashing UC
|
sta clraltchar normal LC, flashing UC
|
||||||
sta store80off disable 80 column store
|
sta store80off disable 80 column store
|
||||||
jsr setnorm set normal text mode
|
jsr setnorm set normal text mode
|
||||||
jsr init init text screen
|
jsr init init text screen
|
||||||
jsr setvid reset output to screen
|
jsr setvid reset output to screen
|
||||||
jsr setkbd reset input to keyboard
|
jsr setkbd reset input to keyboard
|
||||||
ldx #$17 clear the memory bitmap
|
ldx #$17 clear the memory bitmap
|
||||||
lda #$01 but protect page $BF00.
|
lda #$01 but protect page $BF00.
|
||||||
sta memmap,x P8 memory bitmap
|
sta memmap,x P8 memory bitmap
|
||||||
dex
|
dex
|
||||||
lda #$00
|
lda #$00
|
||||||
L5A22 sta memmap,x
|
L5A22 sta memmap,x
|
||||||
dex
|
dex
|
||||||
bpl L5A22
|
bpl L5A22
|
||||||
lda #$CF protect zero page, stack and
|
lda #$CF protect zero page, stack and
|
||||||
sta memmap $400-$7FF (text screen display)
|
sta memmap $400-$7FF (text screen display)
|
||||||
L5A2D jsr home clear screen
|
L5A2D jsr home clear screen
|
||||||
jsr crout position top/left
|
jsr crout position top/left
|
||||||
ldx #<dsp1msg0-dsp1msgs
|
ldx #<dsp1msg0-dsp1msgs
|
||||||
jsr prntmsg 'enter prefix...'
|
jsr prntmsg 'enter prefix...'
|
||||||
lda #$03 line 3
|
lda #$03 line 3
|
||||||
sta cv
|
sta cv
|
||||||
jsr crout
|
jsr crout
|
||||||
jsr MLI get prefix
|
jsr MLI get prefix
|
||||||
.DA #$C7'
|
.DA #$C7'
|
||||||
.DA dsp1pfx'
|
.DA dsp1pfx'
|
||||||
ldx PrefixBuf get prefix length
|
ldx PrefixBuf get prefix length
|
||||||
lda #$00 put 0 at end of prefix
|
lda #$00 put 0 at end of prefix
|
||||||
sta PrefixBuf+1,x
|
sta PrefixBuf+1,x
|
||||||
ldx PrefixBuf get length.
|
ldx PrefixBuf get length.
|
||||||
beq L5A5D if no prefix to display.
|
beq L5A5D if no prefix to display.
|
||||||
L5A52 lda PrefixBuf,x display prefix directly to screen
|
L5A52 lda PrefixBuf,x display prefix directly to screen
|
||||||
ora #$80 normal text
|
ora #$80 normal text
|
||||||
sta vline5-1,x line 5
|
sta vline5-1,x line 5
|
||||||
dex
|
dex
|
||||||
bne L5A52
|
bne L5A52
|
||||||
L5A5D ldx #$00
|
L5A5D ldx #$00
|
||||||
dec cv
|
dec cv
|
||||||
jsr crout
|
jsr crout
|
||||||
getkey .EQ *-ofsS
|
getkey .EQ *-ofsS
|
||||||
jsr rdkey input char with cursor
|
jsr rdkey input char with cursor
|
||||||
cmp #$8D cr ?
|
cmp #$8D cr ?
|
||||||
beq L5ABD yes, accept what is entered.
|
beq L5ABD yes, accept what is entered.
|
||||||
pha no, save the char.
|
pha no, save the char.
|
||||||
jsr clreol clear rest of line.
|
jsr clreol clear rest of line.
|
||||||
pla get char back
|
pla get char back
|
||||||
cmp #$9B esc ?
|
cmp #$9B esc ?
|
||||||
beq L5A2D yes, start over
|
beq L5A2D yes, start over
|
||||||
cmp #$98 ctrl-x ?
|
cmp #$98 ctrl-x ?
|
||||||
L5A76 beq L5A2D then start over
|
L5A76 beq L5A2D then start over
|
||||||
cmp #$89 tab ?
|
cmp #$89 tab ?
|
||||||
beq badkey
|
beq badkey
|
||||||
cmp #$FF delete ?
|
cmp #$FF delete ?
|
||||||
beq L5A84 if yes
|
beq L5A84 if yes
|
||||||
cmp #$88 backspace ?
|
cmp #$88 backspace ?
|
||||||
bne L5A91 if not
|
bne L5A91 if not
|
||||||
L5A84 cpx #$00 at column 0 ?
|
L5A84 cpx #$00 at column 0 ?
|
||||||
beq L5A8B if so, do nothing
|
beq L5A8B if so, do nothing
|
||||||
dec ch else move left
|
dec ch else move left
|
||||||
dex dec char count
|
dex dec char count
|
||||||
L5A8B jsr clreol clear rest of line
|
L5A8B jsr clreol clear rest of line
|
||||||
jmp getkey get another char
|
jmp getkey get another char
|
||||||
L5A91 bcs L5A99
|
L5A91 bcs L5A99
|
||||||
badkey jsr bell output bell for bad key
|
badkey jsr bell output bell for bad key
|
||||||
jmp getkey and get another.
|
jmp getkey and get another.
|
||||||
L5A99 cmp #$DB below 'Z' ?
|
L5A99 cmp #$DB below 'Z' ?
|
||||||
bcc L5A9F if yes
|
bcc L5A9F if yes
|
||||||
and #$DF else shift to uppercase.
|
and #$DF else shift to uppercase.
|
||||||
L5A9F cmp #$AE below '.' ?
|
L5A9F cmp #$AE below '.' ?
|
||||||
bcc badkey
|
bcc badkey
|
||||||
cmp #$DB above 'Z' ?
|
cmp #$DB above 'Z' ?
|
||||||
bcs badkey
|
bcs badkey
|
||||||
cmp #$BA below ':' ?
|
cmp #$BA below ':' ?
|
||||||
bcc goodkey
|
bcc goodkey
|
||||||
cmp #$C1 at or above 'A' ?
|
cmp #$C1 at or above 'A' ?
|
||||||
bcc badkey
|
bcc badkey
|
||||||
goodkey inx
|
goodkey inx
|
||||||
cpx #$27 more than 39 chars ?
|
cpx #$27 more than 39 chars ?
|
||||||
bcs L5A76 then too many, go restart.
|
bcs L5A76 then too many, go restart.
|
||||||
sta PrefixBuf,x save it
|
sta PrefixBuf,x save it
|
||||||
jsr cout
|
jsr cout
|
||||||
jmp getkey get another.
|
jmp getkey get another.
|
||||||
L5ABD cpx #$00 prefix length = 0 ?
|
L5ABD cpx #$00 prefix length = 0 ?
|
||||||
beq L5AD3 if yes, don't set length.
|
beq L5AD3 if yes, don't set length.
|
||||||
stx PrefixBuf set prefix length.
|
stx PrefixBuf set prefix length.
|
||||||
jsr MLI call mli to set prefix.
|
jsr MLI call mli to set prefix.
|
||||||
.DA #$C6'
|
.DA #$C6'
|
||||||
.DA dsp1pfx'
|
.DA dsp1pfx'
|
||||||
bcc L5AD3 if ok, go get filename.
|
bcc L5AD3 if ok, go get filename.
|
||||||
jsr bell if not, ring bell
|
jsr bell if not, ring bell
|
||||||
lda #$00 and try again for prefix.
|
lda #$00 and try again for prefix.
|
||||||
L5AD1 beq L5A76
|
L5AD1 beq L5A76
|
||||||
L5AD3 jsr home clear screen for application name.
|
L5AD3 jsr home clear screen for application name.
|
||||||
jsr crout
|
jsr crout
|
||||||
ldx #<disp1msg-dsp1msgs
|
ldx #<disp1msg-dsp1msgs
|
||||||
jsr prntmsg 'enter pathname...'
|
jsr prntmsg 'enter pathname...'
|
||||||
retryrich .EQ *-ofsS
|
retryrich .EQ *-ofsS
|
||||||
lda #$03 line 3
|
lda #$03 line 3
|
||||||
sta cv
|
sta cv
|
||||||
jsr crout
|
jsr crout
|
||||||
ldx #$00
|
ldx #$00
|
||||||
loop1 .EQ *-ofsS
|
loop1 .EQ *-ofsS
|
||||||
jsr rdkey input char with cursor.
|
jsr rdkey input char with cursor.
|
||||||
cmp #$9B esc ?
|
cmp #$9B esc ?
|
||||||
bne L5AF4 if not esc.
|
bne L5AF4 if not esc.
|
||||||
lda ch esc pressed in column 0 ?
|
lda ch esc pressed in column 0 ?
|
||||||
bne L5AD3 if not, get pathname again.
|
bne L5AD3 if not, get pathname again.
|
||||||
beq L5AD1 if so, get prefix again.
|
beq L5AD1 if so, get prefix again.
|
||||||
L5AF4 cmp #$98 ctrl-x ?
|
L5AF4 cmp #$98 ctrl-x ?
|
||||||
L5AF6 beq L5AD3 then cancel and get pathname again.
|
L5AF6 beq L5AD3 then cancel and get pathname again.
|
||||||
cmp #$89 tab ?
|
cmp #$89 tab ?
|
||||||
beq L5B09 not good.
|
beq L5B09 not good.
|
||||||
cmp #$FF delete ?
|
cmp #$FF delete ?
|
||||||
beq L5B04 delete char.
|
beq L5B04 delete char.
|
||||||
cmp #$88 backspace ?
|
cmp #$88 backspace ?
|
||||||
bne L5B07
|
bne L5B07
|
||||||
L5B04 jmp delchar delete char.
|
L5B04 jmp delchar delete char.
|
||||||
L5B07 bcs L5B0F if > $88 then char may be acceptable.
|
L5B07 bcs L5B0F if > $88 then char may be acceptable.
|
||||||
L5B09 jsr bell output bell (ctl-G)
|
L5B09 jsr bell output bell (ctl-G)
|
||||||
jmp loop1 not good.
|
jmp loop1 not good.
|
||||||
L5B0F cmp #$8D cr ?
|
L5B0F cmp #$8D cr ?
|
||||||
beq L5B3C then done.
|
beq L5B3C then done.
|
||||||
cmp #$DB less than 'Z' ?
|
cmp #$DB less than 'Z' ?
|
||||||
bcc L5B19 no.
|
bcc L5B19 no.
|
||||||
and #$DF make sure it's uppercase.
|
and #$DF make sure it's uppercase.
|
||||||
L5B19 cmp #$AE '.' ?
|
L5B19 cmp #$AE '.' ?
|
||||||
bcc L5B09 not good if less.
|
bcc L5B09 not good if less.
|
||||||
cmp #$DB less than '[' ?
|
cmp #$DB less than '[' ?
|
||||||
bcs L5B09 not good.
|
bcs L5B09 not good.
|
||||||
cmp #$BA <= '9' ?
|
cmp #$BA <= '9' ?
|
||||||
bcc L5B29 then ok.
|
bcc L5B29 then ok.
|
||||||
cmp #$C1 greater than 'A' ?
|
cmp #$C1 greater than 'A' ?
|
||||||
bcc L5B09 if not, then no good.
|
bcc L5B09 if not, then no good.
|
||||||
L5B29 pha it's good, save it.
|
L5B29 pha it's good, save it.
|
||||||
jsr clreol clear to end of line
|
jsr clreol clear to end of line
|
||||||
pla
|
pla
|
||||||
jsr cout print it
|
jsr cout print it
|
||||||
inx
|
inx
|
||||||
cpx #$27 more than 39 chars ?
|
cpx #$27 more than 39 chars ?
|
||||||
bcs L5AF6 too long, get pathname again.
|
bcs L5AF6 too long, get pathname again.
|
||||||
sta PrefixBuf,x store it.
|
sta PrefixBuf,x store it.
|
||||||
jmp loop1 get another char
|
jmp loop1 get another char
|
||||||
L5B3C lda #$A0
|
L5B3C lda #$A0
|
||||||
jsr cout after cr, blank out the cursor.
|
jsr cout after cr, blank out the cursor.
|
||||||
stx PrefixBuf put length in front of the name.
|
stx PrefixBuf put length in front of the name.
|
||||||
jsr MLI get file info for pathname in PrefixBuf
|
jsr MLI get file info for pathname in PrefixBuf
|
||||||
.DA #$C4'
|
.DA #$C4'
|
||||||
.DA dsp1info'
|
.DA dsp1info'
|
||||||
bcc L5B4F if no errors.
|
bcc L5B4F if no errors.
|
||||||
jmp dsp1error
|
jmp dsp1error
|
||||||
L5B4F lda dsp1type
|
L5B4F lda dsp1type
|
||||||
cmp #$FF is it a SYS file ?
|
cmp #$FF is it a SYS file ?
|
||||||
beq L5B5B yes.
|
beq L5B5B yes.
|
||||||
lda #$01 not SYS file error.
|
lda #$01 not SYS file error.
|
||||||
jmp dsp1error
|
jmp dsp1error
|
||||||
L5B5B lda #$00 it's a system file
|
L5B5B lda #$00 it's a system file
|
||||||
sta dsp1cln
|
sta dsp1cln
|
||||||
jsr MLI close all open files
|
jsr MLI close all open files
|
||||||
.DA #$CC'
|
.DA #$CC'
|
||||||
.DA dsp1cls'
|
.DA dsp1cls'
|
||||||
bcc L5B6B
|
bcc L5B6B
|
||||||
jmp dsp1error
|
jmp dsp1error
|
||||||
L5B6B lda dsp1acess check for proper access.
|
L5B6B lda dsp1acess check for proper access.
|
||||||
and #$01 is read disabled ?
|
and #$01 is read disabled ?
|
||||||
bne L5B77 no, access ok.
|
bne L5B77 no, access ok.
|
||||||
lda #$27 i/o error
|
lda #$27 i/o error
|
||||||
jmp dsp1error
|
jmp dsp1error
|
||||||
L5B77 jsr MLI open the file
|
L5B77 jsr MLI open the file
|
||||||
.DA #$C8'
|
.DA #$C8'
|
||||||
.DA dsp1open'
|
.DA dsp1open'
|
||||||
bcc L5B82
|
bcc L5B82
|
||||||
jmp dsp1error
|
jmp dsp1error
|
||||||
L5B82 lda dsp1refn copy the reference number
|
L5B82 lda dsp1refn copy the reference number
|
||||||
sta dsp1rdn
|
sta dsp1rdn
|
||||||
sta dsp1eofn
|
sta dsp1eofn
|
||||||
jsr MLI get eof
|
jsr MLI get eof
|
||||||
.DA #$D1'
|
.DA #$D1'
|
||||||
.DA dsp1eof'
|
.DA dsp1eof'
|
||||||
bcs L5BE2
|
bcs L5BE2
|
||||||
lda dsp1eofb+2 3rd of 3 bytes.
|
lda dsp1eofb+2 3rd of 3 bytes.
|
||||||
beq L5B9C if 0 then ok
|
beq L5B9C if 0 then ok
|
||||||
lda #$27 else i/o error because
|
lda #$27 else i/o error because
|
||||||
bne L5BE2 file is too large.
|
bne L5BE2 file is too large.
|
||||||
L5B9C lda dsp1eofb move eof to # of bytes to read.
|
L5B9C lda dsp1eofb move eof to # of bytes to read.
|
||||||
sta dsp1cnt
|
sta dsp1cnt
|
||||||
lda dsp1eofb+1
|
lda dsp1eofb+1
|
||||||
sta dsp1cnt+1
|
sta dsp1cnt+1
|
||||||
jsr MLI read the file
|
jsr MLI read the file
|
||||||
.DA #$CA'
|
.DA #$CA'
|
||||||
.DA dsp1read'
|
.DA dsp1read'
|
||||||
php save the status.
|
php save the status.
|
||||||
jsr MLI close the file.
|
jsr MLI close the file.
|
||||||
.DA #$CC'
|
.DA #$CC'
|
||||||
.DA dsp1cls'
|
.DA dsp1cls'
|
||||||
bcc L5BBB
|
bcc L5BBB
|
||||||
L5BB7 plp get status (it is irrelevant now)
|
L5BB7 plp get status (it is irrelevant now)
|
||||||
bne L5BE2 if close generated an error
|
bne L5BE2 if close generated an error
|
||||||
plp here if close was ok.
|
plp here if close was ok.
|
||||||
L5BBB bcs L5BB7 error.
|
L5BBB bcs L5BB7 error.
|
||||||
jmp sysentry execute system file
|
jmp sysentry execute system file
|
||||||
delchar .EQ *-ofsS
|
delchar .EQ *-ofsS
|
||||||
lda ch is cursor in column 0 ?
|
lda ch is cursor in column 0 ?
|
||||||
beq L5BD3 yes, ignore it.
|
beq L5BD3 yes, ignore it.
|
||||||
dex
|
dex
|
||||||
lda #$A0 blank out the cursor
|
lda #$A0 blank out the cursor
|
||||||
jsr cout
|
jsr cout
|
||||||
dec ch
|
dec ch
|
||||||
dec ch point to last char entered
|
dec ch point to last char entered
|
||||||
jsr cout and blank it too.
|
jsr cout and blank it too.
|
||||||
dec ch point to that location.
|
dec ch point to that location.
|
||||||
L5BD3 jmp loop1 get next char.
|
L5BD3 jmp loop1 get next char.
|
||||||
prntmsg .EQ *-ofsS
|
prntmsg .EQ *-ofsS
|
||||||
L5BD6 lda dsp1msgs,x
|
L5BD6 lda dsp1msgs,x
|
||||||
beq L5BE1
|
beq L5BE1
|
||||||
jsr cout
|
jsr cout
|
||||||
inx
|
inx
|
||||||
bne L5BD6
|
bne L5BD6
|
||||||
L5BE1 rts
|
L5BE1 rts
|
||||||
|
|
||||||
* dispatcher 1 error handler
|
* dispatcher 1 error handler
|
||||||
|
|
||||||
dsp1error .EQ *-ofsS
|
dsp1error .EQ *-ofsS
|
||||||
L5BE2 sta errnum
|
L5BE2 sta errnum
|
||||||
lda #$0C display error message on line 13
|
lda #$0C display error message on line 13
|
||||||
sta cv
|
sta cv
|
||||||
jsr crout
|
jsr crout
|
||||||
lda errnum
|
lda errnum
|
||||||
cmp #$01
|
cmp #$01
|
||||||
bne L5BF5
|
bne L5BF5
|
||||||
ldx #<dsp1err1-dsp1msgs not a type 'sys' file
|
ldx #<dsp1err1-dsp1msgs not a type 'sys' file
|
||||||
bne L5C0B handled separately.
|
bne L5C0B handled separately.
|
||||||
L5BF5 cmp #$40 syntax error in pathname ?
|
L5BF5 cmp #$40 syntax error in pathname ?
|
||||||
beq L5C09
|
beq L5C09
|
||||||
cmp #$44 bad subdirectory path ?
|
cmp #$44 bad subdirectory path ?
|
||||||
beq L5C09
|
beq L5C09
|
||||||
cmp #$45 volume not found ?
|
cmp #$45 volume not found ?
|
||||||
beq L5C09
|
beq L5C09
|
||||||
cmp #$46 file not found ?
|
cmp #$46 file not found ?
|
||||||
beq L5C09
|
beq L5C09
|
||||||
ldx #<dsp1err2-dsp1msgs if not the errors above then 'i/o error'
|
ldx #<dsp1err2-dsp1msgs if not the errors above then 'i/o error'
|
||||||
bne L5C0B
|
bne L5C0B
|
||||||
L5C09 ldx #<dsp1err3-dsp1msgs otherwise display 'file/path not found'
|
L5C09 ldx #<dsp1err3-dsp1msgs otherwise display 'file/path not found'
|
||||||
L5C0B jsr prntmsg
|
L5C0B jsr prntmsg
|
||||||
jmp retryrich retry for application pathname
|
jmp retryrich retry for application pathname
|
||||||
msb on
|
msb on
|
||||||
dsp1msgs .EQ *-ofsS
|
dsp1msgs .EQ *-ofsS
|
||||||
dsp1msg0 .EQ *-ofsS
|
dsp1msg0 .EQ *-ofsS
|
||||||
dc c'ENTER PREFIX (PRESS "RETURN" TO ACCEPT)'
|
dc c'ENTER PREFIX (PRESS "RETURN" TO ACCEPT)'
|
||||||
.HS 00
|
.HS 00
|
||||||
disp1msg .EQ *-ofsS
|
disp1msg .EQ *-ofsS
|
||||||
dc c'ENTER PATHNAME OF NEXT APPLICATION'
|
dc c'ENTER PATHNAME OF NEXT APPLICATION'
|
||||||
.HS 00
|
.HS 00
|
||||||
dsp1err1 .EQ *-ofsS
|
dsp1err1 .EQ *-ofsS
|
||||||
.DA #87'
|
.DA #87'
|
||||||
dc c'NOT A TYPE "SYS" FILE'
|
dc c'NOT A TYPE "SYS" FILE'
|
||||||
.HS 00
|
.HS 00
|
||||||
dsp1err2 .EQ *-ofsS
|
dsp1err2 .EQ *-ofsS
|
||||||
.DA #87'
|
.DA #87'
|
||||||
dc c'I/O ERROR '
|
dc c'I/O ERROR '
|
||||||
.HS 00
|
.HS 00
|
||||||
dsp1err3 .EQ *-ofsS
|
dsp1err3 .EQ *-ofsS
|
||||||
.DA #87'
|
.DA #87'
|
||||||
dc c'FILE/PATH NOT FOUND '
|
dc c'FILE/PATH NOT FOUND '
|
||||||
.HS 00
|
.HS 00
|
||||||
dsp1info .EQ *-ofsS get file info parms
|
dsp1info .EQ *-ofsS get file info parms
|
||||||
.DA #0A' 10 parameters
|
.DA #0A' 10 parameters
|
||||||
.DA PrefixBuf' pathname buffer
|
.DA PrefixBuf' pathname buffer
|
||||||
dsp1acess .EQ *-ofsS
|
dsp1acess .EQ *-ofsS
|
||||||
.HS 00 access
|
.HS 00 access
|
||||||
dsp1type .EQ *-ofsS
|
dsp1type .EQ *-ofsS
|
||||||
.HS 00 file type
|
.HS 00 file type
|
||||||
ds 13 the rest are unimportant
|
ds 13 the rest are unimportant
|
||||||
dsp1open .EQ *-ofsS open file parms
|
dsp1open .EQ *-ofsS open file parms
|
||||||
dc h'03' 3 parameters for open
|
dc h'03' 3 parameters for open
|
||||||
.DA PrefixBuf' pathname buffer
|
.DA PrefixBuf' pathname buffer
|
||||||
.DA fbuf' fcb buffer
|
.DA fbuf' fcb buffer
|
||||||
dsp1refn .EQ *-ofsS
|
dsp1refn .EQ *-ofsS
|
||||||
.HS 00 reference #
|
.HS 00 reference #
|
||||||
dsp1cls .EQ *-ofsS close file parms
|
dsp1cls .EQ *-ofsS close file parms
|
||||||
.DA #01' 1 parameter for close
|
.DA #01' 1 parameter for close
|
||||||
dsp1cln .EQ *-ofsS
|
dsp1cln .EQ *-ofsS
|
||||||
.HS 00 reference #
|
.HS 00 reference #
|
||||||
dsp1read .EQ *-ofsS
|
dsp1read .EQ *-ofsS
|
||||||
dc h'04' 4 parameters for read
|
dc h'04' 4 parameters for read
|
||||||
dsp1rdn .EQ *-ofsS
|
dsp1rdn .EQ *-ofsS
|
||||||
.HS 00 reference #
|
.HS 00 reference #
|
||||||
.DA sysentry' .SYS load address
|
.DA sysentry' .SYS load address
|
||||||
dsp1cnt .EQ *-ofsS
|
dsp1cnt .EQ *-ofsS
|
||||||
.HS 0000 byte count
|
.HS 0000 byte count
|
||||||
.HS 0000
|
.HS 0000
|
||||||
dsp1eof .EQ *-ofsS get eof parms
|
dsp1eof .EQ *-ofsS get eof parms
|
||||||
dc h'02' 2 parameters
|
dc h'02' 2 parameters
|
||||||
dsp1eofn .EQ *-ofsS
|
dsp1eofn .EQ *-ofsS
|
||||||
.HS 00 reference #
|
.HS 00 reference #
|
||||||
dsp1eofb .EQ *-ofsS
|
dsp1eofb .EQ *-ofsS
|
||||||
dc h'000000' 3 byte eof
|
dc h'000000' 3 byte eof
|
||||||
dsp1pfx .EQ *-ofsS get/set prefix parms
|
dsp1pfx .EQ *-ofsS get/set prefix parms
|
||||||
.DA #01' 1 parameter
|
.DA #01' 1 parameter
|
||||||
.DA PrefixBuf' prefix buffer
|
.DA PrefixBuf' prefix buffer
|
||||||
|
|
||||||
disp1end .EQ *
|
disp1end .EQ *
|
||||||
ds $300-(disp1end-disp1obj) fill to page boundary
|
ds $300-(disp1end-disp1obj) fill to page boundary
|
||||||
|
|
|
@ -6,419 +6,419 @@ NEW
|
||||||
ofsB .EQ birdbye-dispadr offset to Bird's Bye org
|
ofsB .EQ birdbye-dispadr offset to Bird's Bye org
|
||||||
|
|
||||||
birdbye cld
|
birdbye cld
|
||||||
lda romin read ROM
|
lda romin read ROM
|
||||||
stz softev
|
stz softev
|
||||||
lda #>dispadr set reset vector to 'dispadr'
|
lda #>dispadr set reset vector to 'dispadr'
|
||||||
sta softev+1
|
sta softev+1
|
||||||
jsr setpwrc create power-up byte
|
jsr setpwrc create power-up byte
|
||||||
lda #$A0
|
lda #$A0
|
||||||
jsr init80 initialize 80 column text card
|
jsr init80 initialize 80 column text card
|
||||||
ldx #$17
|
ldx #$17
|
||||||
|
|
||||||
* set up memory bitmap in global page
|
* set up memory bitmap in global page
|
||||||
|
|
||||||
L5D16 stz memmap,x P8 memory bitmap
|
L5D16 stz memmap,x P8 memory bitmap
|
||||||
dex
|
dex
|
||||||
bpl L5D16
|
bpl L5D16
|
||||||
inc memmap+$17 protect global page
|
inc memmap+$17 protect global page
|
||||||
lda #$CF protect zero page, stack and page 1
|
lda #$CF protect zero page, stack and page 1
|
||||||
sta memmap
|
sta memmap
|
||||||
lda #$02
|
lda #$02
|
||||||
sta smparms init set mark parms pcount.
|
sta smparms init set mark parms pcount.
|
||||||
|
|
||||||
* drive selector
|
* drive selector
|
||||||
|
|
||||||
ldx numdevs get device count and
|
ldx numdevs get device count and
|
||||||
stx lstpntr store in zero page.
|
stx lstpntr store in zero page.
|
||||||
lda devnum get last slot/drive
|
lda devnum get last slot/drive
|
||||||
bne volname
|
bne volname
|
||||||
ds2 .EQ *-ofsB
|
ds2 .EQ *-ofsB
|
||||||
L5D32 ldx lstpntr get device list pointer.
|
L5D32 ldx lstpntr get device list pointer.
|
||||||
lda devlist,x get unit number from list.
|
lda devlist,x get unit number from list.
|
||||||
cpx #$01 make sure it's real.
|
cpx #$01 make sure it's real.
|
||||||
bcs L5D3F if so, change list pointer.
|
bcs L5D3F if so, change list pointer.
|
||||||
ldx numdevs get device count.
|
ldx numdevs get device count.
|
||||||
inx
|
inx
|
||||||
L5D3F dex decrement list pointer and restore.
|
L5D3F dex decrement list pointer and restore.
|
||||||
stx lstpntr
|
stx lstpntr
|
||||||
|
|
||||||
* get and store volume name
|
* get and store volume name
|
||||||
|
|
||||||
volname sta ol_unit store unit number for online.
|
volname sta ol_unit store unit number for online.
|
||||||
jsr MLI
|
jsr MLI
|
||||||
.DA #$C5' online call
|
.DA #$C5' online call
|
||||||
.DA ol_parms'
|
.DA ol_parms'
|
||||||
bcs L5D32 error check.
|
bcs L5D32 error check.
|
||||||
stz dlevel haven't read root directory yet.
|
stz dlevel haven't read root directory yet.
|
||||||
lda PrefixBuf+1 load description byte.
|
lda PrefixBuf+1 load description byte.
|
||||||
and #$0F mask for name length.
|
and #$0F mask for name length.
|
||||||
beq L5D32 if 0, then try next unit.
|
beq L5D32 if 0, then try next unit.
|
||||||
adc #$02 add 2 to length.
|
adc #$02 add 2 to length.
|
||||||
tax name length in x.
|
tax name length in x.
|
||||||
vnam1 .EQ *-ofsB
|
vnam1 .EQ *-ofsB
|
||||||
stx PrefixBuf save the name length
|
stx PrefixBuf save the name length
|
||||||
lda #$2F '/'
|
lda #$2F '/'
|
||||||
sta PrefixBuf+1 slash before and
|
sta PrefixBuf+1 slash before and
|
||||||
sta PrefixBuf,x after name.
|
sta PrefixBuf,x after name.
|
||||||
stz PrefixBuf+1,x null after complete name.
|
stz PrefixBuf+1,x null after complete name.
|
||||||
|
|
||||||
* open and read directory
|
* open and read directory
|
||||||
|
|
||||||
jsr MLI
|
jsr MLI
|
||||||
.DA #$C8' open
|
.DA #$C8' open
|
||||||
.DA op_parms'
|
.DA op_parms'
|
||||||
bcc L5D7F good open.
|
bcc L5D7F good open.
|
||||||
lda dlevel trying to open root directory ?
|
lda dlevel trying to open root directory ?
|
||||||
beq L5D32 yes, just move to next volume.
|
beq L5D32 yes, just move to next volume.
|
||||||
jsr bell1 no, generate bell tone
|
jsr bell1 no, generate bell tone
|
||||||
jsr popdir and stay at same level.
|
jsr popdir and stay at same level.
|
||||||
stx PrefixBuf
|
stx PrefixBuf
|
||||||
jmp keyloop
|
jmp keyloop
|
||||||
L5D7F inc dlevel
|
L5D7F inc dlevel
|
||||||
stz filecount zero file count.
|
stz filecount zero file count.
|
||||||
lda op_refn get file reference number
|
lda op_refn get file reference number
|
||||||
sta rd_refn store in read
|
sta rd_refn store in read
|
||||||
sta sm_refn and setmark parm lists.
|
sta sm_refn and setmark parm lists.
|
||||||
lda #$2B set read parm list for
|
lda #$2B set read parm list for
|
||||||
sta dhdr_len directory header length.
|
sta dhdr_len directory header length.
|
||||||
stz dhdr_len+1
|
stz dhdr_len+1
|
||||||
jsr doread read directory
|
jsr doread read directory
|
||||||
bcs L5DB3
|
bcs L5DB3
|
||||||
ldx #$03
|
ldx #$03
|
||||||
L5D9A lda sysentry+$23,x copy directory info
|
L5D9A lda sysentry+$23,x copy directory info
|
||||||
sta entlen,x to zero page.
|
sta entlen,x to zero page.
|
||||||
dex
|
dex
|
||||||
bpl L5D9A
|
bpl L5D9A
|
||||||
sta dhdr_len put entry length in read parm list.
|
sta dhdr_len put entry length in read parm list.
|
||||||
lda #$01 set block file counter to 1.
|
lda #$01 set block file counter to 1.
|
||||||
sta blkfl
|
sta blkfl
|
||||||
stz fpos_mid zero out msb's of file position
|
stz fpos_mid zero out msb's of file position
|
||||||
stz fpos_hi in setmark parm list.
|
stz fpos_hi in setmark parm list.
|
||||||
lda filecnt any files in directory ?
|
lda filecnt any files in directory ?
|
||||||
ora filecnt+1
|
ora filecnt+1
|
||||||
bne L5DB5 if so, continue
|
bne L5DB5 if so, continue
|
||||||
L5DB3 bra L5E29 else go close directory file.
|
L5DB3 bra L5E29 else go close directory file.
|
||||||
L5DB5 bit filecnt+1 check msb of file count.
|
L5DB5 bit filecnt+1 check msb of file count.
|
||||||
bmi L5DB3 if set then done.
|
bmi L5DB3 if set then done.
|
||||||
L5DB9 lda fpos_mid get mid byte of setmark file position.
|
L5DB9 lda fpos_mid get mid byte of setmark file position.
|
||||||
and #$FE reset lsb
|
and #$FE reset lsb
|
||||||
sta fpos_mid and save.
|
sta fpos_mid and save.
|
||||||
ldy blkfl block file counter
|
ldy blkfl block file counter
|
||||||
lda #$00
|
lda #$00
|
||||||
cpy entblk have we read all entries in this block ?
|
cpy entblk have we read all entries in this block ?
|
||||||
bcc L5DCE if not, continue.
|
bcc L5DCE if not, continue.
|
||||||
tay if so, zero y-reg and
|
tay if so, zero y-reg and
|
||||||
sty blkfl reset block counter / flag
|
sty blkfl reset block counter / flag
|
||||||
inc fpos_mid
|
inc fpos_mid
|
||||||
|
|
||||||
* set up setmark parameters for next file to be read.
|
* set up setmark parameters for next file to be read.
|
||||||
* if transfer to second sector, handle it.
|
* if transfer to second sector, handle it.
|
||||||
|
|
||||||
L5DCC inc fpos_mid
|
L5DCC inc fpos_mid
|
||||||
L5DCE dey decrement file block counter
|
L5DCE dey decrement file block counter
|
||||||
clc
|
clc
|
||||||
bmi L5DD8
|
bmi L5DD8
|
||||||
adc entlen add entry length to acc.
|
adc entlen add entry length to acc.
|
||||||
bcc L5DCE determine if we flopped into 2nd half of
|
bcc L5DCE determine if we flopped into 2nd half of
|
||||||
bcs L5DCC block, if so inc mid byte position.
|
bcs L5DCC block, if so inc mid byte position.
|
||||||
L5DD8 adc #$04 add 4 and put in
|
L5DD8 adc #$04 add 4 and put in
|
||||||
sta fpos_lo low byte of setmark.
|
sta fpos_lo low byte of setmark.
|
||||||
jsr MLI call mli
|
jsr MLI call mli
|
||||||
.DA #$CE' set mark
|
.DA #$CE' set mark
|
||||||
.DA #smparms' parameters address = $0060
|
.DA #smparms' parameters address = $0060
|
||||||
.HS 00
|
.HS 00
|
||||||
bcs L5DB3 error
|
bcs L5DB3 error
|
||||||
jsr doread
|
jsr doread
|
||||||
bcs L5DB3 error.
|
bcs L5DB3 error.
|
||||||
inc blkfl increase count of files read.
|
inc blkfl increase count of files read.
|
||||||
lda sysentry file type/length.
|
lda sysentry file type/length.
|
||||||
and #$F0 mask off high nibble.
|
and #$F0 mask off high nibble.
|
||||||
beq L5DB9 deleted file, try next one.
|
beq L5DB9 deleted file, try next one.
|
||||||
dec filecnt decrement low file count.
|
dec filecnt decrement low file count.
|
||||||
bne L5DF8
|
bne L5DF8
|
||||||
dec filecnt+1 and high if necessary.
|
dec filecnt+1 and high if necessary.
|
||||||
L5DF8 ror sysentry+$1E check access bit.
|
L5DF8 ror sysentry+$1E check access bit.
|
||||||
bcc L5DB5 if no read, try next file.
|
bcc L5DB5 if no read, try next file.
|
||||||
lda sysentry+$10 get file type.
|
lda sysentry+$10 get file type.
|
||||||
cmp #$0F directory file ?
|
cmp #$0F directory file ?
|
||||||
beq L5E08 then continue.
|
beq L5E08 then continue.
|
||||||
cmp #$FF system file ?
|
cmp #$FF system file ?
|
||||||
bne L5DB5 no, read next file.
|
bne L5DB5 no, read next file.
|
||||||
L5E08 ldx filecount get valid files read.
|
L5E08 ldx filecount get valid files read.
|
||||||
cpx #$80 if greater than size of filename buffer
|
cpx #$80 if greater than size of filename buffer
|
||||||
bcs L5E29 then close directory
|
bcs L5E29 then close directory
|
||||||
sta filetyps,x else store filetype in zero page
|
sta filetyps,x else store filetype in zero page
|
||||||
jsr namecalc and go set up storage area.
|
jsr namecalc and go set up storage area.
|
||||||
ldy #$0F
|
ldy #$0F
|
||||||
L5E15 lda sysentry,y get byte of filename
|
L5E15 lda sysentry,y get byte of filename
|
||||||
sta (fnstore),y store in directed area
|
sta (fnstore),y store in directed area
|
||||||
dey
|
dey
|
||||||
bpl L5E15
|
bpl L5E15
|
||||||
iny y = 0
|
iny y = 0
|
||||||
and #$0F mask off low nibble (name length)
|
and #$0F mask off low nibble (name length)
|
||||||
sta (fnstore),y restore in name buffer
|
sta (fnstore),y restore in name buffer
|
||||||
inc filecount increment valid file counter
|
inc filecount increment valid file counter
|
||||||
bne L5DB5 get next file (branch always)
|
bne L5DB5 get next file (branch always)
|
||||||
L5E26 jmp ds2 error. try next unit.
|
L5E26 jmp ds2 error. try next unit.
|
||||||
L5E29 jsr MLI close directory file
|
L5E29 jsr MLI close directory file
|
||||||
.DA #$CC'
|
.DA #$CC'
|
||||||
.DA cl_parms'
|
.DA cl_parms'
|
||||||
bcs L5E26 error.
|
bcs L5E26 error.
|
||||||
jsr settxt use full screen for windows
|
jsr settxt use full screen for windows
|
||||||
jsr home
|
jsr home
|
||||||
lda #$17 cursor at bottom of screen.
|
lda #$17 cursor at bottom of screen.
|
||||||
jsr tabv set vertical position.
|
jsr tabv set vertical position.
|
||||||
ldy #$00
|
ldy #$00
|
||||||
lda #$14 horizontal position.
|
lda #$14 horizontal position.
|
||||||
jsr sethorz print message.
|
jsr sethorz print message.
|
||||||
jsr homecurs cursor to upper/left.
|
jsr homecurs cursor to upper/left.
|
||||||
ldx #$00
|
ldx #$00
|
||||||
L5E48 lda PrefixBuf+1,x
|
L5E48 lda PrefixBuf+1,x
|
||||||
beq showfiles
|
beq showfiles
|
||||||
jsr output
|
jsr output
|
||||||
inx
|
inx
|
||||||
bne L5E48
|
bne L5E48
|
||||||
showfiles stz valcnt
|
showfiles stz valcnt
|
||||||
stz topname init top filename index.
|
stz topname init top filename index.
|
||||||
lda filecount # of valid files.
|
lda filecount # of valid files.
|
||||||
beq L5EB0 if no files.
|
beq L5EB0 if no files.
|
||||||
cmp #$15 more than what will fit on screen ?
|
cmp #$15 more than what will fit on screen ?
|
||||||
bcc L5E61 no.
|
bcc L5E61 no.
|
||||||
lda #$14 limit to 20 files on the screen.
|
lda #$14 limit to 20 files on the screen.
|
||||||
L5E61 sta gp_cnt
|
L5E61 sta gp_cnt
|
||||||
lda #$02 set window dimensions
|
lda #$02 set window dimensions
|
||||||
sta wndtop
|
sta wndtop
|
||||||
sta wndlft
|
sta wndlft
|
||||||
lda #$16
|
lda #$16
|
||||||
sta wndwdth
|
sta wndwdth
|
||||||
sta wndbtm
|
sta wndbtm
|
||||||
L5E6F jsr nameprnt output filename to screen
|
L5E6F jsr nameprnt output filename to screen
|
||||||
inc valcnt
|
inc valcnt
|
||||||
dec gp_cnt file counter.
|
dec gp_cnt file counter.
|
||||||
bne L5E6F continue printing names.
|
bne L5E6F continue printing names.
|
||||||
stz valcnt
|
stz valcnt
|
||||||
beq L5EAA if last file, it needs to be inverse.
|
beq L5EAA if last file, it needs to be inverse.
|
||||||
uparrow jsr nameprnt print old name in normal.
|
uparrow jsr nameprnt print old name in normal.
|
||||||
ldx valcnt get old name number.
|
ldx valcnt get old name number.
|
||||||
beq L5EAA if already at the top name
|
beq L5EAA if already at the top name
|
||||||
dec valcnt else fix index.
|
dec valcnt else fix index.
|
||||||
lda cv current cursor line.
|
lda cv current cursor line.
|
||||||
cmp #$02 at top line of window ?
|
cmp #$02 at top line of window ?
|
||||||
bne L5EAA no, move up normally.
|
bne L5EAA no, move up normally.
|
||||||
dec topname fix offset index
|
dec topname fix offset index
|
||||||
lda #$16 else sroll windows down a line.
|
lda #$16 else sroll windows down a line.
|
||||||
bne L5EA7 branch always.
|
bne L5EA7 branch always.
|
||||||
dnarrow jsr nameprnt print old name in normal.
|
dnarrow jsr nameprnt print old name in normal.
|
||||||
ldx valcnt get old name number.
|
ldx valcnt get old name number.
|
||||||
inx add one.
|
inx add one.
|
||||||
cpx filecount
|
cpx filecount
|
||||||
bcs L5EAA if already at last filename
|
bcs L5EAA if already at last filename
|
||||||
stx valcnt else update index.
|
stx valcnt else update index.
|
||||||
lda cv current cursor line.
|
lda cv current cursor line.
|
||||||
cmp #$15 at bottom line of window ?
|
cmp #$15 at bottom line of window ?
|
||||||
bne L5EAA no, move cursor normally.
|
bne L5EAA no, move cursor normally.
|
||||||
inc topname update offset index
|
inc topname update offset index
|
||||||
lda #$17 else scroll up a line.
|
lda #$17 else scroll up a line.
|
||||||
L5EA7 jsr cout
|
L5EA7 jsr cout
|
||||||
L5EAA jsr setinv set inverse text mode.
|
L5EAA jsr setinv set inverse text mode.
|
||||||
jsr nameprnt output last filename.
|
jsr nameprnt output last filename.
|
||||||
keyloop .EQ *-ofsB
|
keyloop .EQ *-ofsB
|
||||||
L5EB0 lda kbd get keyboard input.
|
L5EB0 lda kbd get keyboard input.
|
||||||
bpl L5EB0 loop until key pressed.
|
bpl L5EB0 loop until key pressed.
|
||||||
sta kbdstrobe clear strobe.
|
sta kbdstrobe clear strobe.
|
||||||
jsr setnorm set normal text mode.
|
jsr setnorm set normal text mode.
|
||||||
ldx filecount are any files displayed ?
|
ldx filecount are any files displayed ?
|
||||||
beq L5ECB no, don't accept arrow keys or return.
|
beq L5ECB no, don't accept arrow keys or return.
|
||||||
cmp #$8D return ?
|
cmp #$8D return ?
|
||||||
beq L5EF4 then run selected file.
|
beq L5EF4 then run selected file.
|
||||||
cmp #$8A down ?
|
cmp #$8A down ?
|
||||||
beq dnarrow move down a name.
|
beq dnarrow move down a name.
|
||||||
cmp #$8B up ?
|
cmp #$8B up ?
|
||||||
beq uparrow move up a name.
|
beq uparrow move up a name.
|
||||||
L5ECB cmp #$89 tab ?
|
L5ECB cmp #$89 tab ?
|
||||||
beq L5EED new volume.
|
beq L5EED new volume.
|
||||||
cmp #$9B esc ?
|
cmp #$9B esc ?
|
||||||
bne L5EB0 no, try again else pop up a directory.
|
bne L5EB0 no, try again else pop up a directory.
|
||||||
|
|
||||||
* pop a directory level
|
* pop a directory level
|
||||||
|
|
||||||
jsr popdir
|
jsr popdir
|
||||||
dec dlevel
|
dec dlevel
|
||||||
bra L5EF1
|
bra L5EF1
|
||||||
popdir .EQ *-ofsB
|
popdir .EQ *-ofsB
|
||||||
ldx PrefixBuf
|
ldx PrefixBuf
|
||||||
L5EDD dex
|
L5EDD dex
|
||||||
lda PrefixBuf,x
|
lda PrefixBuf,x
|
||||||
cmp #$2F slash
|
cmp #$2F slash
|
||||||
bne L5EDD
|
bne L5EDD
|
||||||
cpx #$01
|
cpx #$01
|
||||||
bne L5EEC
|
bne L5EEC
|
||||||
ldx PrefixBuf
|
ldx PrefixBuf
|
||||||
L5EEC rts
|
L5EEC rts
|
||||||
L5EED jmp ds2 set up new unit number.
|
L5EED jmp ds2 set up new unit number.
|
||||||
L5EF0 inx
|
L5EF0 inx
|
||||||
L5EF1 jmp vnam1 get new directory info.
|
L5EF1 jmp vnam1 get new directory info.
|
||||||
|
|
||||||
* run selected file
|
* run selected file
|
||||||
|
|
||||||
L5EF4 jsr MLI set prefix
|
L5EF4 jsr MLI set prefix
|
||||||
.DA #$C6'
|
.DA #$C6'
|
||||||
.DA pf_parms'
|
.DA pf_parms'
|
||||||
bcs L5EED error.
|
bcs L5EED error.
|
||||||
ldx valcnt get name number.
|
ldx valcnt get name number.
|
||||||
jsr namecalc set up name storage area (on return y=0)
|
jsr namecalc set up name storage area (on return y=0)
|
||||||
ldx PrefixBuf get prefix length.
|
ldx PrefixBuf get prefix length.
|
||||||
L5F04 iny start at y = 1.
|
L5F04 iny start at y = 1.
|
||||||
lda (fnstore),y get character of name.
|
lda (fnstore),y get character of name.
|
||||||
inx
|
inx
|
||||||
sta PrefixBuf,x store in prefix buffer.
|
sta PrefixBuf,x store in prefix buffer.
|
||||||
cpy namelen check length of name.
|
cpy namelen check length of name.
|
||||||
bcc L5F04 loop until all transferred.
|
bcc L5F04 loop until all transferred.
|
||||||
stx PrefixBuf put prefix length into buffer.
|
stx PrefixBuf put prefix length into buffer.
|
||||||
ldy valcnt get file number.
|
ldy valcnt get file number.
|
||||||
lda |filetyps,y get file type.
|
lda |filetyps,y get file type.
|
||||||
bpl L5EF0 branch if directory.
|
bpl L5EF0 branch if directory.
|
||||||
jsr settxt reset to full window.
|
jsr settxt reset to full window.
|
||||||
jsr home makes for no flash.
|
jsr home makes for no flash.
|
||||||
lda #$95 ctrl-u
|
lda #$95 ctrl-u
|
||||||
jsr cout turn off 80 columns.
|
jsr cout turn off 80 columns.
|
||||||
jsr MLI open file
|
jsr MLI open file
|
||||||
.DA #$C8'
|
.DA #$C8'
|
||||||
.DA op_parms'
|
.DA op_parms'
|
||||||
bcs L5EED if error.
|
bcs L5EED if error.
|
||||||
lda op_refn move reference number
|
lda op_refn move reference number
|
||||||
sta rd_refn for read.
|
sta rd_refn for read.
|
||||||
lda #$FF read the entire file.
|
lda #$FF read the entire file.
|
||||||
sta dhdr_len
|
sta dhdr_len
|
||||||
sta dhdr_len+1
|
sta dhdr_len+1
|
||||||
jsr doread read selected file.
|
jsr doread read selected file.
|
||||||
php save possible error.
|
php save possible error.
|
||||||
jsr MLI close file. ignore any error from close
|
jsr MLI close file. ignore any error from close
|
||||||
.DA #$CC'
|
.DA #$CC'
|
||||||
.DA cl_parms'
|
.DA cl_parms'
|
||||||
plp restore status from read.
|
plp restore status from read.
|
||||||
bcs L5EED if any errors.
|
bcs L5EED if any errors.
|
||||||
jmp sysentry execute selected system file.
|
jmp sysentry execute selected system file.
|
||||||
|
|
||||||
* output messages. on entry: acc = horizontal position,
|
* output messages. on entry: acc = horizontal position,
|
||||||
* y = index to message teminated by 0.
|
* y = index to message teminated by 0.
|
||||||
|
|
||||||
sethorz .EQ *-ofsB
|
sethorz .EQ *-ofsB
|
||||||
sta ch
|
sta ch
|
||||||
msgout .EQ *-ofsB
|
msgout .EQ *-ofsB
|
||||||
L5F4C lda dsp2msg,y
|
L5F4C lda dsp2msg,y
|
||||||
beq L5F57
|
beq L5F57
|
||||||
jsr cout
|
jsr cout
|
||||||
iny
|
iny
|
||||||
bne L5F4C
|
bne L5F4C
|
||||||
L5F57 rts
|
L5F57 rts
|
||||||
|
|
||||||
* name pointer calculator for name storage area
|
* name pointer calculator for name storage area
|
||||||
|
|
||||||
namecalc .EQ *-ofsB
|
namecalc .EQ *-ofsB
|
||||||
stz fnstore+1 init high byte of 16-bit shift
|
stz fnstore+1 init high byte of 16-bit shift
|
||||||
txa
|
txa
|
||||||
asl a shift to high nibble
|
asl shift to high nibble
|
||||||
rol fnstore+1
|
rol fnstore+1
|
||||||
asl a
|
asl
|
||||||
rol fnstore+1
|
rol fnstore+1
|
||||||
asl a
|
asl
|
||||||
rol fnstore+1
|
rol fnstore+1
|
||||||
asl a
|
asl
|
||||||
rol fnstore+1
|
rol fnstore+1
|
||||||
sta fnstore low pointer
|
sta fnstore low pointer
|
||||||
lda #>iobuf
|
lda #>iobuf
|
||||||
clc
|
clc
|
||||||
adc fnstore+1
|
adc fnstore+1
|
||||||
sta fnstore+1
|
sta fnstore+1
|
||||||
ldy #$00
|
ldy #$00
|
||||||
lda (fnstore),y file name length
|
lda (fnstore),y file name length
|
||||||
sta namelen
|
sta namelen
|
||||||
rts
|
rts
|
||||||
|
|
||||||
* output a filename line
|
* output a filename line
|
||||||
|
|
||||||
nameprnt .EQ *-ofsB
|
nameprnt .EQ *-ofsB
|
||||||
lda #$02
|
lda #$02
|
||||||
sta ch80col horizontal position = 2.
|
sta ch80col horizontal position = 2.
|
||||||
ldx valcnt filename number
|
ldx valcnt filename number
|
||||||
txa
|
txa
|
||||||
sec
|
sec
|
||||||
sbc topname calculate line # to display name
|
sbc topname calculate line # to display name
|
||||||
inc a
|
inc
|
||||||
inc a
|
inc
|
||||||
jsr tabv set vertical position.
|
jsr tabv set vertical position.
|
||||||
lda filetyps,x get filetype (x is unchanged by tabv).
|
lda filetyps,x get filetype (x is unchanged by tabv).
|
||||||
bmi L5F99 branch if system file.
|
bmi L5F99 branch if system file.
|
||||||
stz ch80col adjust cursor position.
|
stz ch80col adjust cursor position.
|
||||||
lda invflg save current inverse setting
|
lda invflg save current inverse setting
|
||||||
pha
|
pha
|
||||||
ldy #<fldrmsg-dsp2msg
|
ldy #<fldrmsg-dsp2msg
|
||||||
jsr msgout display the folder.
|
jsr msgout display the folder.
|
||||||
pla restore inverse setting.
|
pla restore inverse setting.
|
||||||
sta invflg
|
sta invflg
|
||||||
L5F99 jsr outsp output a space.
|
L5F99 jsr outsp output a space.
|
||||||
jsr namecalc calc name location.
|
jsr namecalc calc name location.
|
||||||
L5F9F iny y = 1 (first time).
|
L5F9F iny y = 1 (first time).
|
||||||
lda (fnstore),y get name character.
|
lda (fnstore),y get name character.
|
||||||
jsr output put on screen.
|
jsr output put on screen.
|
||||||
cpy namelen end of name ?
|
cpy namelen end of name ?
|
||||||
bcc L5F9F no.
|
bcc L5F9F no.
|
||||||
outsp .EQ *-ofsB output a space.
|
outsp .EQ *-ofsB output a space.
|
||||||
lda #$A0
|
lda #$A0
|
||||||
bne L5FB1 branch always.
|
bne L5FB1 branch always.
|
||||||
homecurs .EQ *-ofsB screen control - home cursor
|
homecurs .EQ *-ofsB screen control - home cursor
|
||||||
lda #$99
|
lda #$99
|
||||||
output .EQ *-ofsB
|
output .EQ *-ofsB
|
||||||
ora #$80 set high bit.
|
ora #$80 set high bit.
|
||||||
L5FB1 jmp cout output to screen.
|
L5FB1 jmp cout output to screen.
|
||||||
doread .EQ *-ofsB
|
doread .EQ *-ofsB
|
||||||
jsr MLI mli read call
|
jsr MLI mli read call
|
||||||
.DA #$CA'
|
.DA #$CA'
|
||||||
.DA rd_parms'
|
.DA rd_parms'
|
||||||
rts
|
rts
|
||||||
|
|
||||||
* data area
|
* data area
|
||||||
|
|
||||||
dsp2msg .EQ *-ofsB
|
dsp2msg .EQ *-ofsB
|
||||||
dc c'RETURN: Select | TAB: Chg Vol | '
|
dc c'RETURN: Select | TAB: Chg Vol | '
|
||||||
dc c'ESC: Back'
|
dc c'ESC: Back'
|
||||||
.DA #$00'
|
.DA #$00'
|
||||||
fldrmsg .EQ *-ofsB
|
fldrmsg .EQ *-ofsB
|
||||||
.DA #0F' inverse control code
|
.DA #0F' inverse control code
|
||||||
dc h'1B' enable mousetext
|
dc h'1B' enable mousetext
|
||||||
dc c'XY' folder characters
|
dc c'XY' folder characters
|
||||||
dc h'18' disable mousetext
|
dc h'18' disable mousetext
|
||||||
dc h'0E' normal control code
|
dc h'0E' normal control code
|
||||||
.HS 00
|
.HS 00
|
||||||
op_parms .EQ *-ofsB open parameters
|
op_parms .EQ *-ofsB open parameters
|
||||||
.DA #03' 3 parms
|
.DA #03' 3 parms
|
||||||
.DA PrefixBuf' pathname
|
.DA PrefixBuf' pathname
|
||||||
.DA op_buf' file buffer
|
.DA op_buf' file buffer
|
||||||
op_refn .EQ *-ofsB
|
op_refn .EQ *-ofsB
|
||||||
.HS 00 reference number
|
.HS 00 reference number
|
||||||
cl_parms .EQ *-ofsB close parameters
|
cl_parms .EQ *-ofsB close parameters
|
||||||
dc h'01' 1 parm
|
dc h'01' 1 parm
|
||||||
.HS 00 reference number.
|
.HS 00 reference number.
|
||||||
ol_parms .EQ *-ofsB online parameters
|
ol_parms .EQ *-ofsB online parameters
|
||||||
dc h'02' 2 parms
|
dc h'02' 2 parms
|
||||||
ol_unit .EQ *-ofsB
|
ol_unit .EQ *-ofsB
|
||||||
dc h'60' unit number, default = s6, d1
|
dc h'60' unit number, default = s6, d1
|
||||||
.DA PrefixBuf+1' data buffer
|
.DA PrefixBuf+1' data buffer
|
||||||
pf_parms .EQ *-ofsB set prefix parameters
|
pf_parms .EQ *-ofsB set prefix parameters
|
||||||
.DA #01' one parm
|
.DA #01' one parm
|
||||||
.DA PrefixBuf' pathname
|
.DA PrefixBuf' pathname
|
||||||
rd_parms .EQ *-ofsB read parameters
|
rd_parms .EQ *-ofsB read parameters
|
||||||
.DA #04' 4 parms
|
.DA #04' 4 parms
|
||||||
rd_refn .EQ *-ofsB
|
rd_refn .EQ *-ofsB
|
||||||
dc h'01' reference number
|
dc h'01' reference number
|
||||||
.DA sysentry' data buffer
|
.DA sysentry' data buffer
|
||||||
|
|
||||||
* these last 2 parms (4 bytes) may extend past $300 length limit since
|
* these last 2 parms (4 bytes) may extend past $300 length limit since
|
||||||
* the request count is set prior to using the parm block and the transfer
|
* the request count is set prior to using the parm block and the transfer
|
||||||
* count isn't used at all (except by prodos)
|
* count isn't used at all (except by prodos)
|
||||||
* .HS 0000 requested length
|
* .HS 0000 requested length
|
||||||
* .HS 0000 actual length
|
* .HS 0000 actual length
|
||||||
|
|
||||||
dhdr_len .EQ *-ofsB directory header length
|
dhdr_len .EQ *-ofsB directory header length
|
||||||
.HS 00 (actually uses 2 bytes)
|
.HS 00 (actually uses 2 bytes)
|
||||||
|
|
|
@ -20,8 +20,8 @@ ofsQ .EQ GQdisp-dispadr offset to GQuit dispatcher org
|
||||||
GQdisp lda ramin read/write LC bank 1
|
GQdisp lda ramin 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
|
||||||
|
|
||||||
* load application
|
* load application
|
||||||
|
@ -29,9 +29,9 @@ GQdisp lda ramin read/write LC bank 1
|
||||||
* Entry is in 16-bit native mode. Exit is in emulation mode.
|
* Entry is in 16-bit native mode. Exit is in emulation mode.
|
||||||
*
|
*
|
||||||
* On entry and exit:
|
* On entry and exit:
|
||||||
* Data bank register is set to $00.
|
* Data bank register is set to $00.
|
||||||
* Direct register is set to $0000.
|
* Direct register is set to $0000.
|
||||||
* Stack pointer is set to $01FB.
|
* Stack pointer is set to $01FB.
|
||||||
*
|
*
|
||||||
* Inputs: acc = value of E1_OS_Switch (0 or 1, 1 = yes to switch)
|
* Inputs: acc = value of E1_OS_Switch (0 or 1, 1 = yes to switch)
|
||||||
*
|
*
|
||||||
|
@ -43,84 +43,84 @@ GQdisp lda ramin read/write LC bank 1
|
||||||
|
|
||||||
SHORT M 8 bit accumulator
|
SHORT M 8 bit accumulator
|
||||||
LONGI ON
|
LONGI ON
|
||||||
pha save the switch status.
|
pha save the switch status.
|
||||||
ldx #inbuf point to passed prefix.
|
ldx #inbuf point to passed prefix.
|
||||||
jsr copyvol copy the name into the buffer.
|
jsr copyvol copy the name into the buffer.
|
||||||
pla retrieve the switch status
|
pla retrieve the switch status
|
||||||
|
|
||||||
* go into emulation mode to load and run Prodos 8 application
|
* go into emulation mode to load and run Prodos 8 application
|
||||||
|
|
||||||
sec
|
sec
|
||||||
xce 8 bit emulation mode
|
xce 8 bit emulation mode
|
||||||
ora #$00 switching from P16 to P8 ?
|
ora #$00 switching from P16 to P8 ?
|
||||||
beq L602D no.
|
beq L602D no.
|
||||||
|
|
||||||
* switching from P16 to P8 so pass prefix 0 from P16 to the P8 prefix. the
|
* switching from P16 to P8 so pass prefix 0 from P16 to the P8 prefix. the
|
||||||
* prefix is passed at $00/0200 by GQuit.
|
* prefix is passed at $00/0200 by GQuit.
|
||||||
|
|
||||||
L6020 jsr MLI set prefix
|
L6020 jsr MLI set prefix
|
||||||
.DA #$C6
|
.DA #$C6
|
||||||
.DA pfxparms
|
.DA pfxparms
|
||||||
bcc L602D if prefix ok.
|
bcc L602D if prefix ok.
|
||||||
jsr gqerror error handler.
|
jsr gqerror error handler.
|
||||||
bra L6020 try again
|
bra L6020 try again
|
||||||
|
|
||||||
* load application at $2000
|
* load application at $2000
|
||||||
|
|
||||||
L602D xce native mode (carry clear)
|
L602D xce native mode (carry clear)
|
||||||
LONG I 16 bit regs, 8 bit acc.
|
LONG I 16 bit regs, 8 bit acc.
|
||||||
lda PrefixBuf+1 is the application name
|
lda PrefixBuf+1 is the application name
|
||||||
cmp #$2F a complete pathname ?
|
cmp #$2F a complete pathname ?
|
||||||
bne L603D no, use prefix as volume name
|
bne L603D no, use prefix as volume name
|
||||||
ldx #PrefixBuf else use the application name.
|
ldx #PrefixBuf else use the application name.
|
||||||
jsr copyvol copy the volume name to buffer.
|
jsr copyvol copy the volume name to buffer.
|
||||||
L603D sec back to emulation mode.
|
L603D sec back to emulation mode.
|
||||||
xce
|
xce
|
||||||
L603F jsr MLI open the application file
|
L603F jsr MLI open the application file
|
||||||
.DA #$C8
|
.DA #$C8
|
||||||
.DA opnparms
|
.DA opnparms
|
||||||
bcc L604C if open ok.
|
bcc L604C if open ok.
|
||||||
jsr gqerror handle error.
|
jsr gqerror handle error.
|
||||||
bra L603F try again.
|
bra L603F try again.
|
||||||
L604C lda oprefnum copy ref number to parameter lists
|
L604C lda oprefnum copy ref number to parameter lists
|
||||||
sta eofrefn
|
sta eofrefn
|
||||||
sta rdrefnum
|
sta rdrefnum
|
||||||
sta closeref
|
sta closeref
|
||||||
|
|
||||||
* do a geteof call for how many bytes to read
|
* do a geteof call for how many bytes to read
|
||||||
|
|
||||||
L6058 jsr MLI get eof
|
L6058 jsr MLI get eof
|
||||||
.DA #$D1
|
.DA #$D1
|
||||||
.DA eofparms
|
.DA eofparms
|
||||||
bcc L6065 eof ok.
|
bcc L6065 eof ok.
|
||||||
jsr gqerror handle error.
|
jsr gqerror handle error.
|
||||||
bra L6058 try again.
|
bra L6058 try again.
|
||||||
|
|
||||||
* store the size of the file in the read parameter list
|
* store the size of the file in the read parameter list
|
||||||
|
|
||||||
L6065 lda eofval
|
L6065 lda eofval
|
||||||
sta rdcount
|
sta rdcount
|
||||||
lda eofval+1
|
lda eofval+1
|
||||||
sta rdcount+1
|
sta rdcount+1
|
||||||
L6071 jsr MLI read
|
L6071 jsr MLI read
|
||||||
.DA #$CA
|
.DA #$CA
|
||||||
.DA readparm
|
.DA readparm
|
||||||
bcc L607E read ok
|
bcc L607E read ok
|
||||||
jsr gqerror
|
jsr gqerror
|
||||||
bra L6071
|
bra L6071
|
||||||
L607E jsr MLI close
|
L607E jsr MLI close
|
||||||
.DA #$CC
|
.DA #$CC
|
||||||
.DA closeprm
|
.DA closeprm
|
||||||
bcc L608B close ok
|
bcc L608B close ok
|
||||||
jsr gqerror
|
jsr gqerror
|
||||||
bra L607E
|
bra L607E
|
||||||
L608B jsr dolaunch check for possible 2nd pathname.
|
L608B jsr dolaunch check for possible 2nd pathname.
|
||||||
bne L6099 if none then run program
|
bne L6099 if none then run program
|
||||||
jsr ckfordrv else make sure the file is online.
|
jsr ckfordrv else make sure the file is online.
|
||||||
bcc L6099 if so then run the program.
|
bcc L6099 if so then run the program.
|
||||||
lda #$45 volume not found error.
|
lda #$45 volume not found error.
|
||||||
bra L60AB
|
bra L60AB
|
||||||
L6099 lda romin enable ROM
|
L6099 lda romin enable ROM
|
||||||
jmp sysentry execute the system application
|
jmp sysentry execute the system application
|
||||||
|
|
||||||
gqerror .EQ *-ofsQ
|
gqerror .EQ *-ofsQ
|
||||||
|
@ -128,98 +128,98 @@ gqerror .EQ *-ofsQ
|
||||||
xce 16 bit native mode
|
xce 16 bit native mode
|
||||||
LONG I,M
|
LONG I,M
|
||||||
jsr mountvol mount volume.
|
jsr mountvol mount volume.
|
||||||
bcs L60AB if error.
|
bcs L60AB if error.
|
||||||
sec back to emulation mode.
|
sec back to emulation mode.
|
||||||
xce
|
xce
|
||||||
rts
|
rts
|
||||||
|
|
||||||
* generate a fatal error while running under Prodos 8.
|
* generate a fatal error while running under Prodos 8.
|
||||||
* on input, acc = error code. this routine does not return.
|
* on input, acc = error code. this routine does not return.
|
||||||
|
|
||||||
L60AB clc native mode
|
L60AB clc native mode
|
||||||
xce
|
xce
|
||||||
LONG I,M
|
LONG I,M
|
||||||
and #$00FF mask off high byte of error code.
|
and #$00FF mask off high byte of error code.
|
||||||
pha put on stack for IntMath tool call.
|
pha put on stack for IntMath tool call.
|
||||||
pea $0000 errval>>16
|
pea $0000 errval>>16
|
||||||
pea errval push address of string buffer.
|
pea errval push address of string buffer.
|
||||||
pea $0004 make string 4 digits long.
|
pea $0004 make string 4 digits long.
|
||||||
_Int2Hex convert value to hex string.
|
_Int2Hex convert value to hex string.
|
||||||
pha make space for return value.
|
pha make space for return value.
|
||||||
pea $0000 quitstr1>>16
|
pea $0000 quitstr1>>16
|
||||||
pea quitstr1 push first error message address
|
pea quitstr1 push first error message address
|
||||||
pea $0000 quitstr2>>16
|
pea $0000 quitstr2>>16
|
||||||
pea quitstr2 push second error message address
|
pea quitstr2 push second error message address
|
||||||
pea $0000 button1>>16
|
pea $0000 button1>>16
|
||||||
pea button1 push first button text address
|
pea button1 push first button text address
|
||||||
pea $0000 quitbtn2>>16
|
pea $0000 quitbtn2>>16
|
||||||
pea quitbtn2 push 2nd button text address (null)
|
pea quitbtn2 push 2nd button text address (null)
|
||||||
_TLTextMountVolume make the dialog box
|
_TLTextMountVolume make the dialog box
|
||||||
pla retrieve button press (not used)
|
pla retrieve button press (not used)
|
||||||
sec emulation mode
|
sec emulation mode
|
||||||
xce
|
xce
|
||||||
jsr MLI quit back to GQuit
|
jsr MLI quit back to GQuit
|
||||||
.DA #$65
|
.DA #$65
|
||||||
.DA quitparms
|
.DA quitparms
|
||||||
|
|
||||||
* p8 mount volume
|
* p8 mount volume
|
||||||
*
|
*
|
||||||
* on entry: volbuf = name of volume to mount.
|
* on entry: volbuf = name of volume to mount.
|
||||||
* on exit: carry clear if mount volume displayed and 'return' was pressed.
|
* on exit: carry clear if mount volume displayed and 'return' was pressed.
|
||||||
* carry set if no window displayed or if had window and 'esc' pressed.
|
* carry set if no window displayed or if had window and 'esc' pressed.
|
||||||
|
|
||||||
mountvol .EQ *-ofsQ
|
mountvol .EQ *-ofsQ
|
||||||
ldy #$0000 volbuf>>16
|
ldy #$0000 volbuf>>16
|
||||||
ldx #volbuf set up pointer to volume name.
|
ldx #volbuf set up pointer to volume name.
|
||||||
|
|
||||||
* if error is 'volume not found' or 'no disk in drive' then display the
|
* if error is 'volume not found' or 'no disk in drive' then display the
|
||||||
* Mount Volume window, otherwise return with carry set.
|
* Mount Volume window, otherwise return with carry set.
|
||||||
|
|
||||||
and #$00FF mask just in case.
|
and #$00FF mask just in case.
|
||||||
cmp #$0045 volume not found ?
|
cmp #$0045 volume not found ?
|
||||||
beq L6101 yes
|
beq L6101 yes
|
||||||
cmp #$002F no disk in drive ?
|
cmp #$002F no disk in drive ?
|
||||||
beq L6101 yes
|
beq L6101 yes
|
||||||
sec indicate error not handled.
|
sec indicate error not handled.
|
||||||
rts return with error code still in acc.
|
rts return with error code still in acc.
|
||||||
|
|
||||||
L6101 pha save error code in case esc pressed.
|
L6101 pha save error code in case esc pressed.
|
||||||
phy pointer to volume name.
|
phy pointer to volume name.
|
||||||
phx
|
phx
|
||||||
tsc
|
tsc
|
||||||
phd save D reg.
|
phd save D reg.
|
||||||
tcd point D reg at stack.
|
tcd point D reg at stack.
|
||||||
lda [$01] get length byte and leading separator.
|
lda [$01] get length byte and leading separator.
|
||||||
dec don't count leading separator.
|
dec don't count leading separator.
|
||||||
xba then swap the bytes so the volume name
|
xba then swap the bytes so the volume name
|
||||||
sta [$01] doesn't cpntain the separator.
|
sta [$01] doesn't cpntain the separator.
|
||||||
pha room for result.
|
pha room for result.
|
||||||
pea $0000 mountmsg>>16
|
pea $0000 mountmsg>>16
|
||||||
pea mountmsg
|
pea mountmsg
|
||||||
phy hi word of pointer to volume name.
|
phy hi word of pointer to volume name.
|
||||||
inx skip separator.
|
inx skip separator.
|
||||||
phx lo word of pointer to volume name.
|
phx lo word of pointer to volume name.
|
||||||
pea $0000 button1>>16
|
pea $0000 button1>>16
|
||||||
pea button1 'Return'
|
pea button1 'Return'
|
||||||
pea $0000 button2>>16
|
pea $0000 button2>>16
|
||||||
pea button2 'Escape'
|
pea button2 'Escape'
|
||||||
_TLTextMountVolume
|
_TLTextMountVolume
|
||||||
lda [$01] restore first 2 bytes of vilume name
|
lda [$01] restore first 2 bytes of vilume name
|
||||||
xba back to their original positions
|
xba back to their original positions
|
||||||
inc and values.
|
inc and values.
|
||||||
sta [$01]
|
sta [$01]
|
||||||
pla which button: 1=Return 2=Escape.
|
pla which button: 1=Return 2=Escape.
|
||||||
pld restore D reg.
|
pld restore D reg.
|
||||||
plx pull volume name pointer off stack
|
plx pull volume name pointer off stack
|
||||||
plx
|
plx
|
||||||
cmp #$0001 which button was pressed ?
|
cmp #$0001 which button was pressed ?
|
||||||
bne L613C if Escape pressed.
|
bne L613C if Escape pressed.
|
||||||
clc indicate Return was pressed.
|
clc indicate Return was pressed.
|
||||||
pla pull original error code off stack.
|
pla pull original error code off stack.
|
||||||
rts return with carry clear.
|
rts return with carry clear.
|
||||||
L613C sec indicate Escape was pressed.
|
L613C sec indicate Escape was pressed.
|
||||||
pla restore error code.
|
pla restore error code.
|
||||||
rts return with carry set.
|
rts return with carry set.
|
||||||
|
|
||||||
* copy the volume name from the given pathname to the volume name buffer.
|
* copy the volume name from the given pathname to the volume name buffer.
|
||||||
*
|
*
|
||||||
|
@ -229,19 +229,19 @@ L613C sec indicate Escape was pressed.
|
||||||
copyvol .EQ *-ofsQ
|
copyvol .EQ *-ofsQ
|
||||||
lda |1,x get the first slash
|
lda |1,x get the first slash
|
||||||
sta volbuf+1
|
sta volbuf+1
|
||||||
ldy #$0002 initialize the length count.
|
ldy #$0002 initialize the length count.
|
||||||
LONGI OFF
|
LONGI OFF
|
||||||
LONGA OFF
|
LONGA OFF
|
||||||
L6148 lda |2,x now copy the volume name up to
|
L6148 lda |2,x now copy the volume name up to
|
||||||
cmp #$2F the separating slash.
|
cmp #$2F the separating slash.
|
||||||
beq L6156
|
beq L6156
|
||||||
sta volbuf,y
|
sta volbuf,y
|
||||||
inx
|
inx
|
||||||
iny
|
iny
|
||||||
bra L6148
|
bra L6148
|
||||||
L6156 dey fix character count.
|
L6156 dey fix character count.
|
||||||
tya length.
|
tya length.
|
||||||
sta volbuf store the resultant string length.
|
sta volbuf store the resultant string length.
|
||||||
rts
|
rts
|
||||||
|
|
||||||
* translate a filename message from the message center to the currently
|
* translate a filename message from the message center to the currently
|
||||||
|
@ -253,182 +253,182 @@ L6156 dey fix character count.
|
||||||
dolaunch .EQ *-ofsQ
|
dolaunch .EQ *-ofsQ
|
||||||
lda sysentry does the app start with a jump ?
|
lda sysentry does the app start with a jump ?
|
||||||
cmp #$4C
|
cmp #$4C
|
||||||
bne L616F no, doesn't follow the convention.
|
bne L616F no, doesn't follow the convention.
|
||||||
lda #$EE check for the signature bytes.
|
lda #$EE check for the signature bytes.
|
||||||
cmp sysentry+3
|
cmp sysentry+3
|
||||||
bne L616F 1st one doesn't match, skip it.
|
bne L616F 1st one doesn't match, skip it.
|
||||||
cmp sysentry+4
|
cmp sysentry+4
|
||||||
beq L6170 both match, go get a filename message.
|
beq L6170 both match, go get a filename message.
|
||||||
L616F rts just return to launch the app.
|
L616F rts just return to launch the app.
|
||||||
L6170 lda #$FF put flag conditioning value on
|
L6170 lda #$FF put flag conditioning value on
|
||||||
pha the stack (assume error).
|
pha the stack (assume error).
|
||||||
clc native 16-bit mode.
|
clc native 16-bit mode.
|
||||||
xce
|
xce
|
||||||
LONG I,M
|
LONG I,M
|
||||||
pha make room on stack for user id.
|
pha make room on stack for user id.
|
||||||
_MMStartUp start up the memory manager.
|
_MMStartUp start up the memory manager.
|
||||||
pla get the user id and
|
pla get the user id and
|
||||||
pha leave it on the stack.
|
pha leave it on the stack.
|
||||||
pha
|
pha
|
||||||
pha make room on stack for new handle.
|
pha make room on stack for new handle.
|
||||||
pea $0000
|
pea $0000
|
||||||
pea $000A get a 10 byte block of memory.
|
pea $000A get a 10 byte block of memory.
|
||||||
pha put user id on stack.
|
pha put user id on stack.
|
||||||
pea $0000 totally unrestricted block.
|
pea $0000 totally unrestricted block.
|
||||||
pha LocationPtr (not used)
|
pha LocationPtr (not used)
|
||||||
pha
|
pha
|
||||||
_NewHandle go get the block of memory.
|
_NewHandle go get the block of memory.
|
||||||
pla get the handle from the stack.
|
pla get the handle from the stack.
|
||||||
plx
|
plx
|
||||||
bcs L620A branch if error, no memory available.
|
bcs L620A branch if error, no memory available.
|
||||||
phx leave the handle on the stack.
|
phx leave the handle on the stack.
|
||||||
pha
|
pha
|
||||||
pea $0002 'get' a message.
|
pea $0002 'get' a message.
|
||||||
pea $0001 get a type 1 (filename) message.
|
pea $0001 get a type 1 (filename) message.
|
||||||
phx put the message handle on the stack
|
phx put the message handle on the stack
|
||||||
pha (still in acc and x regs)
|
pha (still in acc and x regs)
|
||||||
_MessageCenter
|
_MessageCenter
|
||||||
bcs L6203 branch if no message.
|
bcs L6203 branch if no message.
|
||||||
pha leave 4 bytes free on stack
|
pha leave 4 bytes free on stack
|
||||||
pha (will be used as a direct page pointer)
|
pha (will be used as a direct page pointer)
|
||||||
tsc get the stack pointer.
|
tsc get the stack pointer.
|
||||||
phd save current direct register.
|
phd save current direct register.
|
||||||
inc a point to new direct page space.
|
inc a point to new direct page space.
|
||||||
tcd make a new direct page.
|
tcd make a new direct page.
|
||||||
lda [$04] de-reference the handle.
|
lda [$04] de-reference the handle.
|
||||||
sta $00
|
sta $00
|
||||||
ldy #$0002
|
ldy #$0002
|
||||||
lda [$04],y
|
lda [$04],y
|
||||||
sta $02
|
sta $02
|
||||||
ldy #$0006 get the message command.
|
ldy #$0006 get the message command.
|
||||||
lda [$00],y
|
lda [$00],y
|
||||||
bne bad_msg if print, then skip it.
|
bne bad_msg if print, then skip it.
|
||||||
lda $00 adjust pointer to filename string.
|
lda $00 adjust pointer to filename string.
|
||||||
clc
|
clc
|
||||||
adc #$0008
|
adc #$0008
|
||||||
sta $00
|
sta $00
|
||||||
bcc L61D1
|
bcc L61D1
|
||||||
inc $02
|
inc $02
|
||||||
L61D1 lda [$00] get the length of the string.
|
L61D1 lda [$00] get the length of the string.
|
||||||
and #$00FF mask off high (leaving just the length)
|
and #$00FF mask off high (leaving just the length)
|
||||||
SHORT M 8 bit accumulator
|
SHORT M 8 bit accumulator
|
||||||
cmp sysentry+5 check against length of app buffer.
|
cmp sysentry+5 check against length of app buffer.
|
||||||
beq L61DF if equal then continue with move.
|
beq L61DF if equal then continue with move.
|
||||||
bcs bad_msg if too long then bad message.
|
bcs bad_msg if too long then bad message.
|
||||||
L61DF tay string length.
|
L61DF tay string length.
|
||||||
L61E0 lda [$00],y get a character.
|
L61E0 lda [$00],y get a character.
|
||||||
sta sysentry+6,y store it in the app's filename buffer
|
sta sysentry+6,y store it in the app's filename buffer
|
||||||
sta inbuf,y and in prefix buffer.
|
sta inbuf,y and in prefix buffer.
|
||||||
dey
|
dey
|
||||||
bpl L61E0
|
bpl L61E0
|
||||||
lda #$00 change flag conditioning value on stack
|
lda #$00 change flag conditioning value on stack
|
||||||
sta $0D,s to indicate a filename is passed.
|
sta $0D,s to indicate a filename is passed.
|
||||||
bad_msg LONG M 16-bit acc.
|
bad_msg LONG M 16-bit acc.
|
||||||
pld restore direct register.
|
pld restore direct register.
|
||||||
pla fix stack because handle and userid
|
pla fix stack because handle and userid
|
||||||
pla still on stack.
|
pla still on stack.
|
||||||
pea $0003 now delete the message (done with it).
|
pea $0003 now delete the message (done with it).
|
||||||
pea $0001 message type 1.
|
pea $0001 message type 1.
|
||||||
pha garbage handle (not used).
|
pha garbage handle (not used).
|
||||||
pha
|
pha
|
||||||
_MessageCenter go delete the message.
|
_MessageCenter go delete the message.
|
||||||
L6203 _DisposeHandle throw away message (handle is on stack)
|
L6203 _DisposeHandle throw away message (handle is on stack)
|
||||||
L620A _MMShutDown shutdown the memory manager (userid is
|
L620A _MMShutDown shutdown the memory manager (userid is
|
||||||
sec on stack).
|
sec on stack).
|
||||||
xce back to emulation mode.
|
xce back to emulation mode.
|
||||||
LONGA OFF
|
LONGA OFF
|
||||||
pla condition z-flag with value on stack.
|
pla condition z-flag with value on stack.
|
||||||
bne L6231 then done.
|
bne L6231 then done.
|
||||||
ldx inbuf get length of pathname.
|
ldx inbuf get length of pathname.
|
||||||
lda #$2F look for slash.
|
lda #$2F look for slash.
|
||||||
L621B cmp inbuf,x
|
L621B cmp inbuf,x
|
||||||
beq L6225 when found, set prefix.
|
beq L6225 when found, set prefix.
|
||||||
dex
|
dex
|
||||||
bne L621B
|
bne L621B
|
||||||
bra L6231 if no slash, just skip it.
|
bra L6231 if no slash, just skip it.
|
||||||
L6225 dex don't include trailing slash.
|
L6225 dex don't include trailing slash.
|
||||||
stx inbuf set new length.
|
stx inbuf set new length.
|
||||||
jsr MLI set the P8 prefix.
|
jsr MLI set the P8 prefix.
|
||||||
.DA #$C6
|
.DA #$C6
|
||||||
.DA pfxparms
|
.DA pfxparms
|
||||||
lda #$00 set z-flag
|
lda #$00 set z-flag
|
||||||
L6231 rts and go launch the app.
|
L6231 rts and go launch the app.
|
||||||
|
|
||||||
* check for disk volume
|
* check for disk volume
|
||||||
*
|
*
|
||||||
* on exit:
|
* on exit:
|
||||||
* carry clear = disk was found
|
* carry clear = disk was found
|
||||||
* carry set = disk not found
|
* carry set = disk not found
|
||||||
|
|
||||||
ckfordrv .EQ *-ofsQ
|
ckfordrv .EQ *-ofsQ
|
||||||
clc native mode
|
clc native mode
|
||||||
xce
|
xce
|
||||||
LONG I 16-bit regs, 8-bit acc.
|
LONG I 16-bit regs, 8-bit acc.
|
||||||
ldx #sysentry+6 point to pathname buffer.
|
ldx #sysentry+6 point to pathname buffer.
|
||||||
jsr copyvol copy volume name to pathname buffer.
|
jsr copyvol copy volume name to pathname buffer.
|
||||||
.1 sec emulation mode.
|
.1 sec emulation mode.
|
||||||
xce
|
xce
|
||||||
jsr MLI get info on the volume.
|
jsr MLI get info on the volume.
|
||||||
.DA #$C4
|
.DA #$C4
|
||||||
.DA gfiparms
|
.DA gfiparms
|
||||||
bcc .2 branch if volume found,
|
bcc .2 branch if volume found,
|
||||||
clc (native mode)
|
clc (native mode)
|
||||||
xce
|
xce
|
||||||
LONG I,M
|
LONG I,M
|
||||||
jsr mountvol else ask user to mount the volume.
|
jsr mountvol else ask user to mount the volume.
|
||||||
bcc .1 if <return> pressed, then try again.
|
bcc .1 if <return> pressed, then try again.
|
||||||
sec emulation mode.
|
sec emulation mode.
|
||||||
xce
|
xce
|
||||||
sec disk not found.
|
sec disk not found.
|
||||||
.2 rts
|
.2 rts
|
||||||
|
|
||||||
* Prodos 8 parameter lists
|
* Prodos 8 parameter lists
|
||||||
|
|
||||||
pfxparms .EQ *-ofsQ set prefix parms.
|
pfxparms .EQ *-ofsQ set prefix parms.
|
||||||
.DA #01 one parm.
|
.DA #01 one parm.
|
||||||
.DA inbuf address of prefix.
|
.DA inbuf address of prefix.
|
||||||
opnparms .EQ *-ofsQ open parms.
|
opnparms .EQ *-ofsQ open parms.
|
||||||
.DA #3 3 parms.
|
.DA #3 3 parms.
|
||||||
.DA PrefixBuf pathname
|
.DA PrefixBuf pathname
|
||||||
.DA op_buf i/o buffer
|
.DA op_buf i/o buffer
|
||||||
oprefnum .EQ *-ofsQ
|
oprefnum .EQ *-ofsQ
|
||||||
.HS 00 reference #
|
.HS 00 reference #
|
||||||
eofparms .EQ *-ofsQ
|
eofparms .EQ *-ofsQ
|
||||||
.DA #02 2 parms
|
.DA #02 2 parms
|
||||||
eofrefn .EQ *-ofsQ
|
eofrefn .EQ *-ofsQ
|
||||||
.HS 00 reference #
|
.HS 00 reference #
|
||||||
eofval .EQ *-ofsQ
|
eofval .EQ *-ofsQ
|
||||||
.HS 000000 3 byte eof value
|
.HS 000000 3 byte eof value
|
||||||
readparm .EQ *-ofsQ
|
readparm .EQ *-ofsQ
|
||||||
.DA #04 4 parms
|
.DA #04 4 parms
|
||||||
rdrefnum .EQ *-ofsQ
|
rdrefnum .EQ *-ofsQ
|
||||||
.HS 00 reference #
|
.HS 00 reference #
|
||||||
.DA sysentry read into $2000 (bank 0).
|
.DA sysentry read into $2000 (bank 0).
|
||||||
rdcount .EQ *-ofsQ
|
rdcount .EQ *-ofsQ
|
||||||
.HS 0000 # of bytes to read.
|
.HS 0000 # of bytes to read.
|
||||||
.HS 0000 transfer count
|
.HS 0000 transfer count
|
||||||
closeprm .EQ *-ofsQ
|
closeprm .EQ *-ofsQ
|
||||||
.DA #1 1 parm
|
.DA #1 1 parm
|
||||||
closeref .EQ *-ofsQ
|
closeref .EQ *-ofsQ
|
||||||
.HS 00 reference #
|
.HS 00 reference #
|
||||||
quitparms .EQ *-ofsQ
|
quitparms .EQ *-ofsQ
|
||||||
.DA #04 4 parms.
|
.DA #04 4 parms.
|
||||||
.HS 00 quit back to launcher (GQuit)
|
.HS 00 quit back to launcher (GQuit)
|
||||||
.HS 0000
|
.HS 0000
|
||||||
.HS 00
|
.HS 00
|
||||||
.HS 0000
|
.HS 0000
|
||||||
gfiparms .EQ *-ofsQ get file info parms.
|
gfiparms .EQ *-ofsQ get file info parms.
|
||||||
.DA #$0A 10 parms
|
.DA #$0A 10 parms
|
||||||
.DA volbuf volume buffer
|
.DA volbuf volume buffer
|
||||||
.DA #0 access
|
.DA #0 access
|
||||||
.DA #0 file type
|
.DA #0 file type
|
||||||
.DA 0 aux type
|
.DA 0 aux type
|
||||||
.DA #0 storage type
|
.DA #0 storage type
|
||||||
.DA 0 blocks used
|
.DA 0 blocks used
|
||||||
.DA 0 modification date
|
.DA 0 modification date
|
||||||
.DA 0 modification time
|
.DA 0 modification time
|
||||||
.DA 0 creation date
|
.DA 0 creation date
|
||||||
.DA 0 creation time
|
.DA 0 creation time
|
||||||
|
|
||||||
* messages for P8 fatal error. maximum length of message is 35 characters.
|
* messages for P8 fatal error. maximum length of message is 35 characters.
|
||||||
* the error code will be displayed immediately after the final character.
|
* the error code will be displayed immediately after the final character.
|
||||||
|
@ -440,8 +440,8 @@ quitstr2 .EQ *-ofsQ
|
||||||
.DA #$14
|
.DA #$14
|
||||||
.AS "ProDOS Error = $"
|
.AS "ProDOS Error = $"
|
||||||
errval .EQ *-ofsQ hex error code gets stored here
|
errval .EQ *-ofsQ hex error code gets stored here
|
||||||
.AS " "
|
.AS " "
|
||||||
quitbtn2 .EQ *-ofsQ null string (no 2nd button)
|
quitbtn2 .EQ *-ofsQ null string (no 2nd button)
|
||||||
.HS 00
|
.HS 00
|
||||||
|
|
||||||
* messages for P8 mount volume. maximum length of message is 35 characters.
|
* messages for P8 mount volume. maximum length of message is 35 characters.
|
||||||
|
@ -453,11 +453,11 @@ mountmsg .EQ *-ofsQ
|
||||||
button1 .EQ *-ofsQ
|
button1 .EQ *-ofsQ
|
||||||
.DA #$0D
|
.DA #$0D
|
||||||
.AS "Accept: "
|
.AS "Accept: "
|
||||||
.DA #$1B mousetext on
|
.DA #$1B mousetext on
|
||||||
.DA #$0F inverse on
|
.DA #$0F inverse on
|
||||||
.DA #$4D mousetext return
|
.DA #$4D mousetext return
|
||||||
.DA #$0E normal on
|
.DA #$0E normal on
|
||||||
.DA #$18 mousetext off
|
.DA #$18 mousetext off
|
||||||
button2 .EQ *-ofsQ
|
button2 .EQ *-ofsQ
|
||||||
.DA #$0B
|
.DA #$0B
|
||||||
.AS "Cancel: Esc"
|
.AS "Cancel: Esc"
|
||||||
|
|
|
@ -9,60 +9,60 @@ NEW
|
||||||
ofsT .EQ tclock_0-tclk_in offset to Thunderclock org
|
ofsT .EQ tclock_0-tclk_in offset to Thunderclock org
|
||||||
|
|
||||||
tclock_0 ldx clkslt clock slot = $C1.
|
tclock_0 ldx clkslt clock slot = $C1.
|
||||||
lda clkmode,x save current mode
|
lda clkmode,x save current mode
|
||||||
pha
|
pha
|
||||||
lda #$A3 send numeric mode byte to Thunderclock
|
lda #$A3 send numeric mode byte to Thunderclock
|
||||||
jsr wttcp
|
jsr wttcp
|
||||||
clkslt .EQ *-ofsT+2 points to $C1.
|
clkslt .EQ *-ofsT+2 points to $C1.
|
||||||
jsr rdtcp read month, day of week, day of month
|
jsr rdtcp read month, day of week, day of month
|
||||||
clc and time into input buffer.
|
clc and time into input buffer.
|
||||||
ldx #$04 index for 5 values.
|
ldx #$04 index for 5 values.
|
||||||
ldy #$0C read minutes 1st, month last.
|
ldy #$0C read minutes 1st, month last.
|
||||||
.1 lda inbuf,y convert values to binary.
|
.1 lda inbuf,y convert values to binary.
|
||||||
and #$07 no value > 5 decimal.
|
and #$07 no value > 5 decimal.
|
||||||
sta pcl 'tens' place value
|
sta pcl 'tens' place value
|
||||||
asl multiply by 10
|
asl multiply by 10
|
||||||
asl
|
asl
|
||||||
adc pcl
|
adc pcl
|
||||||
asl
|
asl
|
||||||
adc inbuf+1,y add to ascii 'ones' place
|
adc inbuf+1,y add to ascii 'ones' place
|
||||||
sec and subtract out the ascii
|
sec and subtract out the ascii
|
||||||
sbc #$B0
|
sbc #$B0
|
||||||
sta pcl,x save converted value.
|
sta pcl,x save converted value.
|
||||||
dey index to next lowest value
|
dey index to next lowest value
|
||||||
dey
|
dey
|
||||||
dey
|
dey
|
||||||
dex are there more values?
|
dex are there more values?
|
||||||
bpl .1 if yes.
|
bpl .1 if yes.
|
||||||
tay contains month
|
tay contains month
|
||||||
lsr
|
lsr
|
||||||
ror
|
ror
|
||||||
ror
|
ror
|
||||||
ror high bit of month held in carry
|
ror high bit of month held in carry
|
||||||
ora A1L
|
ora A1L
|
||||||
sta p8date save low value of date.
|
sta p8date save low value of date.
|
||||||
php save high bit of month.
|
php save high bit of month.
|
||||||
and #$1F isolate day.
|
and #$1F isolate day.
|
||||||
adc tdays-1,y (y = month)
|
adc tdays-1,y (y = month)
|
||||||
bcc .2 branch if not Sept 13 thru 30th
|
bcc .2 branch if not Sept 13 thru 30th
|
||||||
adc #$03 adj for mod 7 when day > 256
|
adc #$03 adj for mod 7 when day > 256
|
||||||
.2 sec
|
.2 sec
|
||||||
.3 sbc #$07
|
.3 sbc #$07
|
||||||
bcs .3 loop until < 0.
|
bcs .3 loop until < 0.
|
||||||
adc #$07 make it in the range of 0-6.
|
adc #$07 make it in the range of 0-6.
|
||||||
sbc pch the delta provides years offset.
|
sbc pch the delta provides years offset.
|
||||||
bcs .4 branch if positive
|
bcs .4 branch if positive
|
||||||
adc #$07 else make it positive again.
|
adc #$07 else make it positive again.
|
||||||
.4 tay
|
.4 tay
|
||||||
lda yradj,y look up year
|
lda yradj,y look up year
|
||||||
plp and combine it with hi bit of month
|
plp and combine it with hi bit of month
|
||||||
rol
|
rol
|
||||||
sta p8date+1 P8 date
|
sta p8date+1 P8 date
|
||||||
lda A1L+1 hour
|
lda A1L+1 hour
|
||||||
sta p8time+1 P8 time
|
sta p8time+1 P8 time
|
||||||
lda A2L minute
|
lda A2L minute
|
||||||
sta p8time
|
sta p8time
|
||||||
pla restore previous mode.
|
pla restore previous mode.
|
||||||
ldx clkslt clock slot = $C1
|
ldx clkslt clock slot = $C1
|
||||||
sta clkmode,x
|
sta clkmode,x
|
||||||
H2F69 rts
|
H2F69 rts
|
||||||
|
@ -71,18 +71,18 @@ H2F69 rts
|
||||||
* one entry for each month. the values are modulo 256.
|
* one entry for each month. the values are modulo 256.
|
||||||
|
|
||||||
tdays .EQ *-ofsT
|
tdays .EQ *-ofsT
|
||||||
.DA #$00 January
|
.DA #$00 January
|
||||||
.DA #$1F February
|
.DA #$1F February
|
||||||
.DA #$3B March
|
.DA #$3B March
|
||||||
.DA #$5A April
|
.DA #$5A April
|
||||||
.DA #$78 May
|
.DA #$78 May
|
||||||
.DA #$97 June
|
.DA #$97 June
|
||||||
.DA #$B5 July
|
.DA #$B5 July
|
||||||
.DA #$D3 August
|
.DA #$D3 August
|
||||||
.DA #$F2 September
|
.DA #$F2 September
|
||||||
.DA #$14 October (MOD 256)
|
.DA #$14 October (MOD 256)
|
||||||
.DA #$33 November
|
.DA #$33 November
|
||||||
.DA #$51 December
|
.DA #$51 December
|
||||||
|
|
||||||
* the following table is used to look up the current year, based on
|
* the following table is used to look up the current year, based on
|
||||||
* the current month, day and day of week. The 1st entry corresponds
|
* the current month, day and day of week. The 1st entry corresponds
|
||||||
|
@ -92,12 +92,12 @@ tdays .EQ *-ofsT
|
||||||
|
|
||||||
yradj .EQ *-ofsT
|
yradj .EQ *-ofsT
|
||||||
.DA #$60 Monday
|
.DA #$60 Monday
|
||||||
.DA #$5F Sunday
|
.DA #$5F Sunday
|
||||||
.DA #$5E Saturday
|
.DA #$5E Saturday
|
||||||
.DA #$5D Friday
|
.DA #$5D Friday
|
||||||
.DA #$62 Thursday
|
.DA #$62 Thursday
|
||||||
.DA #$61 Wednesday
|
.DA #$61 Wednesday
|
||||||
.DA #$60 Tuesday
|
.DA #$60 Tuesday
|
||||||
tclk_end .EQ * end of obj tclock_0.
|
tclk_end .EQ * end of obj tclock_0.
|
||||||
.HS 000000 pad
|
.HS 000000 pad
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
|
2054
ProDOS.203/ProDOS.S.XDOS.C.txt
Normal file
2054
ProDOS.203/ProDOS.S.XDOS.C.txt
Normal file
File diff suppressed because it is too large
Load Diff
546
ProDOS.203/ProDOS.S.XDOS.M.txt
Normal file
546
ProDOS.203/ProDOS.S.XDOS.M.txt
Normal file
|
@ -0,0 +1,546 @@
|
||||||
|
NEW
|
||||||
|
AUTO 3,1
|
||||||
|
* MEMMGR memory manager
|
||||||
|
*
|
||||||
|
* allocate buffer in memory tables
|
||||||
|
|
||||||
|
alcbuffr .EQ *-ofsX
|
||||||
|
ldy #$04 index to user specified buffer.
|
||||||
|
alcbufr1 .EQ *-ofsX
|
||||||
|
lda (A3L),y this buffer must be on a page boundary.
|
||||||
|
tax save for validation.
|
||||||
|
cmp #$08
|
||||||
|
bcc L4E1E cannot be lower than video !
|
||||||
|
cmp #$BC nor greater than $BB00
|
||||||
|
bcs L4E1E since it would wipe out globals...
|
||||||
|
sta datptr+1
|
||||||
|
dey
|
||||||
|
lda (A3L),y low address should be zero !
|
||||||
|
sta datptr
|
||||||
|
bne L4E1E error if not page boundary.
|
||||||
|
inx add 4 pages for 1k buffer.
|
||||||
|
inx
|
||||||
|
inx
|
||||||
|
inx
|
||||||
|
L4DED dex test for conflicts.
|
||||||
|
jsr cmembit test for free buffer space
|
||||||
|
and memmap,y P8 memory bitmap
|
||||||
|
bne L4E1E report memory conflict, if any.
|
||||||
|
cpx datptr+1 test all 4 pages.
|
||||||
|
bne L4DED
|
||||||
|
inx add 4 pages again for allocation.
|
||||||
|
inx
|
||||||
|
inx
|
||||||
|
inx
|
||||||
|
L4DFE dex set proper bits to 1
|
||||||
|
jsr cmembit
|
||||||
|
ora memmap,y to mark it's allocation.
|
||||||
|
sta memmap,y
|
||||||
|
cpx datptr+1 set all 4 pages
|
||||||
|
bne L4DFE
|
||||||
|
ldy fcbptr calculate buffer number
|
||||||
|
lda fcbbuf,y
|
||||||
|
asl buffer number = (entnum) * 2.
|
||||||
|
sta fcbbuf+11,y save it in fcb.
|
||||||
|
tax use entnum * 2 as index to global
|
||||||
|
lda datptr+1 buffer addr tables. get addr already
|
||||||
|
sta buftbl-1,x validated as good. store hi addr
|
||||||
|
clc (entnums start at 1, not 0)
|
||||||
|
rts
|
||||||
|
L4E1E lda #$56 buffer is in use or not legal
|
||||||
|
sec
|
||||||
|
rts
|
||||||
|
getbufadr .EQ *-ofsX
|
||||||
|
tax index into global buffer table.
|
||||||
|
lda buftbl-2,x
|
||||||
|
sta bufaddrl
|
||||||
|
lda buftbl-1,x
|
||||||
|
sta bufaddrh
|
||||||
|
rts
|
||||||
|
relbuffr .EQ *-ofsX preserve buffer address in 'bufaddr'
|
||||||
|
jsr getbufadr
|
||||||
|
tay returns high buffer address in acc.
|
||||||
|
beq L4E54 branch if unallocated buffer space.
|
||||||
|
stz buftbl-1,x take address out of buffer list.
|
||||||
|
stz buftbl-2,x (x was set up by getbufadr)
|
||||||
|
freebuf .EQ *-ofsX
|
||||||
|
ldx bufaddrh get hi buffer address
|
||||||
|
inx add 4 pages to account for 1k space.
|
||||||
|
inx
|
||||||
|
inx
|
||||||
|
inx
|
||||||
|
L4E43 dex drop to next lower page.
|
||||||
|
jsr cmembit get bit and position to memtable of
|
||||||
|
eor #$FF this page. invert mask.
|
||||||
|
and memmap,y mark address as free space.
|
||||||
|
sta memmap,y
|
||||||
|
cpx bufaddrh all pages freed ?
|
||||||
|
bne L4E43 no.
|
||||||
|
L4E54 clc no error.
|
||||||
|
rts
|
||||||
|
|
||||||
|
* calculate memory allocation bit position.
|
||||||
|
* on entry: x = high address of buffer, low address assumed zero.
|
||||||
|
* on exit: acc = allocation bit mask, x = unchanged, y = pointer to memtabl byte
|
||||||
|
|
||||||
|
cmembit .EQ *-ofsX
|
||||||
|
txa page address
|
||||||
|
and #$07 which page in any 2k set ?
|
||||||
|
tay use as index to determine
|
||||||
|
lda whichbit,y bit position representation.
|
||||||
|
pha save bit position mask for now.
|
||||||
|
txa page address.
|
||||||
|
lsr a
|
||||||
|
lsr a determine 2k set
|
||||||
|
lsr a
|
||||||
|
tay return it in y.
|
||||||
|
pla restore bit mask. return bit position
|
||||||
|
rts in a & y, pointer to memtabl in x.
|
||||||
|
valdbuf .EQ *-ofsX
|
||||||
|
lda usrbuf+1 high address of user's buffer
|
||||||
|
cmp #$02 must be greater than page 2.
|
||||||
|
bcc L4E1E report bad buffer
|
||||||
|
ldx cbytes+1
|
||||||
|
lda cbytes get cbytes-1 value.
|
||||||
|
sbc #$01 (carry is set)
|
||||||
|
bcs L4E76
|
||||||
|
dex
|
||||||
|
L4E76 clc
|
||||||
|
adc usrbuf calculate end of request address.
|
||||||
|
txa do high address.
|
||||||
|
adc usrbuf+1 the final address
|
||||||
|
tax must be less than $BFnn (globals)
|
||||||
|
cpx #$BF
|
||||||
|
bcs L4E1E report bad buffer.
|
||||||
|
inx loop thru all affected pages.
|
||||||
|
vldbuf1 .EQ *-ofsX
|
||||||
|
L4E82 dex check next lower page.
|
||||||
|
jsr cmembit
|
||||||
|
and memmap,y if 0 then no conflict.
|
||||||
|
bne L4E1E branch if conflict.
|
||||||
|
cpx usrbuf+1 was that the last (lowest) page ?
|
||||||
|
bne L4E82 if not.
|
||||||
|
clc all pages ok.
|
||||||
|
rts
|
||||||
|
|
||||||
|
getbuf .EQ *-ofsX give user address of file buffer
|
||||||
|
ldy #$02 referenced by refnum.
|
||||||
|
lda bufaddrl
|
||||||
|
sta (A3L),y
|
||||||
|
iny
|
||||||
|
lda bufaddrh
|
||||||
|
sta (A3L),y
|
||||||
|
clc no errors possible
|
||||||
|
rts
|
||||||
|
|
||||||
|
setbuf .EQ *-ofsX
|
||||||
|
ldy #$03
|
||||||
|
jsr alcbufr1 allocate new buffer address over old one
|
||||||
|
bcs L4EC7 report any errors immediately
|
||||||
|
lda bufaddrh
|
||||||
|
sta usrbuf+1
|
||||||
|
lda bufaddrl
|
||||||
|
sta usrbuf
|
||||||
|
jsr freebuf free address space of old buffer
|
||||||
|
ldy #$00
|
||||||
|
ldx #$03
|
||||||
|
L4EB8 lda (usrbuf),y move all 4 pages of the buffer to
|
||||||
|
sta (datptr),y new location.
|
||||||
|
iny
|
||||||
|
bne L4EB8
|
||||||
|
inc datptr+1
|
||||||
|
inc usrbuf+1
|
||||||
|
dex
|
||||||
|
bpl L4EB8
|
||||||
|
clc no errors
|
||||||
|
L4EC7 rts
|
||||||
|
|
||||||
|
|
||||||
|
* move 3 pages of dispatcher from 'displc2' to 'dispadr'
|
||||||
|
* this move routine must be resident above $E000 at all times
|
||||||
|
|
||||||
|
calldisp .EQ *-ofsX
|
||||||
|
lda altram read/write RAM bank 2
|
||||||
|
lda altram
|
||||||
|
lda #>dispadr
|
||||||
|
sta A2L+1
|
||||||
|
lda #<dispadr
|
||||||
|
sta A2L
|
||||||
|
lda #>displc2
|
||||||
|
sta A1L+1
|
||||||
|
stz A1L
|
||||||
|
ldy #$00
|
||||||
|
ldx #$03 3 pages to move.
|
||||||
|
L4EE0 dey move a page of code.
|
||||||
|
lda (A1L),y
|
||||||
|
sta (A2L),y
|
||||||
|
tya
|
||||||
|
bne L4EE0
|
||||||
|
inc1L+1 pointers to next page
|
||||||
|
inc2L+1
|
||||||
|
dex move all pages needed
|
||||||
|
bne L4EE0
|
||||||
|
lda ramin read/write RAM bank 1
|
||||||
|
lda ramin swap mli space back in
|
||||||
|
stz mliact MLI active flag
|
||||||
|
stz softev
|
||||||
|
lda #>dispadr point RESET to dispatch entry
|
||||||
|
sta softev+1
|
||||||
|
eor #$A5
|
||||||
|
sta pwredup power up byte
|
||||||
|
jmp dispadr
|
||||||
|
|
||||||
|
* translate a prodos call into a smartport call
|
||||||
|
* to access unseen smartport devices
|
||||||
|
|
||||||
|
remap_sp .EQ *-ofsX
|
||||||
|
ldx #$03 assume 3 parameters.
|
||||||
|
lda A4L command number
|
||||||
|
sta cmdnum
|
||||||
|
bne L4F1B taken if not status call
|
||||||
|
ldy #<spstatlist set up memory for the status list buffer
|
||||||
|
sty buf fake up the prodos parameters
|
||||||
|
ldy #>spstatlist
|
||||||
|
sty buf+1
|
||||||
|
stz bloknml set statcode = 0 for simple status call
|
||||||
|
L4F1B cmp #$03 format command ?
|
||||||
|
bne L4F21 no.
|
||||||
|
ldx #$01 format has only 1 parameter.
|
||||||
|
L4F21 stx statparms set # of parms.
|
||||||
|
lda unitnum
|
||||||
|
lsr a turn unit number into an index
|
||||||
|
lsr a
|
||||||
|
lsr a
|
||||||
|
lsr a
|
||||||
|
tax
|
||||||
|
lda spunit-1,x get the smartport unit number and
|
||||||
|
sta sp_unitnum store into smartport parm list.
|
||||||
|
lda spvectlo-1,x
|
||||||
|
sta sp_vector+1 copy smartport entry address
|
||||||
|
lda spvecthi-1,x
|
||||||
|
sta sp_vector+2
|
||||||
|
ldx #$04 copy buffer pointer and block #
|
||||||
|
L4F3F lda buf-1,x from prodos parameters
|
||||||
|
sta sp_bufptr-1,x to smartport parameter block
|
||||||
|
dex
|
||||||
|
bne L4F3F
|
||||||
|
sp_vector .EQ *-ofsX smartport call
|
||||||
|
jsr $0000 (entry address gets modified)
|
||||||
|
cmdnum .EQ *-ofsX
|
||||||
|
.HS 00 command #
|
||||||
|
.DA statparms'
|
||||||
|
bcs L4F6E
|
||||||
|
ldx cmdnum status call ?
|
||||||
|
bne L4F6E no...
|
||||||
|
ldx spstatlist+1 else get the block count
|
||||||
|
ldy spstatlist+2
|
||||||
|
lda spstatlist get the returned status.
|
||||||
|
bit #$10 is there a disk present ?
|
||||||
|
bne L4F65 yes, check for write protected.
|
||||||
|
lda #$2F return offline error.
|
||||||
|
bra L4F6D
|
||||||
|
L4F65 and #$44 mask all but write allowed and write
|
||||||
|
eor #$40 protected bits. if allowed and not
|
||||||
|
beq L4F6E protected, exit with carry clear
|
||||||
|
lda #$2B else return write protected error.
|
||||||
|
L4F6D sec
|
||||||
|
L4F6E rts
|
||||||
|
spvectlo .EQ *-ofsX storage for low byte of smartport
|
||||||
|
.DA #0000000000000000' entry.
|
||||||
|
.DA #00000000000000'
|
||||||
|
spvecthi .EQ *-ofsX storage for high byte of smartport
|
||||||
|
.DA #0000000000000000' entry.
|
||||||
|
.DA #00000000000000'
|
||||||
|
statparms .EQ *-ofsX # of parms (always 3 except format)
|
||||||
|
dc h'03'
|
||||||
|
sp_unitnum .EQ *-ofsX
|
||||||
|
.HS 00 unit number
|
||||||
|
sp_bufptr .EQ *-ofsX
|
||||||
|
.HS 0000 data buffer
|
||||||
|
dc h'000000' block number (3 bytes)
|
||||||
|
|
||||||
|
* data tables
|
||||||
|
|
||||||
|
scnums .EQ *-ofsX table of valid mli command numbers.
|
||||||
|
dc h'D3000000'
|
||||||
|
.DA #40410000808182'
|
||||||
|
.DA #65C0C1C2C3C4C5C6'
|
||||||
|
.DA #C7C8C9CACBCCCDCE'
|
||||||
|
.DA #CF00D0D1D2'
|
||||||
|
pcntbl .EQ *-ofsX parameter counts for the calls
|
||||||
|
dc h'02FFFF'
|
||||||
|
.DA #FF0201FFFF030300'
|
||||||
|
.DA #04070102070A0201'
|
||||||
|
.DA #0103030404010102'
|
||||||
|
.DA #02FF020202'
|
||||||
|
|
||||||
|
* command table
|
||||||
|
|
||||||
|
cmdtable .EQ *-ofsX
|
||||||
|
.DA create' create
|
||||||
|
.DA destroy' destroy
|
||||||
|
.DA rename' rename
|
||||||
|
.DA setinfo' setinfo
|
||||||
|
.DA getinfo' getinfo
|
||||||
|
.DA online' online
|
||||||
|
.DA setprefx' set prefix
|
||||||
|
.DA getprefx' get prefix
|
||||||
|
.DA openf' open
|
||||||
|
.DA newline' newline
|
||||||
|
.DA readf' read
|
||||||
|
.DA writef' write
|
||||||
|
.DA closef' close
|
||||||
|
.DA flushf' flush
|
||||||
|
.DA setmark' set mark
|
||||||
|
.DA getmark' get mark
|
||||||
|
.DA seteof' seteof
|
||||||
|
.DA geteof' geteof
|
||||||
|
.DA setbuf' setbuf
|
||||||
|
.DA getbuf' getbuf
|
||||||
|
|
||||||
|
* corresponding command function bytes
|
||||||
|
|
||||||
|
disptch .EQ *-ofsX
|
||||||
|
dc h'A0A1A2A3'
|
||||||
|
.DA #84050607'
|
||||||
|
dc h'88494A4B'
|
||||||
|
.DA #2C2D4E4F'
|
||||||
|
.DA #50515253'
|
||||||
|
|
||||||
|
dinctbl .EQ *-ofsX table to increment
|
||||||
|
dc h'0100000200' directory usage/eof counts
|
||||||
|
pass .EQ *-ofsX
|
||||||
|
dc h'75'
|
||||||
|
xdosver .EQ *-ofsX
|
||||||
|
dc h'00'
|
||||||
|
compat .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
dc h'C3270D000000'
|
||||||
|
rootstuf .EQ *-ofsX
|
||||||
|
.DA #0F02000400000800'
|
||||||
|
whichbit .EQ *-ofsX
|
||||||
|
.DA #8040201008040201'
|
||||||
|
ofcbtbl .EQ *-ofsX
|
||||||
|
.DA #0C0D1819151617'
|
||||||
|
inftabl .EQ *-ofsX
|
||||||
|
.DA #1E101F2080939421'
|
||||||
|
.DA #22232418191A1B'
|
||||||
|
deathmsg .EQ *-ofsX
|
||||||
|
dc h'20'
|
||||||
|
msb on
|
||||||
|
dc c'RESTART SYSTEM-$01'
|
||||||
|
dc h'20'
|
||||||
|
|
||||||
|
*** work space ***
|
||||||
|
|
||||||
|
* note: this area is accessed by code that depends on the order of these
|
||||||
|
* variables in the file control block and temporary directory.
|
||||||
|
|
||||||
|
own_blk .EQ *-ofsX
|
||||||
|
.HS 0000
|
||||||
|
own_ent .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
own_len .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
h_credt .EQ *-ofsX
|
||||||
|
.HS 0000 directory creation date
|
||||||
|
.HS 0000 directory creation time
|
||||||
|
.HS 00 version under which this dir created
|
||||||
|
.HS 00 earliest version that it's compatible
|
||||||
|
h_attr .EQ *-ofsX attributes (protect bit, etc.)
|
||||||
|
.HS 00
|
||||||
|
h_entln .EQ *-ofsX length of each entry in this directory
|
||||||
|
.HS 00
|
||||||
|
h_maxent .EQ *-ofsX maximum number of entries per block
|
||||||
|
.HS 00
|
||||||
|
h_fcnt .EQ *-ofsX current # of files in this directory
|
||||||
|
.HS 0000
|
||||||
|
h_bmap .EQ *-ofsX address of first allocation bitmap
|
||||||
|
.HS 0000
|
||||||
|
h_tblk .EQ *-ofsX total number of blocks on this unit
|
||||||
|
.HS 0000
|
||||||
|
d_dev .EQ *-ofsX device number of this directory entry
|
||||||
|
.HS 00
|
||||||
|
d_head .EQ *-ofsX address of <sub> directory header
|
||||||
|
.HS 0000
|
||||||
|
d_entblk .EQ *-ofsX address of block which contains entry
|
||||||
|
.HS 0000
|
||||||
|
d_entnum .EQ *-ofsX entry number within block
|
||||||
|
.HS 00
|
||||||
|
d_stor .EQ *-ofsX
|
||||||
|
dc h'0000000000000000' file name
|
||||||
|
dc h'0000000000000000'
|
||||||
|
d_filid .EQ *-ofsX user's identification byte
|
||||||
|
.HS 00
|
||||||
|
d_frst .EQ *-ofsX first block of file
|
||||||
|
.HS 0000
|
||||||
|
d_usage .EQ *-ofsX # of blocks allocated to this file
|
||||||
|
.HS 0000
|
||||||
|
d_eof .EQ *-ofsX current end of file marker
|
||||||
|
dc h'000000'
|
||||||
|
d_credt .EQ *-ofsX
|
||||||
|
.HS 0000 file creation date
|
||||||
|
.HS 0000 file creation time
|
||||||
|
d_sosver .EQ *-ofsX sos version that created this file
|
||||||
|
.HS 00
|
||||||
|
d_comp .EQ *-ofsX backward version compatibility
|
||||||
|
.HS 00
|
||||||
|
d_attr .EQ *-ofsX attributes (protect, r/w, enable, etc.)
|
||||||
|
.HS 00
|
||||||
|
d_auxid .EQ *-ofsX user auxilliary identification
|
||||||
|
.HS 0000
|
||||||
|
d_moddt .EQ *-ofsX
|
||||||
|
.HS 0000 file's last modification date
|
||||||
|
.HS 0000 file's last modification time
|
||||||
|
d_dhdr .EQ *-ofsX file directory header block address
|
||||||
|
.HS 0000
|
||||||
|
scrtch .EQ *-ofsX scratch area for
|
||||||
|
.DA #00000000' allocation address conversion.
|
||||||
|
oldeof .EQ *-ofsX temp used in r/w
|
||||||
|
dc h'000000'
|
||||||
|
oldmark .EQ *-ofsX
|
||||||
|
.DA #000000'
|
||||||
|
xvcbptr .EQ *-ofsX used in 'cmpvcb' as a temp
|
||||||
|
.HS 00
|
||||||
|
vcbptr .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
fcbptr .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
fcbflg .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
reql .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
reqh .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
levels .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
totent .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
entcntl .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
entcnth .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
cntent .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
nofree .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
bmcnt .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
saptr .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
pathcnt .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
p_dev .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
p_blok .EQ *-ofsX
|
||||||
|
.HS 0000
|
||||||
|
bmptr .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
basval .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
half .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
|
||||||
|
* bitmap info tables
|
||||||
|
|
||||||
|
bmastat .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
bmadev .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
bmadadr .EQ *-ofsX
|
||||||
|
.HS 0000
|
||||||
|
bmacmap .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
tposll .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
tposlh .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
tposhi .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
rwreql .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
rwreqh .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
nlchar .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
nlmask .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
ioaccess .EQ *-ofsX has a call been made to
|
||||||
|
.HS 00 disk device handler ?
|
||||||
|
cmdtemp .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
bkbitflg .EQ *-ofsX used to set or clear backup bit
|
||||||
|
.HS 00
|
||||||
|
duplflag .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
vcbentry .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
|
||||||
|
* xdos temporary variables
|
||||||
|
|
||||||
|
namcnt .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
rnptr .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
namptr .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
vnptr .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
prfxflg .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
cferr .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
|
||||||
|
* deallocation temporary variables
|
||||||
|
|
||||||
|
firstbl .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
firstbh .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
stortyp .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
deblock .EQ *-ofsX
|
||||||
|
.HS 0000
|
||||||
|
dtree .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
dsap .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
dseed .EQ *-ofsX
|
||||||
|
.HS 0000
|
||||||
|
topdest .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
dtmpx .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
loklst .EQ *-ofsX look list of recognized device numbers
|
||||||
|
dealbufl .EQ *-ofsX
|
||||||
|
.HS 0000000000000000
|
||||||
|
dealbufh .EQ *-ofsX
|
||||||
|
.HS 0000000000000000
|
||||||
|
cbytes .EQ *-ofsX
|
||||||
|
.HS 0000
|
||||||
|
.HS 00 cbytes+2 must = 0
|
||||||
|
bufaddrl .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
bufaddrh .EQ *-ofsX
|
||||||
|
.HS 00
|
||||||
|
goadr .EQ *-ofsX
|
||||||
|
.HS 0000
|
||||||
|
delflag .EQ *-ofsX used by 'detree' to know if called
|
||||||
|
.HS 00 from delete (destroy).
|
||||||
|
|
||||||
|
* zero fill to page boundary - 3 ($FEFD). so that cortland flag stays
|
||||||
|
* within page boundary.
|
||||||
|
|
||||||
|
.HS 00000000000000
|
||||||
|
.HS 0000000000
|
||||||
|
|
||||||
|
.DA calldisp
|
||||||
|
cortflag .EQ *-ofsX cortland flag. 1 = Cortland system
|
||||||
|
.HS 00 (must stay within page boundary)
|
||||||
|
|
||||||
|
* end of obj mli_2
|
||||||
|
*--------------------------------------
|
||||||
|
MAN
|
||||||
|
SAVE USR/SRC/PRODOS.203/PRODOS.S.XDOS.M
|
||||||
|
LOAD USR/SRC/PRODOS.203/PRODOS.S
|
||||||
|
ASM
|
File diff suppressed because it is too large
Load Diff
|
@ -17,19 +17,19 @@ ZP.DstPtr .EQ $14
|
||||||
PrefixBuf .EQ $280
|
PrefixBuf .EQ $280
|
||||||
DirBlkBuf .EQ $C00
|
DirBlkBuf .EQ $C00
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
* $2000 mli_0 mli loader/relocator
|
* $2000 mli_0 mli loader/relocator
|
||||||
* $2C80 ram_1 installer for /RAM
|
* $2C80 ram_1 installer for /RAM
|
||||||
* $2D00 ram_2 /RAM driver in main lc
|
* $2D00 ram_2 /RAM driver in main lc
|
||||||
* $2D9B mli_3 interrupts
|
* $2D9B mli_3 interrupts
|
||||||
* $2E00 mli_1 global page
|
* $2E00 mli_1 global page
|
||||||
* $2F00 tclock_0 Thunderclock driver
|
* $2F00 tclock_0 Thunderclock driver
|
||||||
* $2F80 cclock_0 Cortland clock driver
|
* $2F80 cclock_0 Cortland clock driver
|
||||||
* $3000 mli_2 xdos mli & block file manager
|
* $3000 mli_2 xdos mli & block file manager
|
||||||
* $5100 ram_0 /RAM driver in aux mem
|
* $5100 ram_0 /RAM driver in aux mem
|
||||||
* $5300 xrw_0 disk core routines
|
* $5300 xrw_0 disk core routines
|
||||||
* $5A00 sel_0 dispatcher
|
* $5A00 sel_0 dispatcher
|
||||||
* $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
|
||||||
|
|
||||||
|
@ -41,6 +41,8 @@ DirBlkBuf .EQ $C00
|
||||||
.INB USR/SRC/PRODOS.203/PRODOS.S.TCLK
|
.INB USR/SRC/PRODOS.203/PRODOS.S.TCLK
|
||||||
.INB USR/SRC/PRODOS.203/PRODOS.S.CCLK
|
.INB USR/SRC/PRODOS.203/PRODOS.S.CCLK
|
||||||
.INB USR/SRC/PRODOS.203/PRODOS.S.XDOS
|
.INB USR/SRC/PRODOS.203/PRODOS.S.XDOS
|
||||||
|
.INB USR/SRC/PRODOS.203/PRODOS.S.XDOS.C
|
||||||
|
.INB USR/SRC/PRODOS.203/PRODOS.S.XDOS.M
|
||||||
.INB USR/SRC/PRODOS.203/PRODOS.S.RAMX
|
.INB USR/SRC/PRODOS.203/PRODOS.S.RAMX
|
||||||
.INB USR/SRC/PRODOS.203/PRODOS.S.DISKII
|
.INB USR/SRC/PRODOS.203/PRODOS.S.DISKII
|
||||||
.INB USR/SRC/PRODOS.203/PRODOS.S.SEL0
|
.INB USR/SRC/PRODOS.203/PRODOS.S.SEL0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user