2019-10-16 06:09:13 +00:00
|
|
|
|
NEW
|
|
|
|
|
AUTO 3,1
|
2023-11-25 11:51:33 +00:00
|
|
|
|
*--------------------------------------
|
2023-11-04 14:42:28 +00:00
|
|
|
|
SEL2.PBuf .EQ $0280 prefix buffer
|
|
|
|
|
SEL2.VBuf .EQ $0F00 volume buffer
|
|
|
|
|
SEL2.FBuf .EQ $1C00 open file buffer (selector)
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
SEL2.SYSLoad .EQ $2000 .SYS file load address
|
|
|
|
|
|
|
|
|
|
*--------------------------------------
|
2019-10-16 06:09:13 +00:00
|
|
|
|
* Alternate program selector segment for P8 when used in conjunction with
|
|
|
|
|
* gs/os. This code is used in place of the standard P8 interactive program
|
|
|
|
|
* selector when P8 is started up by GQuit. It is called when passing control
|
|
|
|
|
* from one application to another and the new application is 8-bit. This
|
|
|
|
|
* code first loads the specified P8 application at $2000 in bank 0 of memory.
|
|
|
|
|
* It then checks the message center for a possible name of a file. this file
|
|
|
|
|
* is passed on to the 8-bit application. This segment then passes control to
|
|
|
|
|
* the freshly loaded app. This code does NOT start with a CLD instruction
|
|
|
|
|
* (as other replacement quit code is supposed to do) because GQuit checks
|
|
|
|
|
* this to see if this version of quit code is available.
|
2023-11-04 14:42:28 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
SEL2.START .PH $1000
|
2019-10-16 06:09:13 +00:00
|
|
|
|
|
2023-11-04 14:42:28 +00:00
|
|
|
|
SEL2.START1 lda IO.RRAMWRAMBNK1 read/write LC bank 1
|
2019-10-16 06:09:13 +00:00
|
|
|
|
clc
|
|
|
|
|
xce 16 bit native mode.
|
|
|
|
|
jmp P8QUIT go to GQuit.
|
|
|
|
|
.HS 0000000000 offset to paragraph boundary.
|
|
|
|
|
.AS "GQ" id bytes so GQuit can identify this
|
|
|
|
|
|
|
|
|
|
* load application
|
|
|
|
|
*
|
|
|
|
|
* Entry is in 16-bit native mode. Exit is in emulation mode.
|
|
|
|
|
*
|
|
|
|
|
* On entry and exit:
|
|
|
|
|
* Data bank register is set to $00.
|
|
|
|
|
* Direct register is set to $0000.
|
|
|
|
|
* Stack pointer is set to $01FB.
|
|
|
|
|
*
|
|
|
|
|
* Inputs: acc = value of E1_OS_Switch (0 or 1, 1 = yes to switch)
|
|
|
|
|
*
|
|
|
|
|
* This code is moved to $00/1010 and executed there.
|
|
|
|
|
|
|
|
|
|
* first, copy the prefix passed from gs/os to our own volume name buffer
|
|
|
|
|
* so in case of an error setting the P8 prefix, it can be displayed in the
|
|
|
|
|
* error message.
|
|
|
|
|
|
|
|
|
|
>SHORTM 8 bit accumulator
|
|
|
|
|
|
|
|
|
|
pha save the switch status.
|
2023-11-04 14:42:28 +00:00
|
|
|
|
ldx ##ROM.INBUF point to passed prefix.
|
2019-10-16 06:09:13 +00:00
|
|
|
|
jsr copyvol copy the name into the buffer.
|
|
|
|
|
pla retrieve the switch status
|
|
|
|
|
|
|
|
|
|
* go into emulation mode to load and run Prodos 8 application
|
|
|
|
|
|
|
|
|
|
sec
|
|
|
|
|
xce 8 bit emulation mode
|
|
|
|
|
ora #$00 switching from P16 to P8 ?
|
|
|
|
|
beq L602D no.
|
|
|
|
|
|
|
|
|
|
* switching from P16 to P8 so pass prefix 0 from P16 to the P8 prefix. the
|
|
|
|
|
* prefix is passed at $00/0200 by GQuit.
|
|
|
|
|
|
|
|
|
|
L6020 jsr MLI set prefix
|
2023-11-04 14:42:28 +00:00
|
|
|
|
.DA #MLI.SETPREFIX
|
2019-10-16 06:09:13 +00:00
|
|
|
|
.DA pfxparms
|
|
|
|
|
bcc L602D if prefix ok.
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
jsr gqerror error handler.
|
|
|
|
|
bra L6020 try again
|
|
|
|
|
|
|
|
|
|
* load application at $2000
|
|
|
|
|
|
|
|
|
|
L602D xce native mode (carry clear)
|
|
|
|
|
>LONGX 16 bit regs, 8 bit acc.
|
2023-11-04 14:42:28 +00:00
|
|
|
|
lda SEL2.PBuf+1 is the application name
|
2019-10-16 06:09:13 +00:00
|
|
|
|
cmp #$2F a complete pathname ?
|
|
|
|
|
bne L603D no, use prefix as volume name
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
|
|
|
|
ldx ##SEL2.PBuf else use the application name.
|
2019-10-16 06:09:13 +00:00
|
|
|
|
jsr copyvol copy the volume name to buffer.
|
|
|
|
|
L603D sec back to emulation mode.
|
|
|
|
|
xce
|
|
|
|
|
L603F jsr MLI open the application file
|
2023-11-04 14:42:28 +00:00
|
|
|
|
.DA #MLI.OPEN
|
2019-10-16 06:09:13 +00:00
|
|
|
|
.DA opnparms
|
|
|
|
|
bcc L604C if open ok.
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
jsr gqerror handle error.
|
|
|
|
|
bra L603F try again.
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
L604C lda oprefnum copy ref number to parameter lists
|
|
|
|
|
sta eofrefn
|
|
|
|
|
sta rdrefnum
|
|
|
|
|
sta closeref
|
|
|
|
|
|
|
|
|
|
* do a geteof call for how many bytes to read
|
|
|
|
|
|
|
|
|
|
L6058 jsr MLI get eof
|
2023-11-04 14:42:28 +00:00
|
|
|
|
.DA #MLI.GETEOF
|
2019-10-16 06:09:13 +00:00
|
|
|
|
.DA eofparms
|
|
|
|
|
bcc L6065 eof ok.
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
jsr gqerror handle error.
|
|
|
|
|
bra L6058 try again.
|
|
|
|
|
|
|
|
|
|
* store the size of the file in the read parameter list
|
|
|
|
|
|
|
|
|
|
L6065 lda eofval
|
|
|
|
|
sta rdcount
|
|
|
|
|
lda eofval+1
|
|
|
|
|
sta rdcount+1
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
L6071 jsr MLI read
|
2023-11-04 14:42:28 +00:00
|
|
|
|
.DA #MLI.READ
|
2019-10-16 06:09:13 +00:00
|
|
|
|
.DA readparm
|
|
|
|
|
bcc L607E read ok
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
jsr gqerror
|
|
|
|
|
bra L6071
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
L607E jsr MLI close
|
2023-11-04 14:42:28 +00:00
|
|
|
|
.DA #MLI.CLOSE
|
2019-10-16 06:09:13 +00:00
|
|
|
|
.DA closeprm
|
|
|
|
|
bcc L608B close ok
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
jsr gqerror
|
|
|
|
|
bra L607E
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
L608B jsr dolaunch check for possible 2nd pathname.
|
|
|
|
|
bne L6099 if none then run program
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
jsr ckfordrv else make sure the file is online.
|
|
|
|
|
bcc L6099 if so then run the program.
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
lda #$45 volume not found error.
|
|
|
|
|
bra L60AB
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
|
|
|
|
L6099 lda IO.RROMBNK2 enable ROM
|
|
|
|
|
jmp SEL2.SYSLoad execute the system application
|
2019-10-16 06:09:13 +00:00
|
|
|
|
|
|
|
|
|
gqerror clc
|
|
|
|
|
xce 16 bit native mode
|
|
|
|
|
>LONGMX
|
|
|
|
|
jsr mountvol mount volume.
|
|
|
|
|
bcs L60AB if error.
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
sec back to emulation mode.
|
|
|
|
|
xce
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
* generate a fatal error while running under Prodos 8.
|
|
|
|
|
* on input, acc = error code. this routine does not return.
|
|
|
|
|
|
|
|
|
|
L60AB clc native mode
|
|
|
|
|
xce
|
|
|
|
|
>LONGMX
|
|
|
|
|
and ##$00FF mask off high byte of error code.
|
|
|
|
|
pha put on stack for IntMath tool call.
|
|
|
|
|
pea $0000 errval>>16
|
|
|
|
|
pea errval push address of string buffer.
|
|
|
|
|
pea $0004 make string 4 digits long.
|
|
|
|
|
>IIGS Int2Hex convert value to hex string.
|
|
|
|
|
pha make space for return value.
|
|
|
|
|
pea $0000 quitstr1>>16
|
|
|
|
|
pea quitstr1 push first error message address
|
|
|
|
|
pea $0000 quitstr2>>16
|
|
|
|
|
pea quitstr2 push second error message address
|
|
|
|
|
pea $0000 button1>>16
|
|
|
|
|
pea button1 push first button text address
|
|
|
|
|
pea $0000 quitbtn2>>16
|
|
|
|
|
pea quitbtn2 push 2nd button text address (null)
|
|
|
|
|
>IIGS TLTextMountVolume make the dialog box
|
|
|
|
|
pla retrieve button press (not used)
|
|
|
|
|
sec emulation mode
|
|
|
|
|
xce
|
|
|
|
|
jsr MLI quit back to GQuit
|
2023-11-04 14:42:28 +00:00
|
|
|
|
.DA #MLI.QUIT
|
2019-10-16 06:09:13 +00:00
|
|
|
|
.DA quitparms
|
|
|
|
|
|
|
|
|
|
* p8 mount volume
|
|
|
|
|
*
|
2023-11-04 14:42:28 +00:00
|
|
|
|
* on entry: SEL2.VBuf = name of volume to mount.
|
2019-10-16 06:09:13 +00:00
|
|
|
|
* 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.
|
|
|
|
|
|
2023-11-04 14:42:28 +00:00
|
|
|
|
mountvol ldy ##$0000 SEL2.VBuf>>16
|
|
|
|
|
ldx ##SEL2.VBuf set up pointer to volume name.
|
2019-10-16 06:09:13 +00:00
|
|
|
|
|
|
|
|
|
* if error is 'volume not found' or 'no disk in drive' then display the
|
|
|
|
|
* Mount Volume window, otherwise return with carry set.
|
|
|
|
|
|
|
|
|
|
and ##$00FF mask just in case.
|
|
|
|
|
cmp ##$0045 volume not found ?
|
|
|
|
|
beq L6101 yes
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
cmp ##$002F no disk in drive ?
|
|
|
|
|
beq L6101 yes
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
sec indicate error not handled.
|
|
|
|
|
rts return with error code still in acc.
|
|
|
|
|
|
|
|
|
|
L6101 pha save error code in case esc pressed.
|
|
|
|
|
phy pointer to volume name.
|
|
|
|
|
phx
|
|
|
|
|
tsc
|
|
|
|
|
phd save D reg.
|
|
|
|
|
tcd point D reg at stack.
|
|
|
|
|
lda [$01] get length byte and leading separator.
|
|
|
|
|
dec don't count leading separator.
|
|
|
|
|
xba then swap the bytes so the volume name
|
|
|
|
|
sta [$01] doesn't cpntain the separator.
|
|
|
|
|
pha room for result.
|
|
|
|
|
pea $0000 mountmsg>>16
|
|
|
|
|
pea mountmsg
|
|
|
|
|
phy hi word of pointer to volume name.
|
|
|
|
|
inx skip separator.
|
|
|
|
|
phx lo word of pointer to volume name.
|
|
|
|
|
pea $0000 button1>>16
|
|
|
|
|
pea button1 'Return'
|
|
|
|
|
pea $0000 button2>>16
|
|
|
|
|
pea button2 'Escape'
|
|
|
|
|
>IIGS TLTextMountVolume
|
|
|
|
|
lda [$01] restore first 2 bytes of vilume name
|
|
|
|
|
xba back to their original positions
|
|
|
|
|
inc and values.
|
|
|
|
|
sta [$01]
|
|
|
|
|
pla which button: 1=Return 2=Escape.
|
|
|
|
|
pld restore D reg.
|
|
|
|
|
plx pull volume name pointer off stack
|
|
|
|
|
plx
|
|
|
|
|
cmp ##$0001 which button was pressed ?
|
|
|
|
|
bne L613C if Escape pressed.
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
clc indicate Return was pressed.
|
|
|
|
|
pla pull original error code off stack.
|
|
|
|
|
rts return with carry clear.
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
L613C sec indicate Escape was pressed.
|
|
|
|
|
pla restore error code.
|
|
|
|
|
rts return with carry set.
|
|
|
|
|
|
|
|
|
|
* copy the volume name from the given pathname to the volume name buffer.
|
|
|
|
|
*
|
|
|
|
|
* inputs: x = length byte of complete pathname containing volume name.
|
2023-11-04 14:42:28 +00:00
|
|
|
|
* output: volume name is stored in SEL2.VBuf.
|
2019-10-16 06:09:13 +00:00
|
|
|
|
|
|
|
|
|
copyvol lda >1,x get the first slash
|
2023-11-04 14:42:28 +00:00
|
|
|
|
sta SEL2.VBuf+1
|
2019-10-16 06:09:13 +00:00
|
|
|
|
ldy ##$0002 initialize the length count.
|
|
|
|
|
|
|
|
|
|
L6148 lda >2,x now copy the volume name up to
|
|
|
|
|
cmp #$2F the separating slash.
|
|
|
|
|
beq L6156
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
|
|
|
|
sta SEL2.VBuf,y
|
2019-10-16 06:09:13 +00:00
|
|
|
|
inx
|
|
|
|
|
iny
|
|
|
|
|
bra L6148
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
L6156 dey fix character count.
|
|
|
|
|
tya length.
|
2023-11-04 14:42:28 +00:00
|
|
|
|
sta SEL2.VBuf store the resultant string length.
|
2019-10-16 06:09:13 +00:00
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
* translate a filename message from the message center to the currently
|
|
|
|
|
* launching P8 application if it can accept a second filename. If found,
|
|
|
|
|
* copy the filename into the application's filename buffer.
|
|
|
|
|
* 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.
|
|
|
|
|
|
2023-11-04 14:42:28 +00:00
|
|
|
|
dolaunch lda SEL2.SYSLoad does the app start with a jump ?
|
2019-10-16 06:09:13 +00:00
|
|
|
|
cmp #$4C
|
|
|
|
|
bne L616F no, doesn't follow the convention.
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
lda #$EE check for the signature bytes.
|
2023-11-04 14:42:28 +00:00
|
|
|
|
cmp SEL2.SYSLoad+3
|
2019-10-16 06:09:13 +00:00
|
|
|
|
bne L616F 1st one doesn't match, skip it.
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
|
|
|
|
cmp SEL2.SYSLoad+4
|
2019-10-16 06:09:13 +00:00
|
|
|
|
beq L6170 both match, go get a filename message.
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
L616F rts just return to launch the app.
|
|
|
|
|
|
|
|
|
|
L6170 lda #$FF put flag conditioning value on
|
|
|
|
|
pha the stack (assume error).
|
|
|
|
|
clc native 16-bit mode.
|
|
|
|
|
xce
|
|
|
|
|
>LONGMX
|
|
|
|
|
pha make room on stack for user id.
|
|
|
|
|
>IIGS MMStartUp start up the memory manager.
|
|
|
|
|
pla get the user id and
|
|
|
|
|
pha leave it on the stack.
|
|
|
|
|
pha
|
|
|
|
|
pha make room on stack for new handle.
|
|
|
|
|
pea $0000
|
|
|
|
|
pea $000A get a 10 byte block of memory.
|
|
|
|
|
pha put user id on stack.
|
|
|
|
|
pea $0000 totally unrestricted block.
|
|
|
|
|
pha LocationPtr (not used)
|
|
|
|
|
pha
|
|
|
|
|
>IIGS NewHandle go get the block of memory.
|
|
|
|
|
pla get the handle from the stack.
|
|
|
|
|
plx
|
|
|
|
|
bcs L620A branch if error, no memory available.
|
|
|
|
|
phx leave the handle on the stack.
|
|
|
|
|
pha
|
|
|
|
|
pea $0002 'get' a message.
|
|
|
|
|
pea $0001 get a type 1 (filename) message.
|
|
|
|
|
phx put the message handle on the stack
|
|
|
|
|
pha (still in acc and x regs)
|
|
|
|
|
>IIGS MessageCenter
|
|
|
|
|
bcs L6203 branch if no message.
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
pha leave 4 bytes free on stack
|
|
|
|
|
pha (will be used as a direct page pointer)
|
|
|
|
|
tsc get the stack pointer.
|
|
|
|
|
phd save current direct register.
|
|
|
|
|
inc point to new direct page space.
|
|
|
|
|
tcd make a new direct page.
|
|
|
|
|
lda [$04] de-reference the handle.
|
|
|
|
|
sta $00
|
|
|
|
|
ldy ##$0002
|
|
|
|
|
lda [$04],y
|
|
|
|
|
sta $02
|
|
|
|
|
ldy ##$0006 get the message command.
|
|
|
|
|
lda [$00],y
|
|
|
|
|
bne bad_msg if print, then skip it.
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
lda $00 adjust pointer to filename string.
|
|
|
|
|
clc
|
|
|
|
|
adc ##$0008
|
|
|
|
|
sta $00
|
|
|
|
|
bcc L61D1
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
inc $02
|
|
|
|
|
L61D1 lda [$00] get the length of the string.
|
|
|
|
|
and ##$00FF mask off high (leaving just the length)
|
|
|
|
|
>SHORTM 8 bit accumulator
|
2023-11-04 14:42:28 +00:00
|
|
|
|
cmp SEL2.SYSLoad+5 check against length of app buffer.
|
2019-10-16 06:09:13 +00:00
|
|
|
|
beq L61DF if equal then continue with move.
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
bcs bad_msg if too long then bad message.
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
|
|
|
|
L61DF tay string length.
|
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
L61E0 lda [$00],y get a character.
|
2023-11-04 14:42:28 +00:00
|
|
|
|
sta SEL2.SYSLoad+6,y store it in the app's filename buffer
|
|
|
|
|
sta ROM.INBUF,y and in prefix buffer.
|
2019-10-16 06:09:13 +00:00
|
|
|
|
dey
|
|
|
|
|
bpl L61E0
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
lda #$00 change flag conditioning value on stack
|
|
|
|
|
sta $0D,s to indicate a filename is passed.
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
|
|
|
|
bad_msg >LONGM 16-bit acc.
|
2019-10-16 06:09:13 +00:00
|
|
|
|
pld restore direct register.
|
|
|
|
|
pla fix stack because handle and userid
|
|
|
|
|
pla still on stack.
|
|
|
|
|
pea $0003 now delete the message (done with it).
|
|
|
|
|
pea $0001 message type 1.
|
|
|
|
|
pha garbage handle (not used).
|
|
|
|
|
pha
|
|
|
|
|
>IIGS MessageCenter go delete the message.
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
L6203 >IIGS DisposeHandle throw away message (handle is on stack)
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
L620A >IIGS MMShutDown shutdown the memory manager (userid is
|
|
|
|
|
sec on stack).
|
|
|
|
|
xce back to emulation mode.
|
|
|
|
|
|
|
|
|
|
pla condition z-flag with value on stack.
|
|
|
|
|
bne L6231 then done.
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
|
|
|
|
ldx ROM.INBUF get length of pathname.
|
|
|
|
|
lda #$2F look for slash.
|
|
|
|
|
|
|
|
|
|
L621B cmp ROM.INBUF,x
|
2019-10-16 06:09:13 +00:00
|
|
|
|
beq L6225 when found, set prefix.
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
dex
|
|
|
|
|
bne L621B
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
bra L6231 if no slash, just skip it.
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
L6225 dex don't include trailing slash.
|
2023-11-04 14:42:28 +00:00
|
|
|
|
stx ROM.INBUF set new length.
|
2019-10-16 06:09:13 +00:00
|
|
|
|
jsr MLI set the P8 prefix.
|
2023-11-04 14:42:28 +00:00
|
|
|
|
.DA #MLI.SETPREFIX
|
2019-10-16 06:09:13 +00:00
|
|
|
|
.DA pfxparms
|
|
|
|
|
lda #$00 set z-flag
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
L6231 rts and go launch the app.
|
|
|
|
|
|
|
|
|
|
* check for disk volume
|
|
|
|
|
*
|
|
|
|
|
* on exit:
|
|
|
|
|
* carry clear = disk was found
|
|
|
|
|
* carry set = disk not found
|
|
|
|
|
|
|
|
|
|
ckfordrv clc native mode
|
|
|
|
|
xce
|
|
|
|
|
>LONGX 16-bit regs, 8-bit acc.
|
2023-11-04 14:42:28 +00:00
|
|
|
|
ldx ##SEL2.SYSLoad+6 point to pathname buffer.
|
2019-10-16 06:09:13 +00:00
|
|
|
|
jsr copyvol copy volume name to pathname buffer.
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
.1 sec emulation mode.
|
|
|
|
|
xce
|
|
|
|
|
jsr MLI get info on the volume.
|
2023-11-04 14:42:28 +00:00
|
|
|
|
.DA #MLI.GFINFO
|
2019-10-16 06:09:13 +00:00
|
|
|
|
.DA gfiparms
|
|
|
|
|
bcc .2 branch if volume found,
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
clc (native mode)
|
|
|
|
|
xce
|
|
|
|
|
>LONGMX
|
2023-11-04 14:42:28 +00:00
|
|
|
|
jsr mountvol else ask user to mount the volume.
|
2019-10-16 06:09:13 +00:00
|
|
|
|
bcc .1 if <return> pressed, then try again.
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
sec emulation mode.
|
|
|
|
|
xce
|
|
|
|
|
sec disk not found.
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
.2 rts
|
|
|
|
|
|
|
|
|
|
* Prodos 8 parameter lists
|
|
|
|
|
|
2023-11-04 14:42:28 +00:00
|
|
|
|
pfxparms .DA #01 1 parm.
|
|
|
|
|
.DA ROM.INBUF address of prefix.
|
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
opnparms .DA #3 3 parms.
|
2023-11-04 14:42:28 +00:00
|
|
|
|
.DA SEL2.PBuf pathname
|
|
|
|
|
.DA SEL2.FBuf i/o buffer
|
2019-10-16 06:09:13 +00:00
|
|
|
|
oprefnum .HS 00 reference #
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
eofparms .DA #02 2 parms
|
|
|
|
|
eofrefn .HS 00 reference #
|
|
|
|
|
eofval .HS 000000 3 byte eof value
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
readparm .DA #04 4 parms
|
|
|
|
|
rdrefnum .HS 00 reference #
|
2023-11-04 14:42:28 +00:00
|
|
|
|
.DA SEL2.SYSLoad read into $2000 (bank 0).
|
2019-10-16 06:09:13 +00:00
|
|
|
|
rdcount .HS 0000 # of bytes to read.
|
|
|
|
|
.HS 0000 transfer count
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
closeprm .DA #1 1 parm
|
|
|
|
|
closeref .HS 00 reference #
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
quitparms .DA #04 4 parms.
|
|
|
|
|
.HS 00 quit back to launcher (GQuit)
|
|
|
|
|
.HS 0000
|
|
|
|
|
.HS 00
|
|
|
|
|
.HS 0000
|
2023-11-04 14:42:28 +00:00
|
|
|
|
|
2019-10-16 06:09:13 +00:00
|
|
|
|
gfiparms .DA #$0A 10 parms
|
2023-11-04 14:42:28 +00:00
|
|
|
|
.DA SEL2.VBuf volume buffer
|
2019-10-16 06:09:13 +00:00
|
|
|
|
.DA #0 access
|
|
|
|
|
.DA #0 file type
|
|
|
|
|
.DA 0 aux type
|
|
|
|
|
.DA #0 storage type
|
|
|
|
|
.DA 0 blocks used
|
|
|
|
|
.DA 0 modification date
|
|
|
|
|
.DA 0 modification time
|
|
|
|
|
.DA 0 creation date
|
|
|
|
|
.DA 0 creation time
|
|
|
|
|
|
|
|
|
|
* messages for P8 fatal error. maximum length of message is 35 characters.
|
|
|
|
|
* the error code will be displayed immediately after the final character.
|
|
|
|
|
|
|
|
|
|
quitstr1 .DA #$1B
|
|
|
|
|
.AS "Can't run next application."
|
|
|
|
|
quitstr2 .DA #$14
|
|
|
|
|
.AS "ProDOS Error = $"
|
|
|
|
|
errval .AS " "
|
|
|
|
|
quitbtn2 .HS 00
|
|
|
|
|
|
|
|
|
|
* messages for P8 mount volume. maximum length of message is 35 characters.
|
|
|
|
|
* the button labels must not be more than 16 characters.
|
|
|
|
|
|
|
|
|
|
mountmsg .DA #$17
|
|
|
|
|
.AS "Please insert the disk:"
|
|
|
|
|
button1 .DA #$0D
|
|
|
|
|
.AS "Accept: "
|
|
|
|
|
.DA #$1B mousetext on
|
|
|
|
|
.DA #$0F inverse on
|
|
|
|
|
.DA #$4D mousetext return
|
|
|
|
|
.DA #$0E normal on
|
|
|
|
|
.DA #$18 mousetext off
|
|
|
|
|
button2 .DA #$0B
|
|
|
|
|
.AS "Cancel: Esc"
|
|
|
|
|
*--------------------------------------
|
2023-11-04 14:42:28 +00:00
|
|
|
|
.EP
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* .LIST ON
|
2019-11-04 07:21:40 +00:00
|
|
|
|
SEL2.LEN .EQ *-SEL2.START
|
2023-11-04 14:42:28 +00:00
|
|
|
|
.LIST OFF
|
|
|
|
|
*--------------------------------------
|
2019-10-16 06:09:13 +00:00
|
|
|
|
MAN
|
2022-04-27 19:24:41 +00:00
|
|
|
|
SAVE usr/src/prodos.fx/prodos.s.sel2
|
|
|
|
|
LOAD usr/src/prodos.fx/prodos.s
|
2019-10-16 06:09:13 +00:00
|
|
|
|
ASM
|