Kernel 0.93+

This commit is contained in:
Rémy GIBERT 2019-09-10 17:46:56 +02:00
parent 683ebaf9cd
commit 834281c40b
15 changed files with 1692 additions and 1907 deletions

Binary file not shown.

View File

@ -4,64 +4,63 @@ NEW
* Cortland clock driver * Cortland clock driver
* $2F80-$2FFC moved to $D742 * $2F80-$2FFC moved to $D742
ofsC .EQ cclock_0-tclk_in offset to Cortland clock org .OP 65816
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 a 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 a increment month for Prodos 8 format.
asl a shift month as it sits in between asl a shift month as it sits in between
asl a the year and day values. asl a the year and day values.
asl a asl a
asl a asl a
asl a asl a
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
.DA #00' state of the state register .HS 00 state of the state register
dc c'JIMJAYKERRY' .AS "JIMJAYKERRY&MIKE"
dc h'26' ampersand (Orca assembler doesn't like) .HS 0000000000000000 pad 0's until length
dc c'MIKE' .HS 0000000000000000 of driver = 125 bytes.
.DA #0000000000000000' pad 0's until length .HS 000000000000
.DA #0000000000000000' of driver = 125 bytes. cclk_end .EQ * end of obj cclock_0.
.DA #000000000000' .HS 000000 pad to page boundary
cclk_end .EQ * end of obj cclock_0.
dc h'000000' pad to page boundary
LONGI OFF LONGI OFF
*-------------------------------------- *--------------------------------------
MAN MAN

File diff suppressed because it is too large Load Diff

View File

@ -3,186 +3,194 @@ NEW
* object code = mli_1 * object code = mli_1
* global page * global page
ofsG .EQ H2E00-MLI offset to global org 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 #00' .DA #0
drivertbl1 .EQ *-ofsG device driver table 1 drivertbl1 .EQ *-ofsG device driver table 1
dc i2'nodevice' slot 0 reserved .DA nodevice
dc i2'nodevice' s1, d1 .DA nodevice
dc i2'nodevice' s2, d1 .DA nodevice
dc i2'nodevice' s3, d1 .DA nodevice
dc i2'nodevice' s4, d1 .DA nodevice
dc i2'nodevice' s5, d1 .DA nodevice
dc i2'nodevice' s6, d1 .DA nodevice
dc i2'nodevice' s7, d1 .DA nodevice
drivertbl2 .EQ *-ofsG device driver table 2 drivertbl2 .EQ *-ofsG device driver table 2
dc i2'nodevice' slot 0 reserved .DA nodevice
dc i2'nodevice' s1, d2 .DA nodevice
dc i2'nodevice' s2, d2 .DA nodevice
dc i2'nodevice' s3, d2 .DA nodevice
dc i2'nodevice' s4, d2 .DA nodevice
dc i2'nodevice' s5, d2 .DA nodevice
dc i2'nodevice' s6, d2 .DA nodevice
dc i2'nodevice' s7, d2 .DA nodevice
devnum .EQ *-ofsG most recent accessed device devnum .EQ *-ofsG most recent accessed device
.DA #00' .DA #0
numdevs .EQ *-ofsG count (-1) active devices numdevs .EQ *-ofsG count (-1) active devices
dc h'FF' .DA #$ff
devlist .EQ *-ofsG active device list devlist .EQ *-ofsG active device list
dc h'00000000000000' up to 14 units may be active .HS 00000000000000 up to 14 units may be active
dc h'00000000000000' .HS 00000000000000
.DA #00' .DA #0
msb off
dc c'(C)APPLE ' .AS "(C)APPLE "
mlient1 .EQ *-ofsG mlient1 .EQ *-ofsG
php php
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 #00' .DA #0
afbank .EQ *-ofsG afbank .EQ *-ofsG
dc h'00' .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
dc h'C000000000000000' .HS C000000000000000
dc h'0000000000000000' .HS 0000000000000000
.DA #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
dc h'0000' file #1 .HS 0000 file #1
dc h'0000' file #2 .HS 0000 file #2
dc h'0000' file #3 .HS 0000 file #3
dc h'0000' file #4 .HS 0000 file #4
.DA #0000' file #5 .HS 0000 file #5
dc h'0000' file #6 .HS 0000 file #6
dc h'0000' file #7 .HS 0000 file #7
dc h'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
.DA #0000' int #1 .HS 0000 int #1
dc h'0000' int #2 .HS 0000 int #2
dc h'0000' int #3 .HS 0000 int #3
dc h'0000' int #4 .HS 0000 int #4
p8areg .EQ *-ofsG A register savearea p8areg .EQ *-ofsG A register savearea
.DA #00' .DA #0
p8xreg .EQ *-ofsG X register savearea p8xreg .EQ *-ofsG X register savearea
dc h'00' .DA #0
p8yreg .EQ *-ofsG Y register savearea p8yreg .EQ *-ofsG Y register savearea
dc h'00' .DA #0
p8sreg .EQ *-ofsG S register savearea p8sreg .EQ *-ofsG S register savearea
dc h'00' .DA #0
p8preg .EQ *-ofsG P register savearea p8preg .EQ *-ofsG P register savearea
dc h'00' .DA #0
bankid .EQ *-ofsG bank ID byte (ROM/RAM) bankid .EQ *-ofsG bank ID byte (ROM/RAM)
dc h'01' .DA #1
intadr .EQ *-ofsG interrupt return address intadr .EQ *-ofsG interrupt return address
dc h'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
dc h'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
dc h'0000' .HS 0000
flevel .EQ *-ofsG current file level flevel .EQ *-ofsG current file level
dc h'00' .DA #0
bubit .EQ *-ofsG backup bit disable, setfileinfo only bubit .EQ *-ofsG backup bit disable, setfileinfo only
dc h'00' .DA #0
spare1 .EQ *-ofsG used to save acc spare1 .EQ *-ofsG used to save acc
dc h'00' .DA #0
newpfxptr .EQ *-ofsG appletalk alternate prefix ptr newpfxptr .EQ *-ofsG appletalk alternate prefix ptr
dc h'00' .DA #0
machid .EQ *-ofsG machine ID byte machid .EQ *-ofsG machine ID byte
dc h'00' .DA #0
rommap .EQ *-ofsG slot ROM bit map rommap .EQ *-ofsG slot ROM bit map
dc h'00' .DA #0
preflag .EQ *-ofsG prefix active flag preflag .EQ *-ofsG prefix active flag
dc h'00' .DA #0
mliact .EQ *-ofsG MLI active flag mliact .EQ *-ofsG MLI active flag
dc h'00' .DA #0
mliretn .EQ *-ofsG last MLI call return address mliretn .EQ *-ofsG last MLI call return address
dc h'0000' .DA 0
mlix .EQ *-ofsG MLI X register savearea mlix .EQ *-ofsG MLI X register savearea
dc h'00' .DA #0
mliy .EQ *-ofsG MLI Y register savearea mliy .EQ *-ofsG MLI Y register savearea
dc h'00' .DA #0
* language card bank switching routines which must reside at $BFA0 because * language card bank switching routines which must reside at $BFA0 because
* workstation software patches this area * workstation software patches this area
HBFA0 .EQ *-ofsG HBFA0 .EQ *-ofsG
eor $E000 test for rom enable eor $E000 test for rom enable
beq L2EAA taken if ram enabled beq .1 taken if ram enabled
sta romin read ROM sta romin read ROM
bne L2EB5 always bne .2 always
L2EAA lda bnkbyt2 for alternate ram .1 lda bnkbyt2 for alternate ram
eor $D000 test eor $D000 test
beq L2EB5 branch if not alternate ram beq .2 branch if not alternate ram
lda altram else enable alt $D000 lda altram else enable alt $D000
L2EB5 pla return code .2 pla return code
rti re-enable interrupts and return rti re-enable interrupts and return
mlicont .EQ *-ofsG
sec mlicont .EQ *-ofsG
ror mliact notify interrupt routines MLI active. sec
lda $E000 preserve language card/rom orientation ror mliact notify interrupt routines MLI active.
sta bnkbyt1 for proper restoration when mli exits. lda $E000 preserve language card/rom orientation
lda $D000 sta bnkbyt1 for proper restoration when mli exits.
sta bnkbyt2 lda $D000
lda ramin force ram card on sta bnkbyt2
lda ramin with write allowed lda ramin force ram card on
jmp xdosmli lda ramin with write allowed
irqexit .EQ *-ofsG jmp xdosmli
lda bankid determine state of ram card (ROM/RAM)
irqxit0 .EQ *-ofsG irqexit .EQ *-ofsG
beq L2EE2 branch if ram card enabled. lda bankid determine state of ram card (ROM/RAM)
bmi L2EDF branch if alternate $D000 enabled.
lsr a determine if no ram card present. irqxit0 .EQ *-ofsG
bcc L2EE7 branch if rom only system. beq .2 branch if ram card enabled.
lda romin1 enable rom bmi .1 branch if alternate $D000 enabled.
bcs L2EE7 always taken
L2EDF lda altram enable alternate $D000 lsr determine if no ram card present.
L2EE2 lda #$01 preset bankid for rom. bcc .3 branch if rom only system.
sta bankid (reset if ram card interrupt)
L2EE7 lda p8areg restore acc lda romin1 enable rom
rti exit bcs .3 always taken
irqent .EQ *-ofsG this entry only used when rom
bit ramin was enabled at time of interrupt. .1 lda altram enable alternate $D000
bit ramin .2 lda #$01 preset bankid for rom.
jmp irqrecev sta bankid (reset if ram card interrupt)
bnkbyt1 .EQ *-ofsG .3 lda p8areg restore acc
dc h'00' rti exit
bnkbyt2 .EQ *-ofsG
dc h'00' irqent .EQ *-ofsG this entry only used when rom
dc h'00000000' pad to before $BFFA bit ramin was enabled at time of interrupt.
dc h'04' gsos compatibility byte ($BFFA) bit ramin
.DA #00' pad jmp irqrecev
dc h'00' reserved
dc h'00' version # of running interpreter bnkbyt1 .EQ *-ofsG
dc h'00' preserved for System Utilities .DA #0
kversion .EQ *-ofsG kernal version bnkbyt2 .EQ *-ofsG
dc h'23' represents release 2.0.3 .DA #0
.HS 00000000 pad to before $BFFA
.DA #4 gsos compatibility byte ($BFFA)
.DA #0 pad
.DA #0 reserved
.DA #0 version # of running interpreter
.DA #0 preserved for System Utilities
kversion .EQ *-ofsG kernal version
.HS 23 represents release 2.0.3
* end of obj mli_1 * end of obj mli_1
*-------------------------------------- *--------------------------------------

View File

@ -5,69 +5,69 @@ NEW
* this routine handles interrupts and is coded to reach 'lreset' precisely at * this routine handles interrupts and is coded to reach 'lreset' precisely at
* address $FFCB (ROM rts opcode) for rom switching to function. * address $FFCB (ROM rts opcode) for rom switching to function.
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
dc I2'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
dc i2'lanirq' irq handler .DA lanirq irq handler
* end of obj mli_3 * end of obj mli_3
*-------------------------------------- *--------------------------------------

View File

@ -421,7 +421,7 @@ H2367 .DA #$01' relocation table. 1=move src to ZP.Ds
.DA MLI' globals .DA MLI' globals
.DA $0100' in one page .DA $0100' in one page
.DA H2E00' .DA H2E00'
.DA #00' 0=clear buffers $D700-$DDFF .HS 00 0=clear buffers $D700-$DDFF
.DA pathbuf .DA pathbuf
.DA xdosorg-pathbuf' .DA xdosorg-pathbuf'
.DA #$01' .DA #$01'
@ -444,7 +444,7 @@ rlclk64 .DA #$01' relocation table. 1=move src to ZP.Ds
.DA tclk_in' .DA tclk_in'
.DA H2F69-tclock_0' .DA H2F69-tclock_0'
.DA tclk_in' .DA tclk_in'
.DA #00' .HS 00
dc h'C1C1' dc h'C1C1'
clock64 .DA #$00' clock64 .DA #$00'
.DA #FF' done .DA #FF' done
@ -507,16 +507,16 @@ H23F0 .DA #$1A length of message
gfi_list .EQ *-ofsL gfi_list .EQ *-ofsL
.DA #0A' .DA #0A'
dc i2'atinitname' .DA atinitname'
dc h'00' .HS 00
gfi_type .EQ *-ofsL gfi_type .EQ *-ofsL
dc h'00000000' dc h'00000000'
.DA #0000000000000000' .DA #0000000000000000'
.DA #0000' .HS 0000
atopen .EQ *-ofsL parms to open 'atinit' atopen .EQ *-ofsL parms to open 'atinit'
dc h'03' dc h'03'
dc i2'atinitname' .DA atinitname'
dc i2'iobuf' i/o buffer .DA iobuf' i/o buffer
dc h'01' ref# hard coded since no other files dc h'01' ref# hard coded since no other files
atinitname .EQ *-ofsL atinitname .EQ *-ofsL
.DA #06' length of name .DA #06' length of name
@ -616,7 +616,7 @@ H24C8 jsr MLI close interpreter file
H24DF lda romin enable ROM H24DF lda romin enable ROM
jmp sysentry go run interpreter jmp sysentry go run interpreter
cflag .EQ *-ofsL cflag .EQ *-ofsL
.DA #00' set if a //c. .HS 00 set if a //c.
nointrp .EQ *-ofsL no interpreter found, nointrp .EQ *-ofsL no interpreter found,
jsr MLI so quit. jsr MLI so quit.
.DA #$65' .DA #$65'
@ -646,11 +646,11 @@ iomess .EQ *-ofsL
dc c'** Unable to load' dc c'** Unable to load'
dc c' X.System *********' dc c' X.System *********'
ierlen .EQ *-ofsL ierlen .EQ *-ofsL
.DA #00' .HS 00
opparm .EQ *-ofsL parms for open call opparm .EQ *-ofsL parms for open call
dc h'03' dc h'03'
dc i2'PrefixBuf' .DA PrefixBuf'
dc i2'iobuf' .DA iobuf'
dc h'01' dc h'01'
efparm .EQ *-ofsL parms for get eof call efparm .EQ *-ofsL parms for get eof call
dc h'02' dc h'02'
@ -660,19 +660,19 @@ eof .EQ *-ofsL
rdparm .EQ *-ofsL parms for read call rdparm .EQ *-ofsL parms for read call
dc h'04' dc h'04'
dc h'01' dc h'01'
dc i2'sysentry' .DA sysentry'
rdlen .EQ *-ofsL rdlen .EQ *-ofsL
.DA #0000' .HS 0000
dc h'0000' .HS 0000
clparm .EQ *-ofsL parms for close call clparm .EQ *-ofsL parms for close call
dc h'01' dc h'01'
dc h'00' .HS 00
quitparm .EQ *-ofsL parms for quit call quitparm .EQ *-ofsL parms for quit call
dc h'04' dc h'04'
dc h'00' .HS 00
.DA #0000' .HS 0000
dc h'00' .HS 00
dc h'0000' .HS 0000
iterp .EQ *-ofsL interpreter suffix that is required iterp .EQ *-ofsL interpreter suffix that is required
dc c'.SYSTEM' dc c'.SYSTEM'
@ -1140,11 +1140,11 @@ pscall jsr $0000 self modifying code
* and report true # of devices attached * and report true # of devices attached
jsr spvect status of Cocoon jsr spvect status of Cocoon
.DA #00' .HS 00
.DA spcparms' ignore any errors. .DA spcparms' ignore any errors.
H28B1 stz statunit set unit# = 0 H28B1 stz statunit set unit# = 0
jsr spvect call to get the device count. jsr spvect call to get the device count.
.DA #00' this is a status call .HS 00 this is a status call
.DA spcparms' .DA spcparms'
lda numdev2 lda numdev2
beq donesp no devices, so done. beq donesp no devices, so done.
@ -1235,7 +1235,7 @@ H291F jsr H29EB is there a smartport device here?
jsr H28E8 set up device attributes jsr H28E8 set up device attributes
stz statunit stz statunit
jsr spvect do a status call on smartport itself jsr spvect do a status call on smartport itself
.DA #00' .HS 00
.DA spcparms' .DA spcparms'
lda numdev2 # of devices on smartport lda numdev2 # of devices on smartport
cmp #$03 cmp #$03
@ -1256,7 +1256,7 @@ H295B cmp driveradr have we done all units in this slot?
bcs H2974 yes, skip to next slot. bcs H2974 yes, skip to next slot.
sta statunit store the unit#. sta statunit store the unit#.
jsr spvect do status call jsr spvect do status call
.DA #00' .HS 00
.DA spcparms' .DA spcparms'
lda numdev2 is this a block device? lda numdev2 is this a block device?
bmi mount yes, so mount it. bmi mount yes, so mount it.
@ -1585,20 +1585,20 @@ H2B89 and #$03
* relocation table contains length of each opcode in 2-bit groups * relocation table contains length of each opcode in 2-bit groups
opcodln .DA #0928193C0A280D3C' opcodln .HS 0928193C0A280D3C
.DA #0B2A193F0A280D3C' .HS 0B2A193F0A280D3C
.DA #0928193F0A280D3C' .HS 0928193F0A280D3C
.DA #0928193F0A280D3C' .HS 0928193F0A280D3C
.DA #082A113F0A2A1D0C' .HS 082A113F0A2A1D0C
.DA #2A2A193F0A2A1D3F' .HS 2A2A193F0A2A1D3F
.DA #0A2A193F0A280D3C' .HS 0A2A193F0A280D3C
.DA #0A2A193F0A280D3C' .HS 0A2A193F0A280D3C
wsize .DA #$00' wsize .HS 00
sgcnt .DA #$00' sgcnt .HS 00
limlo .DA #0000000000000000' limlo .HS 0000000000000000
limhi .DA #0000000000000000' limhi .HS 0000000000000000
ofset .DA #0000000000000000' ofset .HS 0000000000000000
* patch to gsos vectors so error is returned for os calls - rev note #101 * patch to gsos vectors so error is returned for os calls - rev note #101

View File

@ -4,88 +4,88 @@ NEW
* /RAM driver (main bank portion) * /RAM driver (main bank portion)
* origin = $FF00 * origin = $FF00
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,
* control is passed back to 'noerr'. * control is passed back to 'noerr'.
format lda #<ramdest card entry point 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
.DA #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
r2_end .EQ * r2_end .EQ *
ds $D9B-(r2_end-H2000) fill to lanirq ($FF9B see note below) .BS $D9B-(r2_end-H2000) fill to lanirq ($FF9B see note below)
*-------------------------------------- *--------------------------------------
MAN MAN
SAVE USR/SRC/PRODOS.203/PRODOS.S.RAM SAVE USR/SRC/PRODOS.203/PRODOS.S.RAM

View File

@ -35,9 +35,9 @@ RAM_1 .BS $2C80-*
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

View File

@ -227,7 +227,7 @@ L525E cmp #$11 if <=17 then done
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
.DA #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:
@ -287,58 +287,57 @@ L52B1 lda (A4L),y (pointer set by setptr)
bpl L52B1 bpl L52B1
jmp exitcard jmp exitcard
formatflg .EQ *-ofsR0 formatflg .EQ *-ofsR0
.DA #00' not formatted yet .HS 00 not formatted yet
tcmd .EQ *-ofsR0 tcmd .EQ *-ofsR0
dc h'00' command .HS 00 command
dc h'00' unit (not used) .HS 00 unit (not used)
R2L .EQ *-ofsR0 R2L .EQ *-ofsR0
dc h'00' R2 = user buffer .HS 00 R2 = user buffer
R2H .EQ *-ofsR0 R2H .EQ *-ofsR0
dc h'00' .HS 00
R01 .EQ *-ofsR0 R01 .EQ *-ofsR0
dc h'00' page requested .HS 00 page requested
BITMAP .EQ *-ofsR0 BITMAP .EQ *-ofsR0
dc h'00FFFFFF' blocks 0-7 used .HS 00FFFFFF blocks 0-7 used
.DA #FFFFFFFF' .HS FFFFFFFF
dc h'FFFFFFFF' .HS FFFFFFFF
.DA #FFFFFFFE' .HS FFFFFFFE
VDIR .EQ *-ofsR0 start of vdir. VDIR .EQ *-ofsR0 start of vdir.
dc h'F3' storage type = F, name length = 3 .HS F3 storage type = F, name length = 3
msb off .AS "RAM"
dc c'RAM' access .EQ *-ofsR0
access .EQ *-ofsR0 .DA #C3 destroy, rename, read enabled
.DA #C3' destroy, rename, read enabled .HS 27 entry length
dc h'27' entry length .HS 0D
dc h'0D' .HS 0000
dc h'0000' .HS 0300 block 3
dc h'0300' block 3 .HS 7F 128 blocks
dc h'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
.DA #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 !!
.DA #0000' $3FE-$3FF .HS 0000 $3FE-$3FF
* end of obj ram_0 * end of obj ram_0
*-------------------------------------- *--------------------------------------

View File

@ -261,57 +261,57 @@ L5C0B jsr prntmsg
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)'
.DA #00' .HS 00
disp1msg .EQ *-ofsS disp1msg .EQ *-ofsS
dc c'ENTER PATHNAME OF NEXT APPLICATION' dc c'ENTER PATHNAME OF NEXT APPLICATION'
.DA #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'
.DA #00' .HS 00
dsp1err2 .EQ *-ofsS dsp1err2 .EQ *-ofsS
.DA #87' .DA #87'
dc c'I/O ERROR ' dc c'I/O ERROR '
.DA #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 '
.DA #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
dc i2'PrefixBuf' pathname buffer .DA PrefixBuf' pathname buffer
dsp1acess .EQ *-ofsS dsp1acess .EQ *-ofsS
dc h'00' access .HS 00 access
dsp1type .EQ *-ofsS dsp1type .EQ *-ofsS
dc h'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
dc i2'PrefixBuf' pathname buffer .DA PrefixBuf' pathname buffer
dc i2'fbuf' fcb buffer .DA fbuf' fcb buffer
dsp1refn .EQ *-ofsS dsp1refn .EQ *-ofsS
dc h'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
dc h'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
dc h'00' reference # .HS 00 reference #
dc i2'sysentry' .SYS load address .DA sysentry' .SYS load address
dsp1cnt .EQ *-ofsS dsp1cnt .EQ *-ofsS
dc h'0000' byte count .HS 0000 byte count
.DA #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
dc h'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
dc i2'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

View File

@ -126,7 +126,7 @@ L5DD8 adc #$04 add 4 and put in
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
dc h'00' .HS 00
bcs L5DB3 error bcs L5DB3 error
jsr doread jsr doread
bcs L5DB3 error. bcs L5DB3 error.
@ -390,38 +390,38 @@ fldrmsg .EQ *-ofsB
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
dc h'00' .HS 00
op_parms .EQ *-ofsB open parameters op_parms .EQ *-ofsB open parameters
.DA #03' 3 parms .DA #03' 3 parms
dc i2'PrefixBuf' pathname .DA PrefixBuf' pathname
dc i2'op_buf' file buffer .DA op_buf' file buffer
op_refn .EQ *-ofsB op_refn .EQ *-ofsB
dc h'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
dc h'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
dc i2'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
dc i2'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
dc i2'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)
* dc h'0000' requested length * .HS 0000 requested length
* dc h'0000' actual length * .HS 0000 actual length
dhdr_len .EQ *-ofsB directory header length dhdr_len .EQ *-ofsB directory header length
dc h'00' (actually uses 2 bytes) .HS 00 (actually uses 2 bytes)
* end of obj sel_1 * end of obj sel_1
*-------------------------------------- *--------------------------------------

View File

@ -13,15 +13,16 @@ NEW
* (as other replacement quit code is supposed to do) because GQuit checks * (as other replacement quit code is supposed to do) because GQuit checks
* this to see if this version of quit code is available. * this to see if this version of quit code is available.
ofsQ .EQ GQdisp-dispadr offset to GQuit dispatcher org .OP 65816
msb off ofsQ .EQ GQdisp-dispadr offset to GQuit dispatcher org
GQdisp lda ramin read/write LC bank 1
clc GQdisp lda ramin read/write LC bank 1
xce 16 bit native mode. clc
jmp >P8QUIT go to GQuit. xce 16 bit native mode.
.DA #0000000000' offset to paragraph boundary. jmp >P8QUIT go to GQuit.
dc c'GQ' id bytes so GQuit can identify this .DA #0000000000 offset to paragraph boundary.
.AS "GQ" id bytes so GQuit can identify this
* load application * load application
* *
@ -40,125 +41,126 @@ GQdisp lda ramin read/write LC bank 1
* so in case of an error setting the P8 prefix, it can be displayed in the * so in case of an error setting the P8 prefix, it can be displayed in the
* error message. * error message.
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
clc gqerror .EQ *-ofsQ
xce 16 bit native mode clc
LONG I,M xce 16 bit native mode
jsr mountvol mount volume. LONG I,M
bcs L60AB if error. jsr mountvol mount volume.
sec back to emulation mode. bcs L60AB if error.
xce sec back to emulation mode.
rts xce
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
* *
@ -166,80 +168,81 @@ L60AB clc native mode
* 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.
phy pointer to volume name. L6101 pha save error code in case esc pressed.
phx phy pointer to volume name.
tsc phx
phd save D reg. tsc
tcd point D reg at stack. phd save D reg.
lda [$01] get length byte and leading separator. tcd point D reg at stack.
dec a don't count leading separator. lda [$01] get length byte and leading separator.
xba then swap the bytes so the volume name dec don't count leading separator.
sta [$01] doesn't cpntain the separator. xba then swap the bytes so the volume name
pha room for result. sta [$01] doesn't cpntain the separator.
pea $0000 mountmsg>>16 pha room for result.
pea mountmsg pea $0000 mountmsg>>16
phy hi word of pointer to volume name. pea mountmsg
inx skip separator. phy hi word of pointer to volume name.
phx lo word of pointer to volume name. inx skip separator.
pea $0000 button1>>16 phx lo word of pointer to volume name.
pea button1 'Return' pea $0000 button1>>16
pea $0000 button2>>16 pea button1 'Return'
pea button2 'Escape' pea $0000 button2>>16
_TLTextMountVolume pea button2 'Escape'
lda [$01] restore first 2 bytes of vilume name _TLTextMountVolume
xba back to their original positions lda [$01] restore first 2 bytes of vilume name
inc a and values. xba back to their original positions
sta [$01] inc and values.
pla which button: 1=Return 2=Escape. sta [$01]
pld restore D reg. pla which button: 1=Return 2=Escape.
plx pull volume name pointer off stack pld restore D reg.
plx plx pull volume name pointer off stack
cmp #$0001 which button was pressed ? plx
bne L613C if Escape pressed. cmp #$0001 which button was pressed ?
clc indicate Return was pressed. bne L613C if Escape pressed.
pla pull original error code off stack. clc indicate Return was pressed.
rts return with carry clear. pla pull original error code off stack.
L613C sec indicate Escape was pressed. rts return with carry clear.
pla restore error code. L613C sec indicate Escape was pressed.
rts return with carry set. pla restore error code.
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.
* *
* inputs: x = length byte of complete pathname containing volume name. * inputs: x = length byte of complete pathname containing volume name.
* output: volume name is stored in volbuf. * output: volume name is stored in volbuf.
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
* launching P8 application if it can accept a second filename. If found, * launching P8 application if it can accept a second filename. If found,
@ -247,109 +250,109 @@ L6156 dey fix character count.
* on exit, the z-flag is set if a filename was correctly passed to the * on exit, the z-flag is set if a filename was correctly passed to the
* application elst the z-flag is clear if it couldn't be done. * application elst the z-flag is clear if it couldn't be done.
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
* *
@ -357,107 +360,107 @@ L6231 rts and go launch the app.
* 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.
L623C 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 L6252 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 L623C 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.
L6252 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.
dc i2'inbuf' address of prefix. .DA inbuf address of prefix.
opnparms .EQ *-ofsQ open parms. opnparms .EQ *-ofsQ open parms.
dc h'03' 3 parms. .DA #3 3 parms.
dc i2'PrefixBuf' pathname .DA PrefixBuf pathname
dc i2'op_buf' i/o buffer .DA op_buf i/o buffer
oprefnum .EQ *-ofsQ oprefnum .EQ *-ofsQ
dc h'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
dc h'00' reference # .HS 00 reference #
eofval .EQ *-ofsQ eofval .EQ *-ofsQ
dc h'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
dc h'00' reference # .HS 00 reference #
dc i2'sysentry' read into $2000 (bank 0). .DA sysentry read into $2000 (bank 0).
rdcount .EQ *-ofsQ rdcount .EQ *-ofsQ
dc h'0000' # of bytes to read. .HS 0000 # of bytes to read.
dc h'0000' transfer count .HS 0000 transfer count
closeprm .EQ *-ofsQ closeprm .EQ *-ofsQ
dc h'01' 1 parm .DA #1 1 parm
closeref .EQ *-ofsQ closeref .EQ *-ofsQ
dc h'00' reference # .HS 00 reference #
quitparms .EQ *-ofsQ quitparms .EQ *-ofsQ
.DA #04' 4 parms. .DA #04 4 parms.
dc h'00' quit back to launcher (GQuit) .HS 00 quit back to launcher (GQuit)
dc h'0000' .HS 0000
dc h'00' .HS 00
dc h'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
dc i2'volbuf' volume buffer .DA volbuf volume buffer
dc h'00' access .DA #0 access
dc h'00' file type .DA #0 file type
dc h'0000' aux type .DA 0 aux type
dc h'00' storage type .DA #0 storage type
dc h'0000' blocks used .DA 0 blocks used
.DA #0000' modification date .DA 0 modification date
dc h'0000' modification time .DA 0 modification time
dc h'0000' creation date .DA 0 creation date
.DA #0000' 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.
quitstr1 .EQ *-ofsQ quitstr1 .EQ *-ofsQ
dc h'1B' .DA #$1B
dc c'Can''t run next application.' .AS "Can't run next application."
quitstr2 .EQ *-ofsQ quitstr2 .EQ *-ofsQ
dc h'14' .DA #$14
dc c'ProDOS Error = $' .AS "ProDOS Error = $"
errval .EQ *-ofsQ hex error code gets stored here errval .EQ *-ofsQ hex error code gets stored here
dc c' ' .AS " "
quitbtn2 .EQ *-ofsQ null string (no 2nd button) quitbtn2 .EQ *-ofsQ null string (no 2nd button)
dc h'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.
* the button labels must not be more than 16 characters. * the button labels must not be more than 16 characters.
mountmsg .EQ *-ofsQ mountmsg .EQ *-ofsQ
dc h'17' .DA #$17
dc c'Please insert the disk:' .AS "Please insert the disk:"
button1 .EQ *-ofsQ button1 .EQ *-ofsQ
dc h'0D' .DA #$0D
dc c'Accept: ' .AS "Accept: "
.DA #1B' mousetext on .DA #$1B mousetext on
dc h'0F' inverse on .DA #$0F inverse on
dc h'4D' mousetext return .DA #$4D mousetext return
dc h'0E' normal on .DA #$0E normal on
dc h'18' mousetext off .DA #$18 mousetext off
button2 .EQ *-ofsQ button2 .EQ *-ofsQ
dc h'0B' .DA #$0B
dc c'Cancel: Esc' .AS "Cancel: Esc"
* end of obj sel_2 (must be < GQdisp+$300) * end of obj sel_2 (must be < GQdisp+$300)
*-------------------------------------- *--------------------------------------

View File

@ -6,83 +6,83 @@ NEW
* $2F00-2F7C moved to $D742 * $2F00-2F7C moved to $D742
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.
H2F14 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 a multiply by 10 asl multiply by 10
asl a asl
adc pcl adc pcl
asl a 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 H2F14 if yes. bpl .1 if yes.
tay contains month tay contains month
lsr a lsr
ror a ror
ror a ror
ror a 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 H2F42 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
H2F42 sec .2 sec
H2F43 sbc #$07 .3 sbc #$07
bcs H2F43 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 H2F4F branch if positive bcs .4 branch if positive
adc #$07 else make it positive again. adc #$07 else make it positive again.
H2F4F 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 a 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
* this table contains entries for the cumulative # of days in a year, * this table contains entries for the cumulative # of days in a year,
* 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
dc h'1F' February .DA #$1F February
dc h'3B' March .DA #$3B March
dc h'5A' April .DA #$5A April
dc h'78' May .DA #$78 May
dc h'97' June .DA #$97 June
dc h'B5' July .DA #$B5 July
dc h'D3' August .DA #$D3 August
.DA #F2' September .DA #$F2 September
dc h'14' October (MOD 256) .DA #$14 October (MOD 256)
dc h'33' November .DA #$33 November
dc h'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
@ -90,16 +90,16 @@ tdays .EQ *-ofsT
* is the year which January 1st is Sunday, and so on backwards thru * is the year which January 1st is Sunday, and so on backwards thru
* the days of the week. * the days of the week.
yradj .EQ *-ofsT yradj .EQ *-ofsT
dc h'60' Monday .DA #$60 Monday
dc h'5F' Sunday .DA #$5F Sunday
dc h'5E' Saturday .DA #$5E Saturday
dc h'5D' Friday .DA #$5D Friday
.DA #62' Thursday .DA #$62 Thursday
dc h'61' Wednesday .DA #$61 Wednesday
dc h'60' Tuesday .DA #$60 Tuesday
tclk_end .EQ * end of obj tclock_0. tclk_end .EQ * end of obj tclock_0.
dc h'000000' pad .HS 000000 pad
*-------------------------------------- *--------------------------------------
MAN MAN
SAVE USR/SRC/PRODOS.203/PRODOS.S.TCLK SAVE USR/SRC/PRODOS.203/PRODOS.S.TCLK

View File

@ -263,9 +263,9 @@ irqdev .EQ *-ofsX
sta mslot slot being accessed. sta mslot slot being accessed.
H31DD jmp irqexit do necessary bank switches and return. H31DD jmp irqexit do necessary bank switches and return.
irqflag .EQ *-ofsX irqflag .EQ *-ofsX
.DA #00' 0 = old roms. 1 = new roms. .HS 00 0 = old roms. 1 = new roms.
irqcount .EQ *-ofsX irqcount .EQ *-ofsX
dc h'00' # of unclaimed interrupts. .HS 00 # of unclaimed interrupts.
svstack .EQ *-ofsX temporary save area from stack svstack .EQ *-ofsX temporary save area from stack
dc h'0000000000000000' dc h'0000000000000000'
.DA #0000000000000000' .DA #0000000000000000'
@ -4022,8 +4022,8 @@ L4F3F lda buf-1,x from prodos parameters
sp_vector .EQ *-ofsX smartport call sp_vector .EQ *-ofsX smartport call
jsr $0000 (entry address gets modified) jsr $0000 (entry address gets modified)
cmdnum .EQ *-ofsX cmdnum .EQ *-ofsX
dc h'00' command # .HS 00 command #
dc i2'statparms' .DA statparms'
bcs L4F6E bcs L4F6E
ldx cmdnum status call ? ldx cmdnum status call ?
bne L4F6E no... bne L4F6E no...
@ -4049,9 +4049,9 @@ spvecthi .EQ *-ofsX storage for high byte of smartport
statparms .EQ *-ofsX # of parms (always 3 except format) statparms .EQ *-ofsX # of parms (always 3 except format)
dc h'03' dc h'03'
sp_unitnum .EQ *-ofsX sp_unitnum .EQ *-ofsX
.DA #00' unit number .HS 00 unit number
sp_bufptr .EQ *-ofsX sp_bufptr .EQ *-ofsX
dc h'0000' data buffer .HS 0000 data buffer
dc h'000000' block number (3 bytes) dc h'000000' block number (3 bytes)
* data tables * data tables
@ -4072,26 +4072,26 @@ pcntbl .EQ *-ofsX parameter counts for the calls
* command table * command table
cmdtable .EQ *-ofsX cmdtable .EQ *-ofsX
dc i2'create' create .DA create' create
dc i2'destroy' destroy .DA destroy' destroy
.DA rename' rename .DA rename' rename
dc i2'setinfo' setinfo .DA setinfo' setinfo
dc i2'getinfo' getinfo .DA getinfo' getinfo
dc i2'online' online .DA online' online
.DA setprefx' set prefix .DA setprefx' set prefix
dc i2'getprefx' get prefix .DA getprefx' get prefix
dc i2'openf' open .DA openf' open
dc i2'newline' newline .DA newline' newline
.DA readf' read .DA readf' read
dc i2'writef' write .DA writef' write
dc i2'closef' close .DA closef' close
dc i2'flushf' flush .DA flushf' flush
.DA setmark' set mark .DA setmark' set mark
dc i2'getmark' get mark .DA getmark' get mark
dc i2'seteof' seteof .DA seteof' seteof
dc i2'geteof' geteof .DA geteof' geteof
.DA setbuf' setbuf .DA setbuf' setbuf
dc i2'getbuf' getbuf .DA getbuf' getbuf
* corresponding command function bytes * corresponding command function bytes
@ -4109,7 +4109,7 @@ pass .EQ *-ofsX
xdosver .EQ *-ofsX xdosver .EQ *-ofsX
dc h'00' dc h'00'
compat .EQ *-ofsX compat .EQ *-ofsX
dc h'00' .HS 00
dc h'C3270D000000' dc h'C3270D000000'
rootstuf .EQ *-ofsX rootstuf .EQ *-ofsX
.DA #0F02000400000800' .DA #0F02000400000800'
@ -4132,63 +4132,63 @@ deathmsg .EQ *-ofsX
* variables in the file control block and temporary directory. * variables in the file control block and temporary directory.
own_blk .EQ *-ofsX own_blk .EQ *-ofsX
.DA #0000' .HS 0000
own_ent .EQ *-ofsX own_ent .EQ *-ofsX
dc h'00' .HS 00
own_len .EQ *-ofsX own_len .EQ *-ofsX
dc h'00' .HS 00
h_credt .EQ *-ofsX h_credt .EQ *-ofsX
dc h'0000' directory creation date .HS 0000 directory creation date
dc h'0000' directory creation time .HS 0000 directory creation time
.DA #00' version under which this dir created .HS 00 version under which this dir created
dc h'00' earliest version that it's compatible .HS 00 earliest version that it's compatible
h_attr .EQ *-ofsX attributes (protect bit, etc.) h_attr .EQ *-ofsX attributes (protect bit, etc.)
dc h'00' .HS 00
h_entln .EQ *-ofsX length of each entry in this directory h_entln .EQ *-ofsX length of each entry in this directory
dc h'00' .HS 00
h_maxent .EQ *-ofsX maximum number of entries per block h_maxent .EQ *-ofsX maximum number of entries per block
dc h'00' .HS 00
h_fcnt .EQ *-ofsX current # of files in this directory h_fcnt .EQ *-ofsX current # of files in this directory
dc h'0000' .HS 0000
h_bmap .EQ *-ofsX address of first allocation bitmap h_bmap .EQ *-ofsX address of first allocation bitmap
.DA #0000' .HS 0000
h_tblk .EQ *-ofsX total number of blocks on this unit h_tblk .EQ *-ofsX total number of blocks on this unit
dc h'0000' .HS 0000
d_dev .EQ *-ofsX device number of this directory entry d_dev .EQ *-ofsX device number of this directory entry
dc h'00' .HS 00
d_head .EQ *-ofsX address of <sub> directory header d_head .EQ *-ofsX address of <sub> directory header
dc h'0000' .HS 0000
d_entblk .EQ *-ofsX address of block which contains entry d_entblk .EQ *-ofsX address of block which contains entry
dc h'0000' .HS 0000
d_entnum .EQ *-ofsX entry number within block d_entnum .EQ *-ofsX entry number within block
.DA #00' .HS 00
d_stor .EQ *-ofsX d_stor .EQ *-ofsX
dc h'0000000000000000' file name dc h'0000000000000000' file name
dc h'0000000000000000' dc h'0000000000000000'
d_filid .EQ *-ofsX user's identification byte d_filid .EQ *-ofsX user's identification byte
.DA #00' .HS 00
d_frst .EQ *-ofsX first block of file d_frst .EQ *-ofsX first block of file
dc h'0000' .HS 0000
d_usage .EQ *-ofsX # of blocks allocated to this file d_usage .EQ *-ofsX # of blocks allocated to this file
dc h'0000' .HS 0000
d_eof .EQ *-ofsX current end of file marker d_eof .EQ *-ofsX current end of file marker
dc h'000000' dc h'000000'
d_credt .EQ *-ofsX d_credt .EQ *-ofsX
.DA #0000' file creation date .HS 0000 file creation date
dc h'0000' file creation time .HS 0000 file creation time
d_sosver .EQ *-ofsX sos version that created this file d_sosver .EQ *-ofsX sos version that created this file
dc h'00' .HS 00
d_comp .EQ *-ofsX backward version compatibility d_comp .EQ *-ofsX backward version compatibility
dc h'00' .HS 00
d_attr .EQ *-ofsX attributes (protect, r/w, enable, etc.) d_attr .EQ *-ofsX attributes (protect, r/w, enable, etc.)
dc h'00' .HS 00
d_auxid .EQ *-ofsX user auxilliary identification d_auxid .EQ *-ofsX user auxilliary identification
.DA #0000' .HS 0000
d_moddt .EQ *-ofsX d_moddt .EQ *-ofsX
dc h'0000' file's last modification date .HS 0000 file's last modification date
dc h'0000' file's last modification time .HS 0000 file's last modification time
d_dhdr .EQ *-ofsX file directory header block address d_dhdr .EQ *-ofsX file directory header block address
dc h'0000' .HS 0000
scrtch .EQ *-ofsX scratch area for scrtch .EQ *-ofsX scratch area for
.DA #00000000' allocation address conversion. .DA #00000000' allocation address conversion.
oldeof .EQ *-ofsX temp used in r/w oldeof .EQ *-ofsX temp used in r/w
@ -4196,142 +4196,142 @@ oldeof .EQ *-ofsX temp used in r/w
oldmark .EQ *-ofsX oldmark .EQ *-ofsX
.DA #000000' .DA #000000'
xvcbptr .EQ *-ofsX used in 'cmpvcb' as a temp xvcbptr .EQ *-ofsX used in 'cmpvcb' as a temp
dc h'00' .HS 00
vcbptr .EQ *-ofsX vcbptr .EQ *-ofsX
dc h'00' .HS 00
fcbptr .EQ *-ofsX fcbptr .EQ *-ofsX
dc h'00' .HS 00
fcbflg .EQ *-ofsX fcbflg .EQ *-ofsX
dc h'00' .HS 00
reql .EQ *-ofsX reql .EQ *-ofsX
dc h'00' .HS 00
reqh .EQ *-ofsX reqh .EQ *-ofsX
dc h'00' .HS 00
levels .EQ *-ofsX levels .EQ *-ofsX
.DA #00' .HS 00
totent .EQ *-ofsX totent .EQ *-ofsX
dc h'00' .HS 00
entcntl .EQ *-ofsX entcntl .EQ *-ofsX
dc h'00' .HS 00
entcnth .EQ *-ofsX entcnth .EQ *-ofsX
dc h'00' .HS 00
cntent .EQ *-ofsX cntent .EQ *-ofsX
dc h'00' .HS 00
nofree .EQ *-ofsX nofree .EQ *-ofsX
dc h'00' .HS 00
bmcnt .EQ *-ofsX bmcnt .EQ *-ofsX
dc h'00' .HS 00
saptr .EQ *-ofsX saptr .EQ *-ofsX
dc h'00' .HS 00
pathcnt .EQ *-ofsX pathcnt .EQ *-ofsX
.DA #00' .HS 00
p_dev .EQ *-ofsX p_dev .EQ *-ofsX
dc h'00' .HS 00
p_blok .EQ *-ofsX p_blok .EQ *-ofsX
dc h'0000' .HS 0000
bmptr .EQ *-ofsX bmptr .EQ *-ofsX
dc h'00' .HS 00
basval .EQ *-ofsX basval .EQ *-ofsX
dc h'00' .HS 00
half .EQ *-ofsX half .EQ *-ofsX
dc h'00' .HS 00
* bitmap info tables * bitmap info tables
bmastat .EQ *-ofsX bmastat .EQ *-ofsX
dc h'00' .HS 00
bmadev .EQ *-ofsX bmadev .EQ *-ofsX
.DA #00' .HS 00
bmadadr .EQ *-ofsX bmadadr .EQ *-ofsX
dc h'0000' .HS 0000
bmacmap .EQ *-ofsX bmacmap .EQ *-ofsX
dc h'00' .HS 00
tposll .EQ *-ofsX tposll .EQ *-ofsX
dc h'00' .HS 00
tposlh .EQ *-ofsX tposlh .EQ *-ofsX
dc h'00' .HS 00
tposhi .EQ *-ofsX tposhi .EQ *-ofsX
dc h'00' .HS 00
rwreql .EQ *-ofsX rwreql .EQ *-ofsX
dc h'00' .HS 00
rwreqh .EQ *-ofsX rwreqh .EQ *-ofsX
.DA #00' .HS 00
nlchar .EQ *-ofsX nlchar .EQ *-ofsX
dc h'00' .HS 00
nlmask .EQ *-ofsX nlmask .EQ *-ofsX
dc h'00' .HS 00
ioaccess .EQ *-ofsX has a call been made to ioaccess .EQ *-ofsX has a call been made to
dc h'00' disk device handler ? .HS 00 disk device handler ?
cmdtemp .EQ *-ofsX cmdtemp .EQ *-ofsX
dc h'00' .HS 00
bkbitflg .EQ *-ofsX used to set or clear backup bit bkbitflg .EQ *-ofsX used to set or clear backup bit
dc h'00' .HS 00
duplflag .EQ *-ofsX duplflag .EQ *-ofsX
dc h'00' .HS 00
vcbentry .EQ *-ofsX vcbentry .EQ *-ofsX
dc h'00' .HS 00
* xdos temporary variables * xdos temporary variables
namcnt .EQ *-ofsX namcnt .EQ *-ofsX
.DA #00' .HS 00
rnptr .EQ *-ofsX rnptr .EQ *-ofsX
dc h'00' .HS 00
namptr .EQ *-ofsX namptr .EQ *-ofsX
dc h'00' .HS 00
vnptr .EQ *-ofsX vnptr .EQ *-ofsX
dc h'00' .HS 00
prfxflg .EQ *-ofsX prfxflg .EQ *-ofsX
dc h'00' .HS 00
cferr .EQ *-ofsX cferr .EQ *-ofsX
dc h'00' .HS 00
* deallocation temporary variables * deallocation temporary variables
firstbl .EQ *-ofsX firstbl .EQ *-ofsX
dc h'00' .HS 00
firstbh .EQ *-ofsX firstbh .EQ *-ofsX
dc h'00' .HS 00
stortyp .EQ *-ofsX stortyp .EQ *-ofsX
.DA #00' .HS 00
deblock .EQ *-ofsX deblock .EQ *-ofsX
dc h'0000' .HS 0000
dtree .EQ *-ofsX dtree .EQ *-ofsX
dc h'00' .HS 00
dsap .EQ *-ofsX dsap .EQ *-ofsX
dc h'00' .HS 00
dseed .EQ *-ofsX dseed .EQ *-ofsX
dc h'0000' .HS 0000
topdest .EQ *-ofsX topdest .EQ *-ofsX
dc h'00' .HS 00
dtmpx .EQ *-ofsX dtmpx .EQ *-ofsX
dc h'00' .HS 00
loklst .EQ *-ofsX look list of recognized device numbers loklst .EQ *-ofsX look list of recognized device numbers
dealbufl .EQ *-ofsX dealbufl .EQ *-ofsX
dc h'0000000000000000' .HS 0000000000000000
dealbufh .EQ *-ofsX dealbufh .EQ *-ofsX
.DA #0000000000000000' .HS 0000000000000000
cbytes .EQ *-ofsX cbytes .EQ *-ofsX
.DA #0000' .HS 0000
dc h'00' cbytes+2 must = 0 .HS 00 cbytes+2 must = 0
bufaddrl .EQ *-ofsX bufaddrl .EQ *-ofsX
dc h'00' .HS 00
bufaddrh .EQ *-ofsX bufaddrh .EQ *-ofsX
dc h'00' .HS 00
goadr .EQ *-ofsX goadr .EQ *-ofsX
dc h'0000' .HS 0000
delflag .EQ *-ofsX used by 'detree' to know if called delflag .EQ *-ofsX used by 'detree' to know if called
.DA #00' from delete (destroy). .HS 00 from delete (destroy).
* zero fill to page boundary - 3 ($FEFD). so that cortland flag stays * zero fill to page boundary - 3 ($FEFD). so that cortland flag stays
* within page boundary. * within page boundary.
dc h'00000000000000' .HS 00000000000000
dc h'0000000000' .HS 0000000000
dc i2'calldisp' .DA calldisp
cortflag .EQ *-ofsX cortland flag. 1 = Cortland system cortflag .EQ *-ofsX cortland flag. 1 = Cortland system
dc h'00' (must stay within page boundary) .HS 00 (must stay within page boundary)
* end of obj mli_2 * end of obj mli_2
*-------------------------------------- *--------------------------------------

View File

@ -1,225 +0,0 @@
KEEP PRODOS
MCOPY PRODOS.MAC
* disassembly of prodos version 2.0.3
* can be compiled with the orca/m assembler
* which produces an output file PRODOS (type = EXE)
* address refs beginning with 'L' were generated by orca disassembler
* address refs beginning with 'H' were added manually
* last edit: 01/24/13
* map of the object modules within prodos exe are as follows:
* $2000 mli_0 mli loader/relocator
* $2C80 ram_1 installer for /RAM
* $2D00 ram_2 /RAM driver in main lc
* $2D9B mli_3 interrupts
* $2E00 mli_1 global page
* $2F00 tclock_0 Thunderclock driver
* $2F80 cclock_0 Cortland clock driver
* $3000 mli_2 xdos mli & block file manager
* $5100 ram_0 /RAM driver in aux mem
* $5300 xrw_0 disk core routines
* $5A00 sel_0 dispatcher
* $5D00 sel_1 enhanced quit code (Bird's Better Bye)
* $6000 sel_2 GQuit dispatcher support
************************ IMPORTANT ************************
* *
* 1. In the language card area, the $D000 areas overlay. To *
* determine which bank is active requires that the main bank *
* has a CLD ($D8) at $D000 and the alternate bank does not. *
* $D000 in ROM = $6F, LC bank1 = $D8, LC bank2 = $EE *
* *
* 2. Location $E000 is used to determine the state of ROM vs. *
* language card. Therefore, the value of $E000 in the MLI *
* and ROM must differ. *
* *
* 3. In the section MEMMGR, the routine CALLDISP must access *
* the other $D000 bank so it MUST reside ABOVE $E000 in the *
* language card area. *
* *
* 4. The Disk II routine xrwtot MUST reside on a page boundary *
* to distinguish it from a ram-based driver. *
* *
* 5. In the /RAM driver ram3, the byte at $FF58 MUST be an rts *
* ($60) so the routine JSR $FF58 to determine an I/O card's *
* slot still works when the language card is switched in. *
* *
*****************************************************************
PRODOS START
* Predefined labels:
lookptr equ $0A
idapple equ $0C model machine id
idxl equ $10 general use 16 bit index pointer
devid equ $12
src equ $12
dst equ $14
cnt equ $16
cde equ $18
ecde equ $1A
wndlft equ $20
wndwdth equ $21
wndtop equ $22
wndbtm equ $23
ch equ $24 cursor horizontal
cv equ $25 cursor vertical
invflg equ $32 inverse flag
pcl equ $3A
pch equ $3B
A1L equ $3C
A1H equ $3D
A2L equ $3E
A2H equ $3F
A3L equ $40
A4L equ $42
unitnum equ $43
buf equ $44 2-byte data buffer pointer which
accsav equ $45 overlaps accsav (temp acc save byte)
bloknml equ $46 used mostly as 16 bit block # pointer
zpt equ $48 highly used zero page index pointer
datptr equ $4A ptr to data area of buffer.
sos equ $4C sos buffer pointer.
usrbuf equ $4E data ptr in user buffer.
* zero page variables for Bird's Better Bye
smparms equ $60 set mark parms
sm_refn equ $61 file reference number
fpos_lo equ $62 new file position (3 bytes)
fpos_mid equ $63
fpos_hi equ $64
lstpntr equ $65 device list pointer (16 bit)
valcnt equ $67 name counter
filecount equ $68 # of displayable files in directory
namelen equ $69 length of filename
gp_cnt equ $6A general purpose counter
dlevel equ $6B directory level
fnstore equ $6C filename storage pointer (16 bit)
entlen equ $6E directory entry length
entblk equ $6F directory entries/block
filecnt equ $70 directory file count (16 bit)
blkfl equ $72 block flag / file counter
topname equ $73 index # of top name in display
filetyps equ $74 128 byte table of filetypes
errnum equ $DE
tst128 equ $0080 temp page 0 routine for memory test
auxsp equ $0101
ramdest equ $0200 load address for aux bank /RAM driver
inbuf equ $0200 keyboard buffer
pbuf equ $0280 prefix buffer
p3vect equ $03F0 page 3 vectors (16 bytes)
softev equ $03F2 RESET vector
pwredup equ $03F4 power up byte
nmivect equ $03FB nmi handler
txtp2 equ $0400 test location for aux card
vline10 equ $04A8 line 10 of display
vmode equ $04FB video firmware operating mode
vline11 equ $0528 line 11 of display
clkmode equ $0538 clock mode
ch80col equ $057B 80 column ch position
vline12 equ $05A8 line 12 of display
vline5 equ $0600 line 5 of display
vline13 equ $0628 line 13 of display
vline14 equ $06A8 line 14 of display
vline23 equ $0750 line 23 of display
vline16 equ $07A8 line 16 of display
vline24 equ $07D0 line 24 of display
mslot equ $07F8 slot being accessed
lodintrp equ $0800
dbuf equ $0C00 8 page directory buffer
vblock1 equ $0E00 ramdisk directory block
volbuf equ $0F00 volume buffer
dispadr equ $1000 system death dispatcher run address
iobuf equ $1400 i/o buffer
fbuf equ $1800 FCB buffer
op_buf equ $1C00 open file buffer (selector)
sysentry equ $2000 .SYS file load address
prodos8 equ $BF00 prodos MLI and global page
kbd equ $C000 keyboard latch (read)
store80off equ $C000 disable 80-col store (write)
store80on equ $C001 enable 80-col store
rdmainram equ $C002 read from main 48K
rdcardram equ $C003 read from alt 48K
wrmainram equ $C004 write to main 48K
wrcardram equ $C005 write to alt 48K
setstdzp equ $C008 use main zero page/stack
setaltzp equ $C009 use alt zero page/stack
int3rom equ $C00A enable internal slot 3 ROM
slot3rom equ $C00B enable external slot 3 ROM
clr80vid equ $C00C disable 80 col hardware
clraltchar equ $C00E normal LC, flashing UC
kbdstrobe equ $C010 turn off keypressed flag
rd80col equ $C018 if 80-column store
newvideo equ $C029 video mode select
spkr equ $C030 click speaker
txtset equ $C051 switch in text
txtpage1 equ $C054 switch in text page 1
txtpage2 equ $C055 switch in text page 2
statereg equ $C068 memory state register
phaseoff equ $C080 disk port
romin1 equ $C081 read ROM/write RAM bank 2
romin equ $C082 read ROM
altram equ $C083 read/write RAM bank 2
motoroff equ $C088 disk port
motoron equ $C089 disk port
drv0en equ $C08A disk port
ramin equ $C08B read/write RAM bank 1
q6l equ $C08C disk port
q6h equ $C08D disk port
q7l equ $C08E disk port
q7h equ $C08F disk port
rdtcp equ $C108 Thunderclock read entry
wttcp equ $C10B Thunderclock write entry
init80 equ $C300 init 80 col card
slot3id1 equ $C305 slot 3 card id 1
slot3id2 equ $C307 slot 3 card id 2
slot3id3 equ $C30B slot 3 card id 3
ext80col equ $C30C slot 3 80 col id
auxmove equ $C311 move (3C)-(3E) to (42)
xfer equ $C314
slot3irq equ $C3FA slot 3 irq handler
clrrom equ $CFFF switch out $C8 ROMs
rwts equ $D000 disk ii driver in bank 1
displc2 equ $D100 system death routine stored in bank 2
pathbuf equ $D700 pathname buffer
tclk_in equ $D742 clock driver in bank 2
fcbbuf equ $D800 fcb buffer
vcbbuf equ $D900 vcb buffer
bmbuf equ $DA00 512 byte bitmap buffer
gbuf equ $DC00 general purpose 512 byte block buffer
xdosorg equ $DE00 xdos MLI in aux memory
romirq equ $FA41 monitor irq entry
breakv equ $FA59 monitor break vector
resetv equ $FA62 monitor reset entry
HFB1E equ $FB1E version check byte
init equ $FB2F init text screen
settxt equ $FB39 set text mode
tabv equ $FB5B set vertical position
setpwrc equ $FB6F create power-up byte
version equ $FBB3 monitor ROM id byte
zidbyte equ $FBC0 monitor ROM id byte
bell1 equ $FBDD generate bell tone
home equ $FC58 home cursor and clear screen
clreol equ $FC9C clear to end of line
rdkey equ $FD0C input char with cursor
crout equ $FD8E issue carriage return
cout equ $FDED output character
idroutine equ $FE1F returns system info
setinv equ $FE80 set inverse text mode
setnorm equ $FE84 set normal text mode
setkbd equ $FE89 reset input to keyboard
setvid equ $FE93 reset output to screen
lcdest equ $FF00 load address
bell equ $FF3A output bell (ctl-G)
oldrst equ $FF59 monitor reset entry
* romrts equ $FFCB an rts location that must be in ROM
P8QUIT equ $E0D000
GSOS equ $E100A8
GSOS2 equ $E100B0
OS_BOOT equ $E100BD indicates O/S initially booted