mirror of https://github.com/A2osX/A2osX.git
ProDOS.FX/BasicFX : new QUIT Code to launch .BAS & .BIN
EDIT & other BIN : bugfixes
This commit is contained in:
parent
d4568be299
commit
dcde70ebe7
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -401,7 +401,7 @@ BS.QUIT.IIgs jsr BS.RAMReset
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
BS.RAMReset bit GP.CISPARE1
|
BS.RAMReset bit GP.CISPARE1
|
||||||
bpl .8
|
bpl .8
|
||||||
|
|
||||||
php
|
php
|
||||||
sei
|
sei
|
||||||
|
|
||||||
|
|
|
@ -37,9 +37,6 @@ LDR.START1 ldx #$FF
|
||||||
jsr LDR.ShrinkRAM
|
jsr LDR.ShrinkRAM
|
||||||
bcs .3
|
bcs .3
|
||||||
|
|
||||||
lda bRAMFlag
|
|
||||||
sta GP.CISPARE1
|
|
||||||
|
|
||||||
lda #%11001111 pages 0,1,...,4,5,6,7 protected
|
lda #%11001111 pages 0,1,...,4,5,6,7 protected
|
||||||
sta MLI.MEMTABL
|
sta MLI.MEMTABL
|
||||||
|
|
||||||
|
@ -67,6 +64,9 @@ LDR.START1 ldx #$FF
|
||||||
lda /LDR.GP.DST
|
lda /LDR.GP.DST
|
||||||
jsr X.Unpak.XatYA
|
jsr X.Unpak.XatYA
|
||||||
|
|
||||||
|
lda bRAMFlag
|
||||||
|
sta GP.CISPARE1
|
||||||
|
|
||||||
bit IO.RRAMWRAMBNK2
|
bit IO.RRAMWRAMBNK2
|
||||||
bit IO.RRAMWRAMBNK2
|
bit IO.RRAMWRAMBNK2
|
||||||
|
|
||||||
|
|
|
@ -210,7 +210,7 @@ Wait.TimeOut sec
|
||||||
.9 rts
|
.9 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.END
|
CS.END
|
||||||
LIBETALK .AZ "LIBETALK"
|
LIBETALK .AZ "libetalk"
|
||||||
hLIBETALK .BS 1
|
hLIBETALK .BS 1
|
||||||
SSCANF.ADDR .AZ "%D.%d"
|
SSCANF.ADDR .AZ "%D.%d"
|
||||||
SSCANF.MAC .AZ "%h:%h:%h:%h:%h:%h"
|
SSCANF.MAC .AZ "%h:%h:%h:%h:%h:%h"
|
||||||
|
|
|
@ -623,9 +623,11 @@ SCRN.ToLineBuf sta (LineBufPtr)
|
||||||
SCRN.LineBufOut lda #0
|
SCRN.LineBufOut lda #0
|
||||||
sta (LineBufPtr)
|
sta (LineBufPtr)
|
||||||
|
|
||||||
|
ldy #S.PS.hStdOut
|
||||||
|
lda (pPS),y
|
||||||
|
>PUSHA
|
||||||
>PUSHW.G LineBufBase
|
>PUSHW.G LineBufBase
|
||||||
>PUSHBI 0
|
>SYSCALL FPutS
|
||||||
>SYSCALL PrintF
|
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
MAN
|
MAN
|
||||||
|
|
|
@ -514,42 +514,42 @@ CS.END
|
||||||
LIBETALK .AZ "libetalk"
|
LIBETALK .AZ "libetalk"
|
||||||
hLIBETALK .BS 1
|
hLIBETALK .BS 1
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
MSG.USAGE .AZ "Usage : ETCONFIG\r\n"
|
MSG.USAGE .CZ "Usage : ETCONFIG\r\n"
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
MSG.NODEV .AZ "EtherTalk not bound to any device."
|
MSG.NODEV .CZ "EtherTalk not bound to any device."
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
MSG1.DEV .AS "NIC Device Configuration :\r\n"
|
MSG1.DEV .CS "NIC Device Configuration :\r\n"
|
||||||
.AS " Device ID : $%h\r\n"
|
.CS " Device ID : $%h\r\n"
|
||||||
.AS " Device Name : %s\r\n"
|
.CS " Device Name : %s\r\n"
|
||||||
.AS " Device Type : %S\r\n"
|
.CS " Device Type : %S\r\n"
|
||||||
.AZ " HW Address : %02h:%02h:%02h:%02h:%02h:%02h\r\n"
|
.CZ " HW Address : %02h:%02h:%02h:%02h:%02h:%02h\r\n"
|
||||||
MSG1.DEV.ARP .AZ " ARP Offload : %d\r\n"
|
MSG1.DEV.ARP .CZ " ARP Offload : %d\r\n"
|
||||||
MSG1.DEV.IP .AS " IP Offload : %d\r\n"
|
MSG1.DEV.IP .CS " IP Offload : %d\r\n"
|
||||||
.AZ " Link Status : "
|
.CZ " Link Status : "
|
||||||
MSG1.LINK.OK .AZ "OK"
|
MSG1.LINK.OK .CZ "OK"
|
||||||
MSG1.LINK.KO .AZ "Media Disconnected"
|
MSG1.LINK.KO .CZ "Media Disconnected"
|
||||||
MSG1.LINKSPEED .AZ " Link Speed : 1"
|
MSG1.LINKSPEED .CZ " Link Speed : 1"
|
||||||
MSG1.DPLX.FD .AZ " Mbit/s,Full Duplex"
|
MSG1.DPLX.FD .CZ " Mbit/s,Full Duplex"
|
||||||
MSG1.DPLX.HD .AZ " Mbit/s,Half Duplex"
|
MSG1.DPLX.HD .CZ " Mbit/s,Half Duplex"
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
MSG2 .AZ "EtherTalk Configuration : "
|
MSG2 .CZ "EtherTalk Configuration : "
|
||||||
MSG2.C .AZ "Configured"
|
MSG2.C .CZ "Configured"
|
||||||
MSG2.U .AZ "Not Configured"
|
MSG2.U .CZ "Not Configured"
|
||||||
MSG2.ADDR .AZ " Network/Node : %D/%d\r\n"
|
MSG2.ADDR .CZ " Network/Node : %D/%d\r\n"
|
||||||
MSG2.ROUTER .AZ " Router : %D/%d\r\n"
|
MSG2.ROUTER .CZ " Router : %D/%d\r\n"
|
||||||
MSG2.OBJECT .AZ " Object Name : %S\r\n"
|
MSG2.OBJECT .CZ " Object Name : %S\r\n"
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
MSG.CFG .AZ "ETCONFIG:Reading %s..."
|
MSG.CFG .CZ "ETCONFIG:Reading %s..."
|
||||||
MSG.CFG.KO .AZ "Not Found. [%h]\r\n"
|
MSG.CFG.KO .CZ "Not Found. [%h]\r\n"
|
||||||
MSG.CFG.OK .AZ "OK."
|
MSG.CFG.OK .CZ "OK."
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
HOSTNAME .AZ "${ROOT}etc/hostname"
|
HOSTNAME .AZ "${ROOT}etc/hostname"
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CFG.DefaultHost .AZ "a2osx-%H"
|
CFG.DefaultHost .CZ "a2osx-%H"
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
MSG.PROBE .AZ "ETCONFIG:Acquiring NODE..."
|
MSG.PROBE .CZ "ETCONFIG:Acquiring NODE..."
|
||||||
MSG.PROBE.KO .AZ "ETCONFIG:Time Out [%h].\r\n"
|
MSG.PROBE.KO .CZ "ETCONFIG:Time Out [%h].\r\n"
|
||||||
MSG.PROBE.OK .AZ "ETCONFIG:Success."
|
MSG.PROBE.OK .CZ "ETCONFIG:Success."
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
ETKCFG .BS S.ETKCFG
|
ETKCFG .BS S.ETKCFG
|
||||||
CFG.hCfgFile .BS 1
|
CFG.hCfgFile .BS 1
|
||||||
|
|
|
@ -460,17 +460,17 @@ ZPCode sta SETREADAUX
|
||||||
rts
|
rts
|
||||||
ZPCodeLen .EQ *-ZPCode
|
ZPCodeLen .EQ *-ZPCode
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
MSG0 .CZ "hMem Flags PID REF PTR LEN BINPATH/DATA\r\n"
|
MSG0 .CZ "hMem Flags PID REF PTR LEN BINPATH/DATA\r\n"
|
||||||
MSG1.INV .CZ "\e[7m"
|
MSG1.INV .CZ "\e[7m"
|
||||||
MSG1 .CZ "$%h %s %3d %3d $%H %5D "
|
MSG1 .CZ " %h %s %3d %3d %H %5D "
|
||||||
MSG1.BIN .CZ "\e[7m%s\e[0m\r\n"
|
MSG1.BIN .CZ "\e[7m%s\e[0m\r\n"
|
||||||
MSG1.STR .CZ "[%03d:%s]\e[0m\r\n"
|
MSG1.STR .CZ "[%03d:%s]\e[0m\r\n"
|
||||||
MSG1.HEX .CZ "?HEX:%h%h.%h%h.%h%h.%h%h.%h%h.%h%h.%h%h.%h%h\e[0m\r\n"
|
MSG1.HEX .CZ "?HEX:%h%h.%h%h.%h%h.%h%h.%h%h.%h%h.%h%h.%h%h\e[0m\r\n"
|
||||||
MSG1X .CZ "$%h %s %3d %3d $%H %5D\e[0m\r\n"
|
MSG1X .CZ " %h %s %3d %3d %H %5D\e[0m\r\n"
|
||||||
MSG2 .CZ "Allocated hMem:%d, Total:%d\r\n"
|
MSG2 .CZ "Allocated hMem:%d, Total:%d\r\n"
|
||||||
MSG3 .CS "High Memory: $%H, "
|
MSG3 .CS "High Memory: %H, "
|
||||||
.CS "Free ULimit: $%H, "
|
.CS "Free ULimit: %H, "
|
||||||
.CS "Low : $%H, "
|
.CS "Low : %H, "
|
||||||
.CS "Free : %5D Bytes."
|
.CS "Free : %5D Bytes."
|
||||||
MSG.CRLF .CZ "\r\n"
|
MSG.CRLF .CZ "\r\n"
|
||||||
MSG.FLAGS .CS "UZXAfcds"
|
MSG.FLAGS .CS "UZXAfcds"
|
||||||
|
|
|
@ -21,9 +21,11 @@ UD.IO.Cmd.NetOpen .EQ $70
|
||||||
UD.IO.Cmd.NetClose .EQ $71
|
UD.IO.Cmd.NetClose .EQ $71
|
||||||
UD.IO.Cmd.NetSend .EQ $72
|
UD.IO.Cmd.NetSend .EQ $72
|
||||||
UD.IO.Cmd.NetRcvd .EQ $73
|
UD.IO.Cmd.NetRcvd .EQ $73
|
||||||
|
UD.IO.Cmd.NetPeek .EQ $74
|
||||||
|
UD.IO.Cmd.NetStatus .EQ $75
|
||||||
UD.IO.UnitNum .EQ $C083 Write
|
UD.IO.UnitNum .EQ $C083 Write
|
||||||
UD.IO.MemPtrL .EQ $C084
|
UD.IO.MemPtrL .EQ $C084
|
||||||
UD.IO.MemPtrH .EQ $C085
|
UD.IO.MemPtrH .EQ $C085
|
||||||
UD.IO.BlockNum .EQ $C086 Write 4 bytes, BE
|
UD.IO.BlockNum .EQ $C086 Write 4 bytes, BE
|
||||||
UD.IO.RData .EQ $C087 Read
|
UD.IO.RData .EQ $C087 Read
|
||||||
UD.IO.WData .EQ $C088 Write
|
UD.IO.WData .EQ $C088 Write
|
||||||
|
@ -77,9 +79,9 @@ Dev.Detect >STYA ZPArgPtr
|
||||||
lda #$C7
|
lda #$C7
|
||||||
|
|
||||||
.1 sta ZPPtr1+1
|
.1 sta ZPPtr1+1
|
||||||
|
|
||||||
ldy #ROM.SIG.L-1
|
ldy #ROM.SIG.L-1
|
||||||
|
|
||||||
.10 lda (ZPPtr1),y
|
.10 lda (ZPPtr1),y
|
||||||
cmp ROM.SIG,y
|
cmp ROM.SIG,y
|
||||||
bne .2
|
bne .2
|
||||||
|
@ -95,7 +97,7 @@ Dev.Detect >STYA ZPArgPtr
|
||||||
asl
|
asl
|
||||||
asl
|
asl
|
||||||
|
|
||||||
sta DEVSLOTx0
|
sta DEVSLOTx0
|
||||||
bra .3
|
bra .3
|
||||||
|
|
||||||
.2 dec FD.DEV.NAME+3
|
.2 dec FD.DEV.NAME+3
|
||||||
|
@ -120,12 +122,12 @@ Dev.Detect >STYA ZPArgPtr
|
||||||
|
|
||||||
jsr Dev.ParseArgs
|
jsr Dev.ParseArgs
|
||||||
bcs .99
|
bcs .99
|
||||||
|
|
||||||
.8 >PUSHW L.MSG.DETECT.OK
|
.8 >PUSHW L.MSG.DETECT.OK
|
||||||
>PUSHW L.FD.DEV.NAME
|
>PUSHW L.FD.DEV.NAME
|
||||||
>PUSHBI 2
|
>PUSHBI 2
|
||||||
>SYSCALL PrintF
|
>SYSCALL PrintF
|
||||||
|
|
||||||
>PUSHWI DRV.END
|
>PUSHWI DRV.END
|
||||||
>PUSHWI DRV.CS.END-DRV.CS.START
|
>PUSHWI DRV.CS.END-DRV.CS.START
|
||||||
>PUSHWI DRV.CS.START
|
>PUSHWI DRV.CS.START
|
||||||
|
@ -161,7 +163,7 @@ Dev.ParseArgs lda (ZPArgPtr)
|
||||||
|
|
||||||
.1 >PUSHW ZPArgPtr
|
.1 >PUSHW ZPArgPtr
|
||||||
>PUSHW L.SSCANF.MAC
|
>PUSHW L.SSCANF.MAC
|
||||||
|
|
||||||
ldx #0
|
ldx #0
|
||||||
|
|
||||||
.2 >PUSHW L.MAC0,x
|
.2 >PUSHW L.MAC0,x
|
||||||
|
@ -173,7 +175,7 @@ Dev.ParseArgs lda (ZPArgPtr)
|
||||||
>PUSHBI 12 6 x byte PTRs
|
>PUSHBI 12 6 x byte PTRs
|
||||||
>SYSCALL SScanF
|
>SYSCALL SScanF
|
||||||
bcc .8
|
bcc .8
|
||||||
|
|
||||||
lda #E.SYN
|
lda #E.SYN
|
||||||
* sec
|
* sec
|
||||||
.8 rts
|
.8 rts
|
||||||
|
@ -220,6 +222,9 @@ DRV.CS.START cld
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
STATUS >STYA ZPIOCTL
|
STATUS >STYA ZPIOCTL
|
||||||
|
|
||||||
|
jsr IO.GetStatus
|
||||||
|
bcs STATUS.99
|
||||||
|
|
||||||
ldy #S.IOCTL.S
|
ldy #S.IOCTL.S
|
||||||
lda (ZPIOCTL),y
|
lda (ZPIOCTL),y
|
||||||
beq .1
|
beq .1
|
||||||
|
@ -256,7 +261,7 @@ STATUS.DCB cmp #S.IOCTL.S.GETDCB
|
||||||
|
|
||||||
lda #S.DCB.NIC.LINK.OK
|
lda #S.DCB.NIC.LINK.OK
|
||||||
tsb DCB+S.DCB.NIC.LINK
|
tsb DCB+S.DCB.NIC.LINK
|
||||||
|
|
||||||
|
|
||||||
lda #S.DCB.NIC.LINK.FD
|
lda #S.DCB.NIC.LINK.FD
|
||||||
tsb DCB+S.DCB.NIC.LINK
|
tsb DCB+S.DCB.NIC.LINK
|
||||||
|
@ -279,7 +284,7 @@ STATUS.DCB cmp #S.IOCTL.S.GETDCB
|
||||||
rts
|
rts
|
||||||
|
|
||||||
STATUS.9 lda #MLI.E.BADCTL
|
STATUS.9 lda #MLI.E.BADCTL
|
||||||
sec
|
STATUS.99 sec
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
OPEN lda #S.DIB.S.OPENED
|
OPEN lda #S.DIB.S.OPENED
|
||||||
|
@ -291,7 +296,6 @@ OPEN lda #S.DIB.S.OPENED
|
||||||
* ldx DEVSLOTx0 Done by CLOSE
|
* ldx DEVSLOTx0 Done by CLOSE
|
||||||
|
|
||||||
lda #UD.IO.Cmd.NetOpen
|
lda #UD.IO.Cmd.NetOpen
|
||||||
sta UD.IO.Cmd,x
|
|
||||||
jsr IO.Exec
|
jsr IO.Exec
|
||||||
bcs .99
|
bcs .99
|
||||||
|
|
||||||
|
@ -300,13 +304,13 @@ OPEN lda #S.DIB.S.OPENED
|
||||||
.1 lda UD.IO.RData,x
|
.1 lda UD.IO.RData,x
|
||||||
sta DCB+S.DCB.NIC.MAC,y
|
sta DCB+S.DCB.NIC.MAC,y
|
||||||
iny
|
iny
|
||||||
|
|
||||||
cpy #6
|
cpy #6
|
||||||
bcc .1
|
bcc .1
|
||||||
|
|
||||||
lda #S.DIB.S.OPENED
|
lda #S.DIB.S.OPENED
|
||||||
tsb DIB+S.DIB.S
|
tsb DIB+S.DIB.S
|
||||||
|
|
||||||
clc
|
clc
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
@ -317,7 +321,6 @@ OPEN lda #S.DIB.S.OPENED
|
||||||
CLOSE ldx DEVSLOTx0
|
CLOSE ldx DEVSLOTx0
|
||||||
|
|
||||||
lda #UD.IO.Cmd.NetClose
|
lda #UD.IO.Cmd.NetClose
|
||||||
sta UD.IO.Cmd,x
|
|
||||||
jsr IO.Exec
|
jsr IO.Exec
|
||||||
bcs .9
|
bcs .9
|
||||||
|
|
||||||
|
@ -331,40 +334,26 @@ READ php
|
||||||
sei
|
sei
|
||||||
|
|
||||||
>STYA ZPIOCTL
|
>STYA ZPIOCTL
|
||||||
|
|
||||||
ldx DEVSLOTx0
|
ldx DEVSLOTx0
|
||||||
|
|
||||||
lda #UD.IO.Cmd.NetRcvd
|
lda #UD.IO.Cmd.NetPeek
|
||||||
sta UD.IO.Cmd,x
|
|
||||||
jsr IO.Exec
|
jsr IO.Exec
|
||||||
bcs READWRITE.99
|
bcs READWRITE.99
|
||||||
|
|
||||||
lda UD.IO.RData,x
|
lda UD.IO.RData,x
|
||||||
ldy #S.IOCTL.BYTECNT
|
|
||||||
sta (ZPIOCTL),y
|
|
||||||
pha
|
|
||||||
eor #$ff
|
|
||||||
sta Counter
|
sta Counter
|
||||||
|
|
||||||
lda UD.IO.RData,x
|
lda UD.IO.RData,x
|
||||||
iny
|
|
||||||
sta (ZPIOCTL),y
|
|
||||||
pha
|
|
||||||
eor #$ff
|
|
||||||
sta Counter+1
|
sta Counter+1
|
||||||
|
ora Counter
|
||||||
pla
|
|
||||||
ply
|
|
||||||
bne .1
|
|
||||||
|
|
||||||
tax
|
|
||||||
beq READWRITE.9
|
beq READWRITE.9
|
||||||
|
|
||||||
.1 >SYSCALL2 GetMem
|
>LDYA Counter
|
||||||
|
>SYSCALL2 GetMem
|
||||||
bcs READWRITE.99
|
bcs READWRITE.99
|
||||||
|
|
||||||
>STYA ZPBufPtr
|
>STYA ZPBufPtr
|
||||||
phx
|
stx .8+1
|
||||||
phy
|
phy
|
||||||
ldy #S.IOCTL.BUFPTR+1
|
ldy #S.IOCTL.BUFPTR+1
|
||||||
sta (ZPIOCTL),y
|
sta (ZPIOCTL),y
|
||||||
|
@ -374,6 +363,22 @@ READ php
|
||||||
|
|
||||||
ldx DEVSLOTx0
|
ldx DEVSLOTx0
|
||||||
|
|
||||||
|
lda #UD.IO.Cmd.NetRcvd
|
||||||
|
jsr IO.Exec
|
||||||
|
bcs READWRITE.99
|
||||||
|
|
||||||
|
lda UD.IO.RData,x
|
||||||
|
ldy #S.IOCTL.BYTECNT
|
||||||
|
sta (ZPIOCTL),y
|
||||||
|
eor #$ff
|
||||||
|
sta Counter
|
||||||
|
|
||||||
|
lda UD.IO.RData,x
|
||||||
|
iny
|
||||||
|
sta (ZPIOCTL),y
|
||||||
|
eor #$ff
|
||||||
|
sta Counter+1
|
||||||
|
|
||||||
ldy #0
|
ldy #0
|
||||||
|
|
||||||
.2 inc Counter
|
.2 inc Counter
|
||||||
|
@ -390,7 +395,7 @@ READ php
|
||||||
inc ZPBufPtr+1
|
inc ZPBufPtr+1
|
||||||
bra .2
|
bra .2
|
||||||
|
|
||||||
.8 pla hMem
|
.8 lda #$ff SELF MODIFIED
|
||||||
|
|
||||||
plp
|
plp
|
||||||
clc
|
clc
|
||||||
|
@ -408,9 +413,6 @@ WRITE php
|
||||||
|
|
||||||
ldx DEVSLOTx0
|
ldx DEVSLOTx0
|
||||||
|
|
||||||
lda #UD.IO.Cmd.NetSend
|
|
||||||
sta UD.IO.Cmd,x
|
|
||||||
|
|
||||||
ldy #S.IOCTL.BYTECNT
|
ldy #S.IOCTL.BYTECNT
|
||||||
lda (ZPIOCTL),y
|
lda (ZPIOCTL),y
|
||||||
sta UD.IO.WData,x
|
sta UD.IO.WData,x
|
||||||
|
@ -447,20 +449,54 @@ WRITE php
|
||||||
inc ZPBufPtr+1
|
inc ZPBufPtr+1
|
||||||
bra .1
|
bra .1
|
||||||
|
|
||||||
.8 jsr IO.Exec
|
.8 lda #UD.IO.Cmd.NetSend
|
||||||
|
|
||||||
|
jsr IO.Exec
|
||||||
bcs WRITE.99
|
bcs WRITE.99
|
||||||
|
|
||||||
plp
|
plp
|
||||||
clc
|
clc
|
||||||
rts
|
rts
|
||||||
|
|
||||||
WRITE.99 lda #MLI.E.IO
|
WRITE.99 lda #MLI.E.IO
|
||||||
plp
|
plp
|
||||||
sec
|
sec
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
IO.Exec lda #0
|
IO.GetStatus stz DCB+S.DCB.NIC.LINK
|
||||||
sta UD.IO.UnitNum,x
|
lda #S.DCB.NIC.SPEED.10
|
||||||
|
sta DCB+S.DCB.NIC.SPEED
|
||||||
|
|
||||||
|
ldx DEVSLOTx0
|
||||||
|
|
||||||
|
lda #UD.IO.Cmd.NetStatus
|
||||||
|
jsr IO.Exec
|
||||||
|
bcs .99
|
||||||
|
|
||||||
|
lda UD.IO.RData,x PHYCFGR
|
||||||
|
lsr CS if Link OK
|
||||||
|
ror DCB+S.DCB.NIC.LINK
|
||||||
|
lsr CS if 100mb
|
||||||
|
bcc .1
|
||||||
|
|
||||||
|
inc DCB+S.DCB.NIC.SPEED
|
||||||
|
|
||||||
|
.1 lsr CS if FD
|
||||||
|
bcc .2
|
||||||
|
|
||||||
|
lda #S.DCB.NIC.LINK.FD
|
||||||
|
tsb DCB+S.DCB.NIC.LINK
|
||||||
|
|
||||||
|
.2 lda UD.IO.RData,x VERSIONR
|
||||||
|
sta DIB+S.DIB.VERSION
|
||||||
|
|
||||||
|
clc
|
||||||
|
|
||||||
|
.99 rts
|
||||||
|
*--------------------------------------
|
||||||
|
IO.Exec sta UD.IO.Cmd,x
|
||||||
|
|
||||||
|
stz UD.IO.UnitNum,x
|
||||||
|
|
||||||
lda UD.IO.Exec,x
|
lda UD.IO.Exec,x
|
||||||
|
|
||||||
|
@ -484,7 +520,7 @@ DIB .DA #0
|
||||||
DCB .DA #S.DCB.T.NIC
|
DCB .DA #S.DCB.T.NIC
|
||||||
.BS 1 FLAGS
|
.BS 1 FLAGS
|
||||||
.BS 1 LINK
|
.BS 1 LINK
|
||||||
.DA #S.DCB.NIC.SPEED.10
|
.BS 1 SPEED
|
||||||
.HS 000000000000 MAC
|
.HS 000000000000 MAC
|
||||||
.BS 12 IP/MASK/GW
|
.BS 12 IP/MASK/GW
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
|
|
@ -66,6 +66,7 @@ S.FI.T.TXT .EQ $04
|
||||||
S.FI.T.BIN .EQ $06
|
S.FI.T.BIN .EQ $06
|
||||||
S.FI.T.DIR .EQ $0F
|
S.FI.T.DIR .EQ $0F
|
||||||
S.FI.T.ASM .EQ $FA
|
S.FI.T.ASM .EQ $FA
|
||||||
|
S.FI.T.BAS .EQ $FC
|
||||||
S.FI.T.PIX .EQ $CB
|
S.FI.T.PIX .EQ $CB
|
||||||
S.FI.T.FON .EQ $CC
|
S.FI.T.FON .EQ $CC
|
||||||
S.FI.T.PAK .EQ $CF
|
S.FI.T.PAK .EQ $CF
|
||||||
|
@ -117,6 +118,10 @@ S.FIEX.ACL.MOD .EQ 46
|
||||||
*
|
*
|
||||||
S.FIEX .EQ 48
|
S.FIEX .EQ 48
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
TBX.MemReset .EQ 0
|
||||||
|
TBX.EnumBlk .EQ 2
|
||||||
|
TBX.EnumNext .EQ 4
|
||||||
|
*--------------------------------------
|
||||||
MLI .EQ $BF00
|
MLI .EQ $BF00
|
||||||
*JSPARE .EQ $BF03
|
*JSPARE .EQ $BF03
|
||||||
DATETIME .EQ $BF06
|
DATETIME .EQ $BF06
|
||||||
|
|
|
@ -3,8 +3,7 @@ NEW
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
* NewBitmap (hWND, pBM, X, Y)
|
* NewBitmap (hWND, pBM, X, Y)
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
BITMAP.New >PULLW DY
|
BITMAP.New jsr OBJ.PullDXDY
|
||||||
>PULLW DX
|
|
||||||
>PULLW ZPBMPtr
|
>PULLW ZPBMPtr
|
||||||
jsr OBJ.PullHWND
|
jsr OBJ.PullHWND
|
||||||
|
|
||||||
|
|
|
@ -9,11 +9,7 @@ BUT.New lda #S.OBJ.T.BUT
|
||||||
|
|
||||||
phx hOBJ
|
phx hOBJ
|
||||||
|
|
||||||
ldy #S.OBJ.Y1
|
jsr OBJ.PullY1X1
|
||||||
jsr OBJ.PullWordAtY
|
|
||||||
|
|
||||||
ldy #S.OBJ.X1
|
|
||||||
jsr OBJ.PullWordAtY
|
|
||||||
|
|
||||||
ldy #S.BUT.ID
|
ldy #S.BUT.ID
|
||||||
jsr OBJ.PullWordAtY
|
jsr OBJ.PullWordAtY
|
||||||
|
|
|
@ -151,7 +151,8 @@ CB.SrcWCenterH ldy #S.OBJ.W
|
||||||
tax
|
tax
|
||||||
pla
|
pla
|
||||||
ror
|
ror
|
||||||
clc
|
*--------------------------------------
|
||||||
|
CB.AddAX2X1 clc
|
||||||
adc CB.Cache+S.CB.X1
|
adc CB.Cache+S.CB.X1
|
||||||
sta CB.Cache+S.CB.X1
|
sta CB.Cache+S.CB.X1
|
||||||
|
|
||||||
|
|
|
@ -128,32 +128,14 @@ CLIP.BitBltX lda CLIP.Screen+S.RECT.X1,x
|
||||||
|
|
||||||
.1 bmi .2
|
.1 bmi .2
|
||||||
|
|
||||||
lda CLIP.Cache+S.CB.X1
|
ldy #S.CB.X1
|
||||||
clc
|
jsr CLIP.AddTmpW2ClipCacheY
|
||||||
adc TmpW
|
|
||||||
sta CLIP.Cache+S.CB.X1
|
|
||||||
|
|
||||||
lda CLIP.Cache+S.CB.X1+1
|
ldy #S.CB.SrcX
|
||||||
adc TmpW+1
|
jsr CLIP.AddTmpW2ClipCacheY
|
||||||
sta CLIP.Cache+S.CB.X1+1
|
|
||||||
|
|
||||||
lda CLIP.Cache+S.CB.SrcX
|
ldy #S.CB.SrcW
|
||||||
clc
|
jsr CLIP.SubTmpW2ClipCacheY
|
||||||
adc TmpW
|
|
||||||
sta CLIP.Cache+S.CB.SrcX
|
|
||||||
|
|
||||||
lda CLIP.Cache+S.CB.SrcX+1
|
|
||||||
adc TmpW+1
|
|
||||||
sta CLIP.Cache+S.CB.SrcX+1
|
|
||||||
|
|
||||||
lda CLIP.Cache+S.CB.SrcW
|
|
||||||
sec
|
|
||||||
sbc TmpW
|
|
||||||
sta CLIP.Cache+S.CB.SrcW
|
|
||||||
|
|
||||||
lda CLIP.Cache+S.CB.SrcW+1
|
|
||||||
sbc TmpW+1
|
|
||||||
sta CLIP.Cache+S.CB.SrcW+1
|
|
||||||
bcc CLIP.Text.9
|
bcc CLIP.Text.9
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.2 lda CLIP.Cache+S.CB.X2
|
.2 lda CLIP.Cache+S.CB.X2
|
||||||
|
@ -170,14 +152,8 @@ CLIP.BitBltX lda CLIP.Screen+S.RECT.X1,x
|
||||||
|
|
||||||
.3 bmi .4
|
.3 bmi .4
|
||||||
|
|
||||||
lda CLIP.Cache+S.CB.SrcW
|
ldy #S.CB.SrcW
|
||||||
sec
|
jsr CLIP.SubTmpW2ClipCacheY
|
||||||
sbc TmpW
|
|
||||||
sta CLIP.Cache+S.CB.SrcW
|
|
||||||
|
|
||||||
lda CLIP.Cache+S.CB.SrcW+1
|
|
||||||
sbc TmpW+1
|
|
||||||
sta CLIP.Cache+S.CB.SrcW+1
|
|
||||||
bcc .9
|
bcc .9
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.4 lda CLIP.Screen+S.RECT.Y1,x
|
.4 lda CLIP.Screen+S.RECT.Y1,x
|
||||||
|
@ -194,32 +170,14 @@ CLIP.BitBltX lda CLIP.Screen+S.RECT.X1,x
|
||||||
|
|
||||||
.5 bmi .6
|
.5 bmi .6
|
||||||
|
|
||||||
lda CLIP.Cache+S.CB.Y1
|
ldy #S.CB.Y1
|
||||||
clc
|
jsr CLIP.AddTmpW2ClipCacheY
|
||||||
adc TmpW
|
|
||||||
sta CLIP.Cache+S.CB.Y1
|
|
||||||
|
|
||||||
lda CLIP.Cache+S.CB.Y1+1
|
ldy #S.CB.SrcY
|
||||||
adc TmpW+1
|
jsr CLIP.AddTmpW2ClipCacheY
|
||||||
sta CLIP.Cache+S.CB.Y1+1
|
|
||||||
|
ldy #S.CB.SrcH
|
||||||
lda CLIP.Cache+S.CB.SrcY
|
jsr CLIP.SubTmpW2ClipCacheY
|
||||||
clc
|
|
||||||
adc TmpW
|
|
||||||
sta CLIP.Cache+S.CB.SrcY
|
|
||||||
|
|
||||||
lda CLIP.Cache+S.CB.SrcY+1
|
|
||||||
adc TmpW+1
|
|
||||||
sta CLIP.Cache+S.CB.SrcY+1
|
|
||||||
|
|
||||||
lda CLIP.Cache+S.CB.SrcH
|
|
||||||
sec
|
|
||||||
sbc TmpW
|
|
||||||
sta CLIP.Cache+S.CB.SrcH
|
|
||||||
|
|
||||||
lda CLIP.Cache+S.CB.SrcH+1
|
|
||||||
sbc TmpW+1
|
|
||||||
sta CLIP.Cache+S.CB.SrcH+1
|
|
||||||
bcc .9
|
bcc .9
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.6 lda CLIP.Cache+S.CB.Y2
|
.6 lda CLIP.Cache+S.CB.Y2
|
||||||
|
@ -236,14 +194,8 @@ CLIP.BitBltX lda CLIP.Screen+S.RECT.X1,x
|
||||||
|
|
||||||
.7 bmi .8
|
.7 bmi .8
|
||||||
|
|
||||||
lda CLIP.Cache+S.CB.SrcH
|
ldy #S.CB.SrcH
|
||||||
sec
|
jsr CLIP.SubTmpW2ClipCacheY
|
||||||
sbc TmpW
|
|
||||||
sta CLIP.Cache+S.CB.SrcH
|
|
||||||
|
|
||||||
lda CLIP.Cache+S.CB.SrcH+1
|
|
||||||
sbc TmpW+1
|
|
||||||
sta CLIP.Cache+S.CB.SrcH+1
|
|
||||||
bcc .9
|
bcc .9
|
||||||
|
|
||||||
.8 clc
|
.8 clc
|
||||||
|
@ -466,6 +418,30 @@ CLIP.Rect.Overlap
|
||||||
.9 sec
|
.9 sec
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
CLIP.AddTmpW2ClipCacheY
|
||||||
|
clc
|
||||||
|
|
||||||
|
lda CLIP.Cache,y
|
||||||
|
adc TmpW
|
||||||
|
sta CLIP.Cache,y
|
||||||
|
|
||||||
|
lda CLIP.Cache+1,y
|
||||||
|
adc TmpW+1
|
||||||
|
sta CLIP.Cache+1,y
|
||||||
|
rts
|
||||||
|
*--------------------------------------
|
||||||
|
CLIP.SubTmpW2ClipCacheY
|
||||||
|
sec
|
||||||
|
|
||||||
|
lda CLIP.Cache,y
|
||||||
|
sbc TmpW
|
||||||
|
sta CLIP.Cache,y
|
||||||
|
|
||||||
|
lda CLIP.Cache+1,y
|
||||||
|
sbc TmpW+1
|
||||||
|
sta CLIP.Cache+1,y
|
||||||
|
rts
|
||||||
|
*--------------------------------------
|
||||||
MAN
|
MAN
|
||||||
SAVE usr/src/lib/libgui.s.clip
|
SAVE usr/src/lib/libgui.s.clip
|
||||||
LOAD usr/src/lib/libgui.s
|
LOAD usr/src/lib/libgui.s
|
||||||
|
|
|
@ -3,8 +3,7 @@ NEW
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
* NewLabel(HWND, pTEXT, wX, wY)
|
* NewLabel(HWND, pTEXT, wX, wY)
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
LABEL.New >PULLW DY
|
LABEL.New jsr OBJ.PullDXDY
|
||||||
>PULLW DX
|
|
||||||
>PULLW ZPPtr1
|
>PULLW ZPPtr1
|
||||||
jsr OBJ.PullHWND
|
jsr OBJ.PullHWND
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,7 @@ NEW
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
* NewMenu(pMENU, x, y)
|
* NewMenu(pMENU, x, y)
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
MENU.New >PULLW DY
|
MENU.New jsr OBJ.PullDXDY
|
||||||
>PULLW DX
|
|
||||||
>PULLYA
|
>PULLYA
|
||||||
|
|
||||||
MENU.New.I >STYA ZPPtr1 MENU definition
|
MENU.New.I >STYA ZPPtr1 MENU definition
|
||||||
|
@ -249,7 +248,7 @@ MENU.SetMenuSizePos
|
||||||
lda DY
|
lda DY
|
||||||
sta (ZPObjPtr),y
|
sta (ZPObjPtr),y
|
||||||
iny
|
iny
|
||||||
lda DY+1
|
lda DY+1
|
||||||
sta (ZPObjPtr),y
|
sta (ZPObjPtr),y
|
||||||
|
|
||||||
ldy #S.MENU.iW
|
ldy #S.MENU.iW
|
||||||
|
@ -481,9 +480,9 @@ MENU.Enter >LDYA L.WND.Screen
|
||||||
>PUSHW Counter Y1
|
>PUSHW Counter Y1
|
||||||
|
|
||||||
jsr MENU.New
|
jsr MENU.New
|
||||||
bcs .9
|
bcc MENU.Draw
|
||||||
|
|
||||||
jmp MENU.Draw
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.5 lda MSG+S.MSG.S
|
.5 lda MSG+S.MSG.S
|
||||||
bit #S.XY.S.CLK
|
bit #S.XY.S.CLK
|
||||||
|
@ -618,16 +617,12 @@ MENU.DrawMItem jsr MENU.ResetX1Y1X2
|
||||||
ldx hSYSFON
|
ldx hSYSFON
|
||||||
jsr DRAW.YAText
|
jsr DRAW.YAText
|
||||||
|
|
||||||
ldy #S.MENU.tW
|
ldy #S.MENU.tW+1
|
||||||
lda (ZPObjPtr),y
|
lda (ZPObjPtr),y
|
||||||
clc
|
tax
|
||||||
adc CB.Cache+S.CB.X1
|
dey
|
||||||
sta CB.Cache+S.CB.X1
|
|
||||||
|
|
||||||
iny
|
|
||||||
lda (ZPObjPtr),y
|
lda (ZPObjPtr),y
|
||||||
adc CB.Cache+S.CB.X1+1
|
jsr CB.AddAX2X1
|
||||||
sta CB.Cache+S.CB.X1+1
|
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
lda (ZPPtr1)
|
lda (ZPPtr1)
|
||||||
cmp #S.MITEM.T.ITEM
|
cmp #S.MITEM.T.ITEM
|
||||||
|
@ -642,16 +637,13 @@ MENU.DrawMItem jsr MENU.ResetX1Y1X2
|
||||||
.4 cmp #S.MITEM.T.SUBMENU
|
.4 cmp #S.MITEM.T.SUBMENU
|
||||||
bne .8
|
bne .8
|
||||||
|
|
||||||
ldy #S.MENU.kW
|
ldy #S.MENU.kW+1
|
||||||
lda (ZPObjPtr),y
|
lda (ZPObjPtr),y
|
||||||
clc
|
tax
|
||||||
adc CB.Cache+S.CB.X1
|
dey
|
||||||
sta CB.Cache+S.CB.X1
|
|
||||||
|
|
||||||
iny
|
|
||||||
lda (ZPObjPtr),y
|
lda (ZPObjPtr),y
|
||||||
adc CB.Cache+S.CB.X1+1
|
|
||||||
sta CB.Cache+S.CB.X1+1
|
jsr CB.AddAX2X1
|
||||||
|
|
||||||
ldx #BM.ID.RIGHT
|
ldx #BM.ID.RIGHT
|
||||||
jmp DRAW.xBM
|
jmp DRAW.xBM
|
||||||
|
|
|
@ -97,6 +97,10 @@ OBJ.GetPropAtY lda (ZPObjPtr),y
|
||||||
|
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
OBJ.PullDXDY >PULLW DY
|
||||||
|
>PULLW DX
|
||||||
|
rts
|
||||||
|
*--------------------------------------
|
||||||
OBJ.SetDXDYX1Y1 ldx #3
|
OBJ.SetDXDYX1Y1 ldx #3
|
||||||
ldy #S.OBJ.X1+3
|
ldy #S.OBJ.X1+3
|
||||||
|
|
||||||
|
@ -178,6 +182,11 @@ OBJ.SetAXAtY sta (ZPObjPtr),y
|
||||||
sta (ZPObjPtr),y
|
sta (ZPObjPtr),y
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
OBJ.PullY1X1 ldy #S.OBJ.Y1
|
||||||
|
jsr OBJ.PullWordAtY
|
||||||
|
|
||||||
|
ldy #S.OBJ.X1
|
||||||
|
*--------------------------------------
|
||||||
OBJ.PullWordAtY >PULLA
|
OBJ.PullWordAtY >PULLA
|
||||||
sta (ZPObjPtr),y
|
sta (ZPObjPtr),y
|
||||||
iny
|
iny
|
||||||
|
|
|
@ -175,7 +175,7 @@ PTR.ShowRect.I lda #S.CB.CMD.HLINE
|
||||||
sta CLIP.Cache+S.CB.M
|
sta CLIP.Cache+S.CB.M
|
||||||
lda #C.WHITE
|
lda #C.WHITE
|
||||||
sta CLIP.Cache+S.CB.COLOR
|
sta CLIP.Cache+S.CB.COLOR
|
||||||
>DEBUG
|
* >DEBUG
|
||||||
ldx #5 X1,Y1,X2
|
ldx #5 X1,Y1,X2
|
||||||
|
|
||||||
.1 lda PTR.Rect+S.RECT.X1,x
|
.1 lda PTR.Rect+S.RECT.X1,x
|
||||||
|
|
|
@ -146,11 +146,7 @@ WND.New ldy WND.Stack.Top
|
||||||
ldy #S.OBJ.W
|
ldy #S.OBJ.W
|
||||||
jsr OBJ.PullWordAtY
|
jsr OBJ.PullWordAtY
|
||||||
|
|
||||||
ldy #S.OBJ.Y1
|
jsr OBJ.PullY1X1
|
||||||
jsr OBJ.PullWordAtY
|
|
||||||
|
|
||||||
ldy #S.OBJ.X1
|
|
||||||
jsr OBJ.PullWordAtY
|
|
||||||
|
|
||||||
>PULLA
|
>PULLA
|
||||||
bit #S.WND.F.RESIZE
|
bit #S.WND.F.RESIZE
|
||||||
|
@ -576,15 +572,10 @@ WND.DrawTitleBar
|
||||||
ldx #BM.ID.MIN
|
ldx #BM.ID.MIN
|
||||||
jsr DRAW.xBM
|
jsr DRAW.xBM
|
||||||
|
|
||||||
.3 lda CB.Cache+S.CB.X1
|
.3 lda #16
|
||||||
clc
|
jsr CB.AddA2X1
|
||||||
adc #16
|
|
||||||
sta CB.Cache+S.CB.X1
|
|
||||||
bcc .31
|
|
||||||
|
|
||||||
inc CB.Cache+S.CB.X1+1
|
ldy #S.OBJ.F
|
||||||
|
|
||||||
.31 ldy #S.OBJ.F
|
|
||||||
lda (ZPWNDPtr),y
|
lda (ZPWNDPtr),y
|
||||||
bit #S.WND.F.MAX
|
bit #S.WND.F.MAX
|
||||||
beq .4
|
beq .4
|
||||||
|
@ -592,15 +583,10 @@ WND.DrawTitleBar
|
||||||
ldx #BM.ID.MAX
|
ldx #BM.ID.MAX
|
||||||
jsr DRAW.xBM
|
jsr DRAW.xBM
|
||||||
|
|
||||||
.4 lda CB.Cache+S.CB.X1
|
.4 lda #16
|
||||||
clc
|
jsr CB.AddA2X1
|
||||||
adc #16
|
|
||||||
sta CB.Cache+S.CB.X1
|
ldy #S.OBJ.F
|
||||||
bcc .41
|
|
||||||
|
|
||||||
inc CB.Cache+S.CB.X1+1
|
|
||||||
|
|
||||||
.41 ldy #S.OBJ.F
|
|
||||||
lda (ZPWNDPtr),y
|
lda (ZPWNDPtr),y
|
||||||
bit #S.WND.F.CLOSE
|
bit #S.WND.F.CLOSE
|
||||||
beq .8
|
beq .8
|
||||||
|
|
|
@ -332,7 +332,7 @@ SkipStrZPtr2 ldy #$ff
|
||||||
.INB usr/src/lib/libgui.s.but
|
.INB usr/src/lib/libgui.s.but
|
||||||
.INB usr/src/lib/libgui.s.cb
|
.INB usr/src/lib/libgui.s.cb
|
||||||
.INB usr/src/lib/libgui.s.clip
|
.INB usr/src/lib/libgui.s.clip
|
||||||
.INB usr/src/lib/libgui.s.cur
|
* .INB usr/src/lib/libgui.s.cur
|
||||||
.INB usr/src/lib/libgui.s.draw
|
.INB usr/src/lib/libgui.s.draw
|
||||||
.INB usr/src/lib/libgui.s.fon
|
.INB usr/src/lib/libgui.s.fon
|
||||||
.INB usr/src/lib/libgui.s.label
|
.INB usr/src/lib/libgui.s.label
|
||||||
|
|
|
@ -151,7 +151,7 @@ GP.MLICONT sec
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
GP.TOOLBOX bit RRAMWRAMBNK1
|
GP.TOOLBOX bit RRAMWRAMBNK1
|
||||||
bit RRAMWRAMBNK1
|
bit RRAMWRAMBNK1
|
||||||
jsr XDOS.TOOLBOX
|
jsr XDOS.TBX
|
||||||
bit RROMBNK2
|
bit RROMBNK2
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
|
|
@ -5,50 +5,40 @@ VolListPtr .EQ $65
|
||||||
*
|
*
|
||||||
SelectedIndex .EQ $67 name counter
|
SelectedIndex .EQ $67 name counter
|
||||||
filecount .EQ $68 # of displayable files in directory
|
filecount .EQ $68 # of displayable files in directory
|
||||||
FilenameLen .EQ $69 length of filename
|
|
||||||
|
|
||||||
bInSubDir .EQ $6B directory level
|
bInSubDir .EQ $6B directory level
|
||||||
FilenamePtr .EQ $6C filename storage pointer (16 bit)
|
FilenamePtr .EQ $6C filename storage pointer (16 bit)
|
||||||
*
|
|
||||||
DirEntLen .EQ $6E directory entry length
|
|
||||||
DirEntPerBlk .EQ $6F directory entries/block
|
|
||||||
FileCntInDir .EQ $70 directory file count (16 bit)
|
|
||||||
*
|
|
||||||
blkfl .EQ $72 block flag / file counter
|
|
||||||
ScrollIndex .EQ $73 index # of top name in display
|
ScrollIndex .EQ $73 index # of top name in display
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
SEL1.PathBuf .EQ $280
|
||||||
|
SEL1.BSPathBuf .EQ $2C0
|
||||||
|
*--------------------------------------
|
||||||
SEL1.FileBuf .EQ $1800 1k
|
SEL1.FileBuf .EQ $1800 1k
|
||||||
SEL1.DirEntry .EQ $1C00 512b
|
SEL1.DirBlk .EQ $1C00 512b
|
||||||
SEL1.filetypes .EQ $1F00
|
SEL1.filetypes .EQ $1F00
|
||||||
SEL1.Filenames .EQ $2000
|
SEL1.Filenames .EQ $2000
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
SEL1.START cld
|
SEL1.START cld
|
||||||
bit RROMBNK2 read ROM
|
bit RROMBNK2 read ROM
|
||||||
|
|
||||||
* Already done before jmp $1000
|
|
||||||
* stz softev
|
|
||||||
* lda #$10 set reset vector to 'dispadr'
|
|
||||||
* sta softev+1
|
|
||||||
* jsr setpwrc create power-up byte
|
|
||||||
|
|
||||||
lda #$A0
|
lda #$A0
|
||||||
jsr $C300 initialize 80 column text card
|
jsr $C300 initialize 80 column text card
|
||||||
|
|
||||||
* set up memory bitmap in global page
|
* set up memory bitmap in global page
|
||||||
|
|
||||||
ldx #0
|
ldx #TBX.MemReset
|
||||||
jsr GP.TOOLBOX reset MEMTABL
|
jsr GP.TOOLBOX
|
||||||
|
|
||||||
lda #$02
|
stz SEL1.BSPathBuf
|
||||||
sta SEL1.SetMarkP init set mark parms pcount.
|
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
ldx DEVCNT
|
ldx DEVCNT
|
||||||
|
|
||||||
.1 lda DEVLST,x
|
.1 lda DEVLST,x
|
||||||
and #$F0
|
and #$F0
|
||||||
cmp DEVNUM
|
cmp DEVNUM
|
||||||
beq SEL1.GetVol
|
beq SEL1.GetVol
|
||||||
|
|
||||||
dex
|
dex
|
||||||
bra .1
|
bra .1
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
@ -57,7 +47,7 @@ SEL1.NextVol ldx VolListPtr get device list pointer.
|
||||||
|
|
||||||
ldx DEVCNT get device count.
|
ldx DEVCNT get device count.
|
||||||
inx
|
inx
|
||||||
|
|
||||||
.1 dex
|
.1 dex
|
||||||
lda DEVLST,x get unit number from list.
|
lda DEVLST,x get unit number from list.
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
@ -69,20 +59,18 @@ SEL1.GetVol stx VolListPtr
|
||||||
bcs SEL1.NextVol error check.
|
bcs SEL1.NextVol error check.
|
||||||
|
|
||||||
stz bInSubDir haven't read root directory yet.
|
stz bInSubDir haven't read root directory yet.
|
||||||
lda pbuf+1 load description byte.
|
lda SEL1.PathBuf+1 load description byte.
|
||||||
and #$0F mask for name length.
|
and #$0F mask for name length.
|
||||||
beq SEL1.NextVol if 0, then try next unit.
|
beq SEL1.NextVol if 0, then try next unit.
|
||||||
|
|
||||||
* clc
|
tax
|
||||||
|
inx add 2 to length.
|
||||||
|
SEL1.OpenDir1 inx name length in x.
|
||||||
|
|
||||||
adc #$02 add 2 to length.
|
SEL1.OpenDir stx SEL1.PathBuf save the name length
|
||||||
tax name length in x.
|
|
||||||
|
|
||||||
SEL1.OpenDir stx pbuf save the name length
|
|
||||||
lda #'/'
|
lda #'/'
|
||||||
sta pbuf+1 slash before and
|
sta SEL1.PathBuf+1 slash before and
|
||||||
sta pbuf,x after name.
|
sta SEL1.PathBuf,x after name.
|
||||||
stz pbuf+1,x now "/VOLNAME/0
|
|
||||||
|
|
||||||
jsr MLI
|
jsr MLI
|
||||||
.DA #MLIOPEN
|
.DA #MLIOPEN
|
||||||
|
@ -94,149 +82,103 @@ SEL1.OpenDir stx pbuf save the name length
|
||||||
|
|
||||||
jsr bell1 no, generate bell tone
|
jsr bell1 no, generate bell tone
|
||||||
jsr SEL1.FullPath.. and stay at same level.
|
jsr SEL1.FullPath.. and stay at same level.
|
||||||
stx pbuf
|
stx SEL1.PathBuf
|
||||||
jmp keyloop
|
jmp SEL1.KeyLoop
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
SEL1.EnumDir stz filecount zero file count.
|
SEL1.EnumDir stz filecount zero file count.
|
||||||
|
|
||||||
lda #1 File Ref Num=1
|
|
||||||
sta SEL1.ReadP+1 store in read
|
|
||||||
sta SEL1.SetMarkP+1 and setmark parm lists.
|
|
||||||
|
|
||||||
|
jsr SEL1.SetFNPtr
|
||||||
|
|
||||||
stz SEL1.ReadP+2
|
stz SEL1.ReadP+2
|
||||||
lda /SEL1.DirEntry
|
lda /SEL1.DirBlk
|
||||||
sta SEL1.ReadP+3
|
sta SEL1.ReadP+3
|
||||||
|
|
||||||
lda #$2B set read parm list for
|
|
||||||
sta SEL1.ReadP+4 directory header length.
|
|
||||||
stz SEL1.ReadP+5
|
|
||||||
|
|
||||||
jsr SEL1.ReadEntry read directory
|
stz SEL1.ReadP+4 512 bytes
|
||||||
bcs SEL1.CloseDir1
|
lda #2
|
||||||
|
sta SEL1.ReadP+5
|
||||||
|
|
||||||
ldx #$03
|
SEL1.EnumBlk jsr MLI
|
||||||
|
.DA #MLIREAD
|
||||||
.1 lda SEL1.DirEntry+$23,x copy directory info
|
.DA SEL1.ReadP
|
||||||
sta DirEntLen,x to zero page.
|
|
||||||
dex
|
|
||||||
bpl .1
|
|
||||||
|
|
||||||
sta SEL1.ReadP+4 put entry length in read parm list.
|
|
||||||
lda #$01 set block file counter to 1.
|
|
||||||
sta blkfl
|
|
||||||
stz SEL1.SetMarkP+3 zero out msb's of file position
|
|
||||||
stz SEL1.SetMarkP+4 in setmark parm list.
|
|
||||||
|
|
||||||
SEL1.EnumDirNext
|
|
||||||
lda FileCntInDir
|
|
||||||
ora FileCntInDir+1
|
|
||||||
beq SEL1.CloseDir
|
|
||||||
|
|
||||||
SEL1.EnumDirNext1
|
|
||||||
|
|
||||||
.1 lda #$01 reset lsb
|
|
||||||
trb SEL1.SetMarkP+3
|
|
||||||
ldy blkfl block file counter
|
|
||||||
lda #$00
|
|
||||||
cpy DirEntPerBlk have we read all entries in this block ?
|
|
||||||
bcc .3 if not, continue.
|
|
||||||
|
|
||||||
tay if so, zero y-reg and
|
|
||||||
sty blkfl reset block counter / flag
|
|
||||||
inc SEL1.SetMarkP+3
|
|
||||||
|
|
||||||
.2 inc SEL1.SetMarkP+3
|
|
||||||
|
|
||||||
.3 dey decrement file block counter
|
|
||||||
clc
|
|
||||||
bmi .4
|
|
||||||
|
|
||||||
adc DirEntLen add entry length to acc.
|
|
||||||
bcc .3 determine if we flopped into 2nd half of
|
|
||||||
bcs .2 block, if so inc mid byte position.
|
|
||||||
|
|
||||||
.4 adc #$04 add 4 and put in
|
|
||||||
sta SEL1.SetMarkP+2 low byte of setmark.
|
|
||||||
jsr MLI call mli
|
|
||||||
.DA #MLISETMARK
|
|
||||||
.DA SEL1.SetMarkP
|
|
||||||
bcs SEL1.CloseDir
|
bcs SEL1.CloseDir
|
||||||
|
|
||||||
jsr SEL1.ReadEntry
|
lda /SEL1.DirBlk
|
||||||
SEL1.CloseDir1 bcs SEL1.CloseDir
|
ldx #TBX.EnumBlk
|
||||||
|
jsr GP.TOOLBOX
|
||||||
|
bcs SEL1.CloseDir
|
||||||
|
|
||||||
|
SEL1.EnumDirNext
|
||||||
|
jsr SEL1.SetFNPtr Y,A = FilenamePtr
|
||||||
|
ldx #TBX.EnumNext
|
||||||
|
jsr GP.TOOLBOX
|
||||||
|
bcs SEL1.EnumBlk
|
||||||
|
|
||||||
inc blkfl increase count of files read.
|
|
||||||
lda SEL1.DirEntry file type/length.
|
|
||||||
and #$F0 mask off high nibble.
|
|
||||||
beq SEL1.EnumDirNext1
|
|
||||||
|
|
||||||
lda FileCntInDir
|
|
||||||
bne .5
|
|
||||||
|
|
||||||
dec FileCntInDir+1
|
|
||||||
|
|
||||||
.5 dec FileCntInDir
|
|
||||||
|
|
||||||
ror SEL1.DirEntry+$1E check access bit.
|
|
||||||
bcc SEL1.EnumDirNext if no read, try next file.
|
|
||||||
|
|
||||||
lda SEL1.DirEntry+$10 get file type.
|
|
||||||
ldx filecount get valid files read.
|
ldx filecount get valid files read.
|
||||||
|
sta SEL1.filetypes,x
|
||||||
|
|
||||||
|
lda (FilenamePtr)
|
||||||
|
eor #SEL1.BS.L
|
||||||
|
bne .8
|
||||||
|
|
||||||
|
tay Y = 0
|
||||||
|
ldx SEL1.PathBuf
|
||||||
|
|
||||||
|
.1 iny
|
||||||
|
lda SEL1.BS-1,y
|
||||||
|
cmp (FilenamePtr),y
|
||||||
|
bne .8
|
||||||
|
|
||||||
inx
|
inx
|
||||||
beq SEL1.CloseDir
|
sta SEL1.BSPathBuf,x
|
||||||
|
|
||||||
stx filecount
|
cpy #SEL1.BS.L
|
||||||
|
bne .1
|
||||||
|
|
||||||
|
stx SEL1.BSPathBuf
|
||||||
|
|
||||||
|
ldx SEL1.PathBuf
|
||||||
|
|
||||||
|
.2 lda SEL1.PathBuf,x
|
||||||
|
sta SEL1.BSPathBuf,x
|
||||||
dex
|
dex
|
||||||
|
bne .2
|
||||||
|
|
||||||
sta SEL1.filetypes,x else store filetype in zero page
|
.8 inc filecount
|
||||||
jsr SEL1.SetFNPtrX and go set up storage area.
|
bne SEL1.EnumDirNext
|
||||||
|
|
||||||
ldy #15
|
|
||||||
|
|
||||||
.6 lda SEL1.DirEntry,y get byte of filename
|
|
||||||
sta (FilenamePtr),y store in directed area
|
|
||||||
dey
|
|
||||||
bpl .6
|
|
||||||
|
|
||||||
and #$0F mask off low nibble (name length)
|
|
||||||
sta (FilenamePtr) restore in name buffer
|
|
||||||
bra SEL1.EnumDirNext
|
|
||||||
|
|
||||||
L5E26 jmp SEL1.NextVol error. try next unit.
|
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
SEL1.CloseDir jsr MLI close directory file
|
SEL1.CloseDir jsr MLI close directory file
|
||||||
.DA #MLICLOSE
|
.DA #MLICLOSE
|
||||||
.DA SEL1.CloseP
|
.DA SEL1.CloseP
|
||||||
bcs L5E26 error.
|
|
||||||
|
|
||||||
jsr settxt use full screen for windows
|
jsr settxt use full screen for windows
|
||||||
jsr home
|
jsr home
|
||||||
|
|
||||||
lda #$17 cursor at bottom of screen.
|
lda #$17 cursor at bottom of screen.
|
||||||
jsr TABV set vertical position.
|
jsr TABV set vertical position.
|
||||||
|
|
||||||
lda #$14 horizontal position.
|
|
||||||
sta ch
|
|
||||||
|
|
||||||
ldy #0 Footer
|
ldy #SEL1.RetIcon-SEL1.Strings
|
||||||
jsr SET1.MsgOutY
|
jsr SEL1.IconOutY
|
||||||
|
|
||||||
|
ldy #SEL1.Footer-SEL1.Strings
|
||||||
|
jsr SEL1.MsgOutY
|
||||||
|
|
||||||
lda #$99
|
lda #$99
|
||||||
jsr cout cursor to upper/left.
|
jsr cout cursor to upper/left.
|
||||||
|
|
||||||
ldx #$00
|
ldx #$00
|
||||||
|
ldy SEL1.PathBuf
|
||||||
|
|
||||||
.1 lda pbuf+1,x
|
.1 lda SEL1.PathBuf+1,x
|
||||||
beq .2
|
|
||||||
|
|
||||||
jsr SEL1.COut
|
jsr SEL1.COut
|
||||||
inx
|
inx
|
||||||
|
dey
|
||||||
bne .1
|
bne .1
|
||||||
|
|
||||||
.2 stz SelectedIndex
|
.2 stz SelectedIndex
|
||||||
stz ScrollIndex init top filename index.
|
stz ScrollIndex init top filename index.
|
||||||
ldx filecount # of valid files.
|
ldx filecount # of valid files.
|
||||||
beq keyloop if no files.
|
beq SEL1.KeyLoop if no files.
|
||||||
|
|
||||||
cpx #21 more than what will fit on screen ?
|
cpx #21 more than what will fit on screen ?
|
||||||
bcc .3 no.
|
bcc .3 no.
|
||||||
|
@ -245,17 +187,15 @@ SEL1.CloseDir jsr MLI close directory file
|
||||||
|
|
||||||
.3 lda #2 set window dimensions
|
.3 lda #2 set window dimensions
|
||||||
sta wndtop
|
sta wndtop
|
||||||
sta wndlft
|
|
||||||
|
|
||||||
lda #22
|
lda #22
|
||||||
sta wndwdth
|
|
||||||
sta wndbot
|
sta wndbot
|
||||||
|
|
||||||
.4 phx
|
.4 phx
|
||||||
|
|
||||||
jsr SEL1.PrintFN
|
jsr SEL1.PrintFN
|
||||||
inc SelectedIndex
|
inc SelectedIndex
|
||||||
|
|
||||||
plx
|
plx
|
||||||
dex
|
dex
|
||||||
bne .4
|
bne .4
|
||||||
|
@ -263,7 +203,7 @@ SEL1.CloseDir jsr MLI close directory file
|
||||||
stz SelectedIndex
|
stz SelectedIndex
|
||||||
beq L5EAA if last file, it needs to be inverse.
|
beq L5EAA if last file, it needs to be inverse.
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
uparrow jsr SEL1.PrintFN print old name in normal.
|
SEL1.Up jsr SEL1.PrintFN print old name in normal.
|
||||||
ldx SelectedIndex
|
ldx SelectedIndex
|
||||||
beq L5EAA if already at the top name
|
beq L5EAA if already at the top name
|
||||||
|
|
||||||
|
@ -274,9 +214,9 @@ uparrow jsr SEL1.PrintFN print old name in normal.
|
||||||
|
|
||||||
dec ScrollIndex fix offset index
|
dec ScrollIndex fix offset index
|
||||||
lda #$16 else sroll windows down a line.
|
lda #$16 else sroll windows down a line.
|
||||||
bne L5EA7 branch always.
|
bne SEL1.Scroll branch always.
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
dnarrow jsr SEL1.PrintFN print old name in normal.
|
SEL1.Down jsr SEL1.PrintFN print old name in normal.
|
||||||
ldx SelectedIndex
|
ldx SelectedIndex
|
||||||
inx add one.
|
inx add one.
|
||||||
cpx filecount
|
cpx filecount
|
||||||
|
@ -290,55 +230,62 @@ dnarrow jsr SEL1.PrintFN print old name in normal.
|
||||||
inc ScrollIndex update offset index
|
inc ScrollIndex update offset index
|
||||||
lda #$17 else scroll up a line.
|
lda #$17 else scroll up a line.
|
||||||
|
|
||||||
L5EA7 jsr cout
|
SEL1.Scroll jsr cout
|
||||||
|
|
||||||
L5EAA jsr setinv set inverse text mode.
|
L5EAA jsr SEL1.PrintFNInv output last filename.
|
||||||
jsr SEL1.PrintFN output last filename.
|
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
keyloop lda kbd get keyboard input.
|
SEL1.KeyLoop lda kbd get keyboard input.
|
||||||
bpl keyloop loop until key pressed.
|
bpl SEL1.KeyLoop loop until key pressed.
|
||||||
|
|
||||||
sta KBDSTROBE clear strobe.
|
sta KBDSTROBE clear strobe.
|
||||||
jsr setnorm set normal text mode.
|
|
||||||
ldx filecount are any files displayed ?
|
ldx filecount are any files displayed ?
|
||||||
beq L5ECB no, don't accept arrow keys or return.
|
beq .1 no, don't accept arrow keys or return.
|
||||||
|
|
||||||
cmp #$8D return ?
|
cmp #$8D return ?
|
||||||
beq L5EF4 then run selected file.
|
beq SEL1.CR then run selected file.
|
||||||
|
|
||||||
cmp #$8A down ?
|
cmp #$8A down ?
|
||||||
beq dnarrow move down a name.
|
beq SEL1.Down
|
||||||
|
|
||||||
cmp #$8B up ?
|
cmp #$8B up ?
|
||||||
beq uparrow move up a name.
|
beq SEL1.Up
|
||||||
|
|
||||||
L5ECB cmp #$89 tab ?
|
.1 cmp #$89 tab ?
|
||||||
beq L5EED new volume.
|
beq L5EED new volume.
|
||||||
|
|
||||||
cmp #$9B esc ?
|
cmp #$9B esc ?
|
||||||
bne keyloop no, try again else pop up a directory.
|
bne SEL1.KeyLoop no, try again else pop up a directory.
|
||||||
|
|
||||||
jsr SEL1.FullPath.. CD ..
|
jsr SEL1.FullPath.. CD ..
|
||||||
jmp SEL1.OpenDir
|
jmp SEL1.OpenDir
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
L5EED jmp SEL1.NextVol set up new unit number.
|
L5EED jmp SEL1.NextVol set up new unit number.
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
L5EF4 ldy SelectedIndex
|
SEL1.CR ldy SelectedIndex
|
||||||
lda SEL1.filetypes,y get file type.
|
lda SEL1.filetypes,y get file type.
|
||||||
|
|
||||||
|
jsr SEL1.CheckType
|
||||||
|
bmi SEL1.KeyLoop
|
||||||
|
|
||||||
cmp #S.FI.T.DIR
|
cmp #S.FI.T.DIR
|
||||||
bne .1 branch if directory.
|
bne .1
|
||||||
|
|
||||||
jsr SEL1.SetFullPath
|
jsr SEL1.SetFullPath
|
||||||
bcs L5EED
|
bcs L5EED
|
||||||
|
|
||||||
inx
|
|
||||||
|
|
||||||
jmp SEL1.OpenDir get new directory info.
|
jmp SEL1.OpenDir1
|
||||||
|
|
||||||
.1 cmp #S.FI.T.SYS
|
.1 cmp #S.FI.T.SYS
|
||||||
bne keyloop
|
beq .3
|
||||||
|
|
||||||
jsr SEL1.SetFullPath
|
lda SEL1.BSPathBuf
|
||||||
|
beq SEL1.KeyLoop
|
||||||
|
|
||||||
|
lda #SEL1.BSPathBuf
|
||||||
|
sta SEL1.OpenP+1 open & read BASIC.SYSTEM
|
||||||
|
|
||||||
|
.3 jsr SEL1.SetFullPath
|
||||||
bcs L5EED
|
bcs L5EED
|
||||||
|
|
||||||
jsr MLI open file
|
jsr MLI open file
|
||||||
|
@ -346,15 +293,15 @@ L5EF4 ldy SelectedIndex
|
||||||
.DA SEL1.OpenP
|
.DA SEL1.OpenP
|
||||||
bcs L5EED
|
bcs L5EED
|
||||||
|
|
||||||
lda SEL1.OpenP+5 move reference number
|
|
||||||
sta SEL1.ReadP+1 for read.
|
|
||||||
|
|
||||||
lda #$20
|
lda #$20
|
||||||
sta SEL1.ReadP+3 read at $2000
|
sta SEL1.ReadP+3 read at $2000
|
||||||
|
|
||||||
dec SEL1.ReadP+5 was $002B, now $FF2B
|
lda #$9f
|
||||||
|
sta SEL1.ReadP+5 max $9F00
|
||||||
|
|
||||||
jsr SEL1.Read read selected file.
|
jsr MLI
|
||||||
|
.DA #MLIREAD
|
||||||
|
.DA SEL1.ReadP
|
||||||
php save possible error.
|
php save possible error.
|
||||||
jsr MLI close file. ignore any error from close
|
jsr MLI close file. ignore any error from close
|
||||||
.DA #MLICLOSE
|
.DA #MLICLOSE
|
||||||
|
@ -362,23 +309,29 @@ L5EF4 ldy SelectedIndex
|
||||||
plp restore status from read.
|
plp restore status from read.
|
||||||
bcs L5EED if any errors.
|
bcs L5EED if any errors.
|
||||||
|
|
||||||
jsr settxt reset to full window.
|
bit SEL1.OpenP+1
|
||||||
|
bvc .8
|
||||||
|
|
||||||
|
ldx SEL1.PathBuf
|
||||||
|
|
||||||
|
.7 lda SEL1.PathBuf,x
|
||||||
|
sta $2006,x
|
||||||
|
dex
|
||||||
|
bpl .7
|
||||||
|
|
||||||
|
.8 jsr settxt reset to full window.
|
||||||
jsr home makes for no flash.
|
jsr home makes for no flash.
|
||||||
lda #$95 ctrl-u
|
lda #$95 ctrl-u
|
||||||
jsr cout turn off 80 columns.
|
jsr cout turn off 80 columns.
|
||||||
|
|
||||||
jmp $2000 execute selected system file.
|
jmp $2000 execute selected system file.
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
SET1.MsgOutY lda SEL1.Footer,y
|
SEL1.PrintFN lda #$0E
|
||||||
beq .8
|
.HS 2C BIT ABS
|
||||||
|
SEL1.PrintFNInv lda #$0F
|
||||||
|
pha
|
||||||
|
|
||||||
jsr cout
|
ldx SelectedIndex
|
||||||
iny
|
|
||||||
bne SET1.MsgOutY
|
|
||||||
|
|
||||||
.8 rts
|
|
||||||
*--------------------------------------
|
|
||||||
SEL1.PrintFN ldx SelectedIndex
|
|
||||||
txa
|
txa
|
||||||
sec
|
sec
|
||||||
sbc ScrollIndex calculate line # to display name
|
sbc ScrollIndex calculate line # to display name
|
||||||
|
@ -386,49 +339,43 @@ SEL1.PrintFN ldx SelectedIndex
|
||||||
inc
|
inc
|
||||||
jsr TABV set vertical position.
|
jsr TABV set vertical position.
|
||||||
|
|
||||||
lda SEL1.filetypes,x get filetype (x is unchanged by tabv).
|
lda #$01
|
||||||
cmp #S.FI.T.DIR
|
|
||||||
bne .1 branch if not a DIR
|
|
||||||
|
|
||||||
stz ch80col adjust cursor position.
|
|
||||||
lda invflg Save current inverse setting
|
|
||||||
pha
|
|
||||||
ldy #SEL1.DirIcon-SEL1.Footer
|
|
||||||
jsr SET1.MsgOutY display the folder.
|
|
||||||
pla restore inverse setting.
|
|
||||||
sta invflg
|
|
||||||
|
|
||||||
.1 lda #$03
|
|
||||||
sta ch80col
|
sta ch80col
|
||||||
|
|
||||||
|
lda SEL1.filetypes,x get filetype (x is unchanged by tabv).
|
||||||
|
jsr SEL1.CheckType
|
||||||
|
bmi .1
|
||||||
|
|
||||||
|
lda SEL1.ValidIcons,y
|
||||||
|
tay
|
||||||
|
jsr SEL1.IconOutY
|
||||||
|
|
||||||
|
.1 jsr SEL1.SetFNPtrX calc name location.
|
||||||
|
|
||||||
|
lda #$05
|
||||||
|
sta ch80col
|
||||||
|
|
||||||
|
pla normal / inverse
|
||||||
|
jsr cout
|
||||||
|
|
||||||
jsr SEL1.SPOut output a space.
|
jsr SEL1.SPOut output a space.
|
||||||
jsr SEL1.SetFNPtrX calc name location.
|
|
||||||
|
|
||||||
ldy #0
|
ldy #0
|
||||||
|
|
||||||
.2 iny
|
.2 iny
|
||||||
lda (FilenamePtr),y get name character.
|
lda (FilenamePtr),y get name character.
|
||||||
jsr SEL1.COut put on screen.
|
jsr SEL1.COut put on screen.
|
||||||
cpy FilenameLen end of name ?
|
tya
|
||||||
|
cmp (FilenamePtr) end of name ?
|
||||||
bcc .2 no.
|
bcc .2 no.
|
||||||
|
|
||||||
SEL1.SPOut lda #' ' SPACE
|
*.3 jsr SEL1.SPOut
|
||||||
|
* iny
|
||||||
SEL1.COut ora #$80 set high bit.
|
* cpy #16
|
||||||
jmp cout output to screen.
|
* bne .3
|
||||||
|
|
||||||
SEL1.ReadEntry jsr SEL1.Read
|
jsr SEL1.SPOut
|
||||||
bcs SEL1.Read.RTS
|
jmp setnorm set normal text mode.
|
||||||
|
|
||||||
ldy #SEL1.DirEntry
|
|
||||||
lda /SEL1.DirEntry
|
|
||||||
ldx #2
|
|
||||||
jmp GP.TOOLBOX
|
|
||||||
*--------------------------------------
|
|
||||||
SEL1.Read jsr MLI mli read call
|
|
||||||
.DA #MLIREAD
|
|
||||||
.DA SEL1.ReadP
|
|
||||||
SEL1.Read.RTS rts
|
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
SEL1.SetFullPath
|
SEL1.SetFullPath
|
||||||
jsr MLI
|
jsr MLI
|
||||||
|
@ -437,101 +384,159 @@ SEL1.SetFullPath
|
||||||
bcs .9
|
bcs .9
|
||||||
|
|
||||||
ldx SelectedIndex
|
ldx SelectedIndex
|
||||||
jsr SEL1.SetFNPtrX set up name storage area (on return y=0)
|
jsr SEL1.SetFNPtrX
|
||||||
|
|
||||||
ldx pbuf get prefix length.
|
ldx SEL1.PathBuf get prefix length.
|
||||||
ldy #0
|
ldy #0
|
||||||
|
|
||||||
.1 iny start at y = 1.
|
.1 iny start at y = 1.
|
||||||
lda (FilenamePtr),y get character of name.
|
lda (FilenamePtr),y get character of name.
|
||||||
inx
|
inx
|
||||||
sta pbuf,x store in prefix buffer.
|
sta SEL1.PathBuf,x store in prefix buffer.
|
||||||
cpy FilenameLen check length of name.
|
tya
|
||||||
bcc .1 loop until all transferred.
|
eor (FilenamePtr) check length of name.
|
||||||
|
bne .1 loop until all transferred.
|
||||||
|
|
||||||
stx pbuf put prefix length into buffer.
|
stx SEL1.PathBuf put prefix length into buffer.
|
||||||
|
|
||||||
inc bInSubDir
|
inc bInSubDir
|
||||||
|
|
||||||
clc
|
* clc
|
||||||
|
|
||||||
.9 rts
|
.9 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
SEL1.FullPath.. ldx pbuf
|
SEL1.FullPath.. ldx SEL1.PathBuf
|
||||||
|
|
||||||
.1 dex
|
.1 dex
|
||||||
lda pbuf,x
|
lda SEL1.PathBuf,x
|
||||||
cmp #'/'
|
cmp #'/'
|
||||||
bne .1
|
bne .1
|
||||||
|
|
||||||
cpx #$01
|
cpx #$01
|
||||||
bne .9
|
bne .9
|
||||||
|
|
||||||
ldx pbuf
|
ldx SEL1.PathBuf
|
||||||
|
|
||||||
.9 dec bInSubDir
|
.9 dec bInSubDir
|
||||||
|
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
SEL1.SetFNPtr ldx filecount
|
||||||
|
|
||||||
SEL1.SetFNPtrX lda /SEL1.Filenames/16
|
SEL1.SetFNPtrX lda /SEL1.Filenames/16
|
||||||
sta FilenamePtr+1
|
sta FilenamePtr+1
|
||||||
txa
|
txa
|
||||||
|
|
||||||
ldx #4
|
ldx #4
|
||||||
|
|
||||||
.1 asl
|
.1 asl
|
||||||
rol FilenamePtr+1
|
rol FilenamePtr+1
|
||||||
dex
|
dex
|
||||||
bne .1
|
bne .1
|
||||||
|
|
||||||
sta FilenamePtr
|
sta FilenamePtr
|
||||||
|
tay
|
||||||
|
lda FilenamePtr+1
|
||||||
|
|
||||||
lda (FilenamePtr)
|
|
||||||
sta FilenameLen
|
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
SEL1.CheckType ldy #SEL1.ValidTypes.L-1
|
||||||
|
|
||||||
|
.1 cmp SEL1.ValidTypes,y
|
||||||
|
beq .8
|
||||||
|
|
||||||
|
dey
|
||||||
|
bpl .1
|
||||||
|
|
||||||
|
.8 rts
|
||||||
|
*--------------------------------------
|
||||||
|
SEL1.IconOutY phx
|
||||||
|
|
||||||
|
ldx #0
|
||||||
|
|
||||||
|
.1 lda SEL1.MouseText,x
|
||||||
|
|
||||||
|
jsr cout
|
||||||
|
inx
|
||||||
|
cpx #2
|
||||||
|
bne .2
|
||||||
|
|
||||||
|
jsr SEL1.MsgOutY
|
||||||
|
|
||||||
|
.2 cpx #4
|
||||||
|
bcc .1
|
||||||
|
|
||||||
|
plx
|
||||||
|
rts
|
||||||
|
*--------------------------------------
|
||||||
|
SEL1.MsgOutY lda SEL1.Strings,y
|
||||||
|
php
|
||||||
|
jsr SEL1.COut
|
||||||
|
iny
|
||||||
|
plp
|
||||||
|
bpl SEL1.MsgOutY
|
||||||
|
|
||||||
|
.8 rts
|
||||||
|
*--------------------------------------
|
||||||
|
SEL1.SPOut lda #' ' SPACE
|
||||||
|
|
||||||
|
SEL1.COut ora #$80 set high bit.
|
||||||
|
jmp cout output to screen.
|
||||||
|
*--------------------------------------
|
||||||
* data area
|
* data area
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
SEL1.Footer .AS -"RETURN:Select,TAB:Chg Vol,ESC:Back"
|
SEL1.BS .AS "BASIC.SYSTEM"
|
||||||
.HS 00
|
SEL1.BS.L .EQ *-SEL1.BS
|
||||||
|
*--------------------------------------
|
||||||
SEL1.DirIcon .HS 0F inverse control code
|
SEL1.ValidTypes .DA #S.FI.T.DIR
|
||||||
.HS 1B enable mousetext
|
.DA #S.FI.T.SYS
|
||||||
.AS -"XY" folder characters
|
.DA #S.FI.T.BIN
|
||||||
.HS 18 disable mousetext
|
.DA #S.FI.T.BAS
|
||||||
.HS 0E normal control code
|
SEL1.ValidTypes.L .EQ *-SEL1.ValidTypes
|
||||||
.HS 00
|
*--------------------------------------
|
||||||
|
SEL1.ValidIcons .DA #SEL1.DirIcon-SEL1.Strings
|
||||||
|
.DA #SEL1.SysIcon-SEL1.Strings
|
||||||
|
.DA #SEL1.BinIcon-SEL1.Strings
|
||||||
|
.DA #SEL1.BasIcon-SEL1.Strings
|
||||||
|
*--------------------------------------
|
||||||
|
SEL1.MouseText .HS 0F1B
|
||||||
|
.HS 180E
|
||||||
|
*--------------------------------------
|
||||||
|
SEL1.Strings
|
||||||
|
*--------------------------------------
|
||||||
|
SEL1.Footer .AT ":Select,TAB:Chg Vol,ESC:Back"
|
||||||
|
SEL1.DirIcon .AT "XY" "XYI"
|
||||||
|
SEL1.SysIcon .AT "Z\^_"
|
||||||
|
SEL1.BinIcon .AT "Z\\_"
|
||||||
|
SEL1.BasIcon .AT "ZVW_"
|
||||||
|
SEL1.RetIcon .AT "M"
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
SEL1.OpenP .DA #3 Param Count
|
SEL1.OpenP .DA #3 Param Count
|
||||||
.DA pbuf pathname
|
.DA SEL1.PathBuf pathname
|
||||||
.DA SEL1.FileBuf file buffer
|
.DA SEL1.FileBuf file buffer
|
||||||
.HS 01 reference number
|
.HS 01 reference number
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
SEL1.CloseP .DA #1 Param Count
|
SEL1.CloseP .DA #1 Param Count
|
||||||
.HS 01 reference number.
|
.HS 01 reference number
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
SEL1.OnLineP .DA #2 Param Count
|
SEL1.OnLineP .DA #2 Param Count
|
||||||
.HS 60 unit number, default = s6, d1
|
.HS 60 unit number, default = s6, d1
|
||||||
.DA pbuf+1 data buffer
|
.DA SEL1.PathBuf+1 data buffer
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
SEL1.SetPrefixP .DA #1 Param Count
|
SEL1.SetPrefixP .DA #1 Param Count
|
||||||
.DA pbuf pathname
|
.DA SEL1.PathBuf pathname
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
SEL1.ReadP .DA #4 Param Count
|
SEL1.ReadP .DA #4 Param Count
|
||||||
|
.HS 01 reference number
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.LIST ON
|
.LIST ON
|
||||||
SEL1.LEN .EQ *-SEL1.START
|
SEL1.LEN .EQ *-SEL1.START
|
||||||
.LIST OFF
|
.LIST OFF
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.DUMMY
|
.DUMMY
|
||||||
.BS 1 RefNum
|
|
||||||
.BS 2 MemPtr
|
.BS 2 MemPtr
|
||||||
.BS 2 requested length
|
.BS 2 requested length
|
||||||
.BS 2 actual length
|
.BS 2 read length
|
||||||
|
|
||||||
SEL1.SetMarkP .BS 1 Param Count
|
|
||||||
.BS 1 RefNum
|
|
||||||
.BS 3 FPos
|
|
||||||
.ED
|
.ED
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
MAN
|
MAN
|
||||||
|
|
|
@ -2,11 +2,11 @@ NEW
|
||||||
AUTO 3,1
|
AUTO 3,1
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
XDOS.DeallocAX stx bmcnt high address of block.
|
XDOS.DeallocAX stx bmcnt high address of block.
|
||||||
pha save low address.
|
* pha save low address.
|
||||||
ldx vcbptr check that bitmap block address is
|
ldx vcbptr check that bitmap block address is
|
||||||
lda VCBs+VCB.TBLK+1,x valid given the total # of blocks
|
ldy VCBs+VCB.TBLK+1,x valid given the total # of blocks
|
||||||
cmp bmcnt on the volume.
|
cpy bmcnt on the volume.
|
||||||
pla
|
* pla
|
||||||
bcc L3C8C branch if invalid
|
bcc L3C8C branch if invalid
|
||||||
|
|
||||||
tax
|
tax
|
||||||
|
@ -15,12 +15,19 @@ XDOS.DeallocAX stx bmcnt high address of block.
|
||||||
lda whichbit,y (shifting takes 7 bytes, but is slower)
|
lda whichbit,y (shifting takes 7 bytes, but is slower)
|
||||||
sta nofree save bit pattern.
|
sta nofree save bit pattern.
|
||||||
txa low block address.
|
txa low block address.
|
||||||
lsr bmcnt
|
|
||||||
ror get pointer to byte in block that
|
ldx #3
|
||||||
lsr bmcnt represents the block address.
|
|
||||||
ror
|
.1 lsr bmcnt
|
||||||
lsr bmcnt
|
|
||||||
ror
|
ror
|
||||||
|
dex
|
||||||
|
bne .1
|
||||||
|
|
||||||
|
* lsr bmcnt
|
||||||
|
* ror
|
||||||
|
* lsr bmcnt
|
||||||
|
* ror
|
||||||
|
|
||||||
sta bmptr save pointer.
|
sta bmptr save pointer.
|
||||||
lsr bmcnt transfer bit which is page of bitmap
|
lsr bmcnt transfer bit which is page of bitmap
|
||||||
rol half
|
rol half
|
||||||
|
@ -100,12 +107,14 @@ L3CB9 sty bmptr save index pointer to valid bit group.
|
||||||
lda basval prep for block address calculation
|
lda basval prep for block address calculation
|
||||||
sta scrtch+1
|
sta scrtch+1
|
||||||
tya address of bit pattern.
|
tya address of bit pattern.
|
||||||
asl multiply this and basval by 8
|
|
||||||
rol scrtch+1
|
ldx #3
|
||||||
asl
|
|
||||||
rol scrtch+1
|
.1 asl multiply this and basval by 8
|
||||||
asl
|
|
||||||
rol scrtch+1
|
rol scrtch+1
|
||||||
|
dex
|
||||||
|
bne .1
|
||||||
|
|
||||||
tax low address within 7 of actual address
|
tax low address within 7 of actual address
|
||||||
sec
|
sec
|
||||||
lda half
|
lda half
|
||||||
|
@ -296,49 +305,9 @@ XDOS.UnpackGBuf jsr XDOS.ZPT.InitGBuf
|
||||||
|
|
||||||
ldx h_maxent
|
ldx h_maxent
|
||||||
|
|
||||||
XDOS.UnpackZPT .EQ *
|
.1 jsr XDOS.ZPT.Unpack
|
||||||
|
|
||||||
.1 lda (zpt)
|
|
||||||
and #$0F
|
|
||||||
beq .6
|
|
||||||
|
|
||||||
ldy #$1D MIN_VERSION
|
|
||||||
lda (zpt),y
|
|
||||||
bpl .6 no lowercase information
|
|
||||||
|
|
||||||
lda (zpt)
|
|
||||||
and #$0F
|
|
||||||
tay
|
|
||||||
|
|
||||||
.2 cpy #8 CS if MIN_VERSION to use
|
|
||||||
phy
|
|
||||||
|
|
||||||
bcs .3
|
|
||||||
|
|
||||||
ldy #$1D MIN_VERSION
|
|
||||||
lda (zpt),y
|
|
||||||
|
|
||||||
ply
|
|
||||||
and whichbit,y
|
|
||||||
beq .5
|
|
||||||
|
|
||||||
bra .4
|
|
||||||
|
|
||||||
.3 ldy #$1C VERSION
|
|
||||||
lda (zpt),y
|
|
||||||
|
|
||||||
ply
|
|
||||||
and whichbit-8,y
|
|
||||||
beq .5
|
|
||||||
|
|
||||||
.4 lda (zpt),y
|
|
||||||
eor #$20 to lowercase
|
|
||||||
sta (zpt),y
|
|
||||||
|
|
||||||
.5 dey
|
|
||||||
bne .2
|
|
||||||
|
|
||||||
.6 dex
|
dex
|
||||||
beq .8
|
beq .8
|
||||||
|
|
||||||
jsr XDOS.ZPT.Next
|
jsr XDOS.ZPT.Next
|
||||||
|
@ -403,27 +372,7 @@ XDOS.PackGBuf jsr XDOS.ZPT.InitGBuf
|
||||||
bne .1
|
bne .1
|
||||||
|
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
|
||||||
XDOS.ZPT.InitGBuf
|
|
||||||
lda /gbuf
|
|
||||||
|
|
||||||
XDOS.ZPT.InitA sta zpt+1
|
|
||||||
lda #4
|
|
||||||
sta zpt
|
|
||||||
|
|
||||||
rts
|
|
||||||
*--------------------------------------
|
|
||||||
XDOS.ZPT.Next lda h_entln
|
|
||||||
|
|
||||||
XDOS.ZPT.NextA clc
|
|
||||||
adc zpt
|
|
||||||
sta zpt
|
|
||||||
bcc .8
|
|
||||||
|
|
||||||
inc zpt+1
|
|
||||||
clc
|
|
||||||
|
|
||||||
.8 rts
|
|
||||||
.FIN
|
.FIN
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
XDOS.GetMark ldx fcbptr index to open fcb.
|
XDOS.GetMark ldx fcbptr index to open fcb.
|
||||||
|
@ -720,8 +669,10 @@ dirpos1 lda (datptr),y get link address of previous or next
|
||||||
bcs L3FD8 was the low part null as well ?
|
bcs L3FD8 was the low part null as well ?
|
||||||
|
|
||||||
lda #MLI.E.EOF something is wrong with directory file!
|
lda #MLI.E.EOF something is wrong with directory file!
|
||||||
L3FD6 sec error.
|
|
||||||
rts
|
sec error.
|
||||||
|
|
||||||
|
L3FD6 rts
|
||||||
|
|
||||||
L3FD8 sta bloknml+1
|
L3FD8 sta bloknml+1
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
|
|
@ -179,7 +179,7 @@ L4310 lda (sos),y move data to user's buffer
|
||||||
bcs tstnewl test for newline 1st !
|
bcs tstnewl test for newline 1st !
|
||||||
|
|
||||||
L4316 txa note: x must be unchanged from tstnewl !
|
L4316 txa note: x must be unchanged from tstnewl !
|
||||||
beq L4332 go see if read request is satified...
|
beq L4332 go see if read request is satisfied...
|
||||||
|
|
||||||
L4319 dex dec # of bytes left to move.
|
L4319 dex dec # of bytes left to move.
|
||||||
iny page crossed ?
|
iny page crossed ?
|
||||||
|
@ -191,16 +191,20 @@ L4319 dex dec # of bytes left to move.
|
||||||
bne L4329
|
bne L4329
|
||||||
|
|
||||||
inc tposhi
|
inc tposhi
|
||||||
|
|
||||||
L4329 inc sos+1 and sos buffer high address.
|
L4329 inc sos+1 and sos buffer high address.
|
||||||
eor datptr+1 (carry is undisturbed)
|
eor datptr+1 (carry is undisturbed)
|
||||||
beq L4310 branch if more to read in buffer.
|
beq L4310 branch if more to read in buffer.
|
||||||
|
|
||||||
clv indicate not finished.
|
clv indicate not finished.
|
||||||
bvc L4360 always.
|
bvc L4360 always.
|
||||||
|
|
||||||
L4332 lda rwreqh
|
L4332 lda rwreqh
|
||||||
beq L4350 branch if request is satisfied.
|
beq L4350 branch if request is satisfied.
|
||||||
|
|
||||||
iny done with this block of data ?
|
iny done with this block of data ?
|
||||||
bne L4340 no, adjust high byte of request.
|
bne L4340 no, adjust high byte of request.
|
||||||
|
|
||||||
lda sos+1 maybe, check for end of block buffer.
|
lda sos+1 maybe, check for end of block buffer.
|
||||||
eor datptr+1 (don't disturb carry).
|
eor datptr+1 (don't disturb carry).
|
||||||
bne L4343 if hi count can be dealt with next time
|
bne L4343 if hi count can be dealt with next time
|
||||||
|
@ -390,7 +394,7 @@ XDOS.Write jsr mvcbytes first determine if requested write is legal.
|
||||||
and #$02 is write enabled ?
|
and #$02 is write enabled ?
|
||||||
bne L4462 yes, continue...
|
bne L4462 yes, continue...
|
||||||
|
|
||||||
L445E lda #$4E illegal access error.
|
L445E lda #MLI.E.LOCKED illegal access error.
|
||||||
bne L44A2
|
bne L44A2
|
||||||
|
|
||||||
L4462 jsr tstwprot otherwise, make sure device is not
|
L4462 jsr tstwprot otherwise, make sure device is not
|
||||||
|
|
|
@ -844,6 +844,160 @@ L4ABE lda pathbuf,y move local name to dir entry workspace.
|
||||||
|
|
||||||
L4AF0 jmp drevise1 end by updating all path directories.
|
L4AF0 jmp drevise1 end by updating all path directories.
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
XDOS.Destroy jsr XDOS.FindFile look for file to be destroyed.
|
||||||
|
bcs L4B66 if error.
|
||||||
|
|
||||||
|
jsr tstopen is it open ?
|
||||||
|
lda totent
|
||||||
|
bne L4B64 error if open.
|
||||||
|
|
||||||
|
stz reql force proper free count in volume.
|
||||||
|
stz reqh (no disk access occurs if already
|
||||||
|
jsr tstfrblk proper)
|
||||||
|
bcc L4B39 no errors.
|
||||||
|
|
||||||
|
cmp #MLI.E.VOLFULL was error a full disk ?
|
||||||
|
bne L4B66 no, report error.
|
||||||
|
|
||||||
|
L4B39 lda d_attr make sure ok to destroy file.
|
||||||
|
* and #$80
|
||||||
|
* bne L4B45
|
||||||
|
bmi L4B45
|
||||||
|
|
||||||
|
lda #MLI.E.LOCKED access error
|
||||||
|
jsr GP.P8errv
|
||||||
|
|
||||||
|
L4B45 lda DEVNUM last device used.
|
||||||
|
jsr twrprot1 test for write protected hardware
|
||||||
|
bcs L4B66 before going thru deallocation.
|
||||||
|
|
||||||
|
lda d_frst 'detree' needs first block address
|
||||||
|
sta firstbl
|
||||||
|
lda d_frst+1
|
||||||
|
sta firstbh
|
||||||
|
lda d_stor find out which storage type.
|
||||||
|
and #$F0 strip off name length.
|
||||||
|
cmp #$40 is it a seed, sapling or tree ?
|
||||||
|
bcc L4B68 branch if it is.
|
||||||
|
bra L4BCF otherwise, test for directory destroy.
|
||||||
|
|
||||||
|
L4B64 lda #MLI.E.OPEN file busy error.
|
||||||
|
L4B66 sec can't be destroyed
|
||||||
|
rts
|
||||||
|
|
||||||
|
L4B68 sta stortyp destroy a tree file. save storage type.
|
||||||
|
|
||||||
|
ldx #$05
|
||||||
|
|
||||||
|
* lda #$00 set 'detree' input variables, must be
|
||||||
|
|
||||||
|
L4B6F stz stortyp,x in order: deblock, dtree, dsap, dseed.
|
||||||
|
dex
|
||||||
|
bne L4B6F loop until all zero'd.
|
||||||
|
|
||||||
|
lda #$02 this avoids an extra file i/o and pre-
|
||||||
|
sta dseed+1 vents destruction of any deleted data.
|
||||||
|
inc delflag don't allow detree to zero index blocks.
|
||||||
|
jsr detree make trees and saplings into seeds.
|
||||||
|
dec delflag reset flag.
|
||||||
|
bcs L4B93 (de-evolution)
|
||||||
|
|
||||||
|
L4B85 ldx firstbh
|
||||||
|
lda firstbl now deallocate seed.
|
||||||
|
jsr XDOS.DeallocAX
|
||||||
|
bcs L4B93
|
||||||
|
|
||||||
|
jsr upbmap
|
||||||
|
|
||||||
|
L4B93 pha save possible error code.
|
||||||
|
lda #$00 update directory to free entry space.
|
||||||
|
sta d_stor
|
||||||
|
cmp h_fcnt file entry wrap ?
|
||||||
|
bne L4BA1 branch if no carry adjustment.
|
||||||
|
|
||||||
|
dec h_fcnt+1 take carry from hi byte of file entries.
|
||||||
|
|
||||||
|
L4BA1 dec h_fcnt mark header with one less file.
|
||||||
|
jsr dvcbrev go update block count in vcb (ignore
|
||||||
|
jsr drevise error, if any) and update dir last.
|
||||||
|
tax save possible new error code,
|
||||||
|
pla restore possible old error code.
|
||||||
|
bcc L4BAF branch if last call succeeded.
|
||||||
|
txa last call failed, use it's error code.
|
||||||
|
|
||||||
|
L4BAF cmp #$01 adjust carry accordingly
|
||||||
|
rts
|
||||||
|
|
||||||
|
dvcbrev ldx vcbptr update block free count in vcb. point to vcb of correct device.
|
||||||
|
lda deblock get # of blocks recently freed.
|
||||||
|
adc VCBs+VCB.FBLK,x
|
||||||
|
sta VCBs+VCB.FBLK,x update current free block count.
|
||||||
|
lda deblock+1
|
||||||
|
adc VCBs+VCB.FBLK+1,x
|
||||||
|
sta VCBs+VCB.FBLK+1,x
|
||||||
|
|
||||||
|
stz VCBs+VCB.BMAPIDX,x force re-scan from 1st bitmap
|
||||||
|
|
||||||
|
* lda #0 ?????
|
||||||
|
|
||||||
|
rts
|
||||||
|
|
||||||
|
L4BCD bcc L4B85 branch widened (always taken)
|
||||||
|
|
||||||
|
L4BCF cmp #$D0 is this a directory file ?
|
||||||
|
bne L4C1B no, file incompatible.
|
||||||
|
|
||||||
|
jsr fndbmap make sure a buffer available for bitmap
|
||||||
|
bcs L4C1A if error.
|
||||||
|
|
||||||
|
jsr XDOS.ReadGBuf_d_frst read 1st block of directory into gbuf
|
||||||
|
bcs L4C1A
|
||||||
|
|
||||||
|
lda gbuf+37 do any files exist in this directory ?
|
||||||
|
ora gbuf+38
|
||||||
|
bne L4C1Abis if so, access error.
|
||||||
|
|
||||||
|
L4BF6 sta gbuf+4 make it an invalid subdirectory
|
||||||
|
.DO LOWERCASE=1
|
||||||
|
jsr XDOS.WriteGBufDir
|
||||||
|
.ELSE
|
||||||
|
jsr XDOS.WriteGBuf
|
||||||
|
.FIN
|
||||||
|
bcs L4C1A
|
||||||
|
|
||||||
|
L4BFE lda gbuf+2 get forward link.
|
||||||
|
cmp #$01 test for null block into carry.
|
||||||
|
ldx gbuf+3 get the rest of the block address.
|
||||||
|
bne L4C0A branch if not null.
|
||||||
|
bcc L4BCD was the low part null as well ?
|
||||||
|
|
||||||
|
L4C0A jsr XDOS.DeallocAX free this block.
|
||||||
|
bcs L4C1A
|
||||||
|
|
||||||
|
lda gbuf+2
|
||||||
|
ldx gbuf+3
|
||||||
|
jsr XDOS.ReadGBufAX read next DIR block (no need to unpack)
|
||||||
|
bcc L4BFE loop until all freed
|
||||||
|
|
||||||
|
L4C1A rts
|
||||||
|
|
||||||
|
L4C1Abis lda #MLI.E.LOCKED access error.
|
||||||
|
.HS 2C BIT ABS
|
||||||
|
L4C1B lda #MLI.E.INCFF file incompatible
|
||||||
|
jsr GP.P8errv
|
||||||
|
|
||||||
|
fcbused pha mark fcb as dirty so the directory will be flushed on 'flush'.
|
||||||
|
phy save regs.
|
||||||
|
|
||||||
|
ldy fcbptr
|
||||||
|
|
||||||
|
lda #$80 mark fcb as dirty.
|
||||||
|
sta FCBs+FCB.DIRTY,y save it back
|
||||||
|
|
||||||
|
ply and restore regs.
|
||||||
|
pla
|
||||||
|
rts
|
||||||
|
*--------------------------------------
|
||||||
XDOS.UpdateHdr ldx #$00
|
XDOS.UpdateHdr ldx #$00
|
||||||
|
|
||||||
.1 sta gbuf+4,x
|
.1 sta gbuf+4,x
|
||||||
|
|
|
@ -1,160 +1,6 @@
|
||||||
NEW
|
NEW
|
||||||
AUTO 3,1
|
AUTO 3,1
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
XDOS.Destroy jsr XDOS.FindFile look for file to be destroyed.
|
|
||||||
bcs L4B66 if error.
|
|
||||||
|
|
||||||
jsr tstopen is it open ?
|
|
||||||
lda totent
|
|
||||||
bne L4B64 error if open.
|
|
||||||
|
|
||||||
stz reql force proper free count in volume.
|
|
||||||
stz reqh (no disk access occurs if already
|
|
||||||
jsr tstfrblk proper)
|
|
||||||
bcc L4B39 no errors.
|
|
||||||
|
|
||||||
cmp #MLI.E.VOLFULL was error a full disk ?
|
|
||||||
bne L4B66 no, report error.
|
|
||||||
|
|
||||||
L4B39 lda d_attr make sure ok to destroy file.
|
|
||||||
* and #$80
|
|
||||||
* bne L4B45 branch if ok to destroy.
|
|
||||||
bmi L4B45 branch if ok to destroy.
|
|
||||||
|
|
||||||
lda #MLI.E.LOCKED access error
|
|
||||||
jsr GP.P8errv
|
|
||||||
|
|
||||||
L4B45 lda DEVNUM last device used.
|
|
||||||
jsr twrprot1 test for write protected hardware
|
|
||||||
bcs L4B66 before going thru deallocation.
|
|
||||||
|
|
||||||
lda d_frst 'detree' needs first block address
|
|
||||||
sta firstbl
|
|
||||||
lda d_frst+1
|
|
||||||
sta firstbh
|
|
||||||
lda d_stor find out which storage type.
|
|
||||||
and #$F0 strip off name length.
|
|
||||||
cmp #$40 is it a seed, sapling or tree ?
|
|
||||||
bcc L4B68 branch if it is.
|
|
||||||
bra L4BCF otherwise, test for directory destroy.
|
|
||||||
|
|
||||||
L4B64 lda #MLI.E.OPEN file busy error.
|
|
||||||
L4B66 sec can't be destroyed
|
|
||||||
rts
|
|
||||||
|
|
||||||
L4B68 sta stortyp destroy a tree file. save storage type.
|
|
||||||
|
|
||||||
ldx #$05
|
|
||||||
|
|
||||||
* lda #$00 set 'detree' input variables, must be
|
|
||||||
|
|
||||||
L4B6F stz stortyp,x in order: deblock, dtree, dsap, dseed.
|
|
||||||
dex
|
|
||||||
bne L4B6F loop until all zero'd.
|
|
||||||
|
|
||||||
lda #$02 this avoids an extra file i/o and pre-
|
|
||||||
sta dseed+1 vents destruction of any deleted data.
|
|
||||||
inc delflag don't allow detree to zero index blocks.
|
|
||||||
jsr detree make trees and saplings into seeds.
|
|
||||||
dec delflag reset flag.
|
|
||||||
bcs L4B93 (de-evolution)
|
|
||||||
|
|
||||||
L4B85 ldx firstbh
|
|
||||||
lda firstbl now deallocate seed.
|
|
||||||
jsr XDOS.DeallocAX
|
|
||||||
bcs L4B93
|
|
||||||
|
|
||||||
jsr upbmap
|
|
||||||
|
|
||||||
L4B93 pha save possible error code.
|
|
||||||
lda #$00 update directory to free entry space.
|
|
||||||
sta d_stor
|
|
||||||
cmp h_fcnt file entry wrap ?
|
|
||||||
bne L4BA1 branch if no carry adjustment.
|
|
||||||
|
|
||||||
dec h_fcnt+1 take carry from hi byte of file entries.
|
|
||||||
|
|
||||||
L4BA1 dec h_fcnt mark header with one less file.
|
|
||||||
jsr dvcbrev go update block count in vcb (ignore
|
|
||||||
jsr drevise error, if any) and update dir last.
|
|
||||||
tax save possible new error code,
|
|
||||||
pla restore possible old error code.
|
|
||||||
bcc L4BAF branch if last call succeeded.
|
|
||||||
txa last call failed, use it's error code.
|
|
||||||
|
|
||||||
L4BAF cmp #$01 adjust carry accordingly
|
|
||||||
rts
|
|
||||||
|
|
||||||
dvcbrev ldx vcbptr update block free count in vcb. point to vcb of correct device.
|
|
||||||
lda deblock get # of blocks recently freed.
|
|
||||||
adc VCBs+VCB.FBLK,x
|
|
||||||
sta VCBs+VCB.FBLK,x update current free block count.
|
|
||||||
lda deblock+1
|
|
||||||
adc VCBs+VCB.FBLK+1,x
|
|
||||||
sta VCBs+VCB.FBLK+1,x
|
|
||||||
|
|
||||||
stz VCBs+VCB.BMAPIDX,x force re-scan from 1st bitmap
|
|
||||||
|
|
||||||
* lda #0 ?????
|
|
||||||
|
|
||||||
rts
|
|
||||||
|
|
||||||
L4BCD bcc L4B85 branch widened (always taken)
|
|
||||||
|
|
||||||
L4BCF cmp #$D0 is this a directory file ?
|
|
||||||
bne L4C1B no, file incompatible.
|
|
||||||
|
|
||||||
jsr fndbmap make sure a buffer available for bitmap
|
|
||||||
bcs L4C1A if error.
|
|
||||||
|
|
||||||
jsr XDOS.ReadGBuf_d_frst read 1st block of directory into gbuf
|
|
||||||
bcs L4C1A
|
|
||||||
|
|
||||||
lda gbuf+37 do any files exist in this directory ?
|
|
||||||
ora gbuf+38
|
|
||||||
bne L4C1Abis if so, access error.
|
|
||||||
|
|
||||||
L4BF6 sta gbuf+4 make it an invalid subdirectory
|
|
||||||
.DO LOWERCASE=1
|
|
||||||
jsr XDOS.WriteGBufDir
|
|
||||||
.ELSE
|
|
||||||
jsr XDOS.WriteGBuf
|
|
||||||
.FIN
|
|
||||||
bcs L4C1A
|
|
||||||
|
|
||||||
L4BFE lda gbuf+2 get forward link.
|
|
||||||
cmp #$01 test for null block into carry.
|
|
||||||
ldx gbuf+3 get the rest of the block address.
|
|
||||||
bne L4C0A branch if not null.
|
|
||||||
bcc L4BCD was the low part null as well ?
|
|
||||||
|
|
||||||
L4C0A jsr XDOS.DeallocAX free this block.
|
|
||||||
bcs L4C1A
|
|
||||||
|
|
||||||
lda gbuf+2
|
|
||||||
ldx gbuf+3
|
|
||||||
jsr XDOS.ReadGBufAX read next DIR block (no need to unpack)
|
|
||||||
bcc L4BFE loop until all freed
|
|
||||||
|
|
||||||
L4C1A rts
|
|
||||||
|
|
||||||
L4C1Abis lda #MLI.E.LOCKED access error.
|
|
||||||
.HS 2C BIT ABS
|
|
||||||
L4C1B lda #MLI.E.INCFF file incompatible
|
|
||||||
jsr GP.P8errv
|
|
||||||
|
|
||||||
fcbused pha mark fcb as dirty so the directory will be flushed on 'flush'.
|
|
||||||
tya save regs.
|
|
||||||
pha
|
|
||||||
ldy fcbptr
|
|
||||||
|
|
||||||
lda #$80 mark fcb as dirty.
|
|
||||||
sta FCBs+FCB.DIRTY,y save it back
|
|
||||||
pla and restore regs.
|
|
||||||
tay
|
|
||||||
pla
|
|
||||||
rts
|
|
||||||
*--------------------------------------
|
|
||||||
* 'detree' deallocates blocks from tree files. it is assumed that the device has
|
* 'detree' deallocates blocks from tree files. it is assumed that the device has
|
||||||
* been pre-selected and the 'gbuf' may be used.
|
* been pre-selected and the 'gbuf' may be used.
|
||||||
*
|
*
|
||||||
|
@ -193,7 +39,7 @@ detree lda stortyp which kind of tree ?
|
||||||
|
|
||||||
L4C46 lda dsap
|
L4C46 lda dsap
|
||||||
ora dtree
|
ora dtree
|
||||||
bne L4CC2
|
bne L4CC2
|
||||||
|
|
||||||
jmp seedel0
|
jmp seedel0
|
||||||
|
|
||||||
|
@ -366,8 +212,7 @@ drdfrst lda firstbl read specified 1st block into gbuf
|
||||||
* locations 46 and 47 which are used to point to the current index block.
|
* locations 46 and 47 which are used to point to the current index block.
|
||||||
|
|
||||||
shrink ldx firstbh first deallocate top index block
|
shrink ldx firstbh first deallocate top index block
|
||||||
txa
|
phx
|
||||||
pha
|
|
||||||
lda firstbl
|
lda firstbl
|
||||||
pha save block address of this index block.
|
pha save block address of this index block.
|
||||||
jsr XDOS.DeallocAX free it from the bitmap
|
jsr XDOS.DeallocAX free it from the bitmap
|
||||||
|
@ -408,12 +253,13 @@ L4DA5 jsr XDOS.DeallocAX free it up on volume bitmap.
|
||||||
|
|
||||||
ldy saptr get index to sapling level index block.
|
ldy saptr get index to sapling level index block.
|
||||||
|
|
||||||
jsr swapme
|
jsr swapme
|
||||||
|
|
||||||
L4DB0 iny next block address.
|
L4DB0 iny next block address.
|
||||||
bne L4D96 if more to deallocate or test.
|
bne L4D96 if more to deallocate or test.
|
||||||
|
|
||||||
clc no error.
|
clc no error.
|
||||||
|
|
||||||
L4DB4 tax save error code, if any.
|
L4DB4 tax save error code, if any.
|
||||||
pla restore blocknm (16 bit)
|
pla restore blocknm (16 bit)
|
||||||
sta bloknml+1
|
sta bloknml+1
|
||||||
|
@ -434,11 +280,11 @@ L4DCB sta gbuf+$100,y save index high
|
||||||
txa
|
txa
|
||||||
sta gbuf,y save index low
|
sta gbuf,y save index low
|
||||||
rts done.
|
rts done.
|
||||||
|
*--------------------------------------
|
||||||
* MEMMGR memory manager
|
* MEMMGR memory manager
|
||||||
*
|
*
|
||||||
* allocate buffer in memory tables
|
* allocate buffer in memory tables
|
||||||
|
*--------------------------------------
|
||||||
alcbuffr ldy #$04 index to user specified buffer.
|
alcbuffr ldy #$04 index to user specified buffer.
|
||||||
alcbufr1 lda (A3L),y this buffer must be on a page boundary.
|
alcbufr1 lda (A3L),y this buffer must be on a page boundary.
|
||||||
tax save for validation.
|
tax save for validation.
|
||||||
|
@ -591,17 +437,17 @@ XDOS.SetBuf ldy #$03
|
||||||
|
|
||||||
ldy #$00
|
ldy #$00
|
||||||
ldx #$03
|
ldx #$03
|
||||||
|
|
||||||
L4EB8 lda (usrbuf),y move all 4 pages of the buffer to
|
.1 lda (usrbuf),y move all 4 pages of the buffer to
|
||||||
sta (datptr),y new location.
|
sta (datptr),y new location.
|
||||||
iny
|
iny
|
||||||
bne L4EB8
|
bne .1
|
||||||
|
|
||||||
inc datptr+1
|
inc datptr+1
|
||||||
inc usrbuf+1
|
inc usrbuf+1
|
||||||
dex
|
dex
|
||||||
bpl L4EB8
|
bpl .1
|
||||||
XDOS.SetBuf.CLCRTS
|
XDOS.SetBuf.CLCRTS
|
||||||
clc no errors
|
clc no errors
|
||||||
L4EC7 rts
|
L4EC7 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
@ -627,8 +473,8 @@ XDOS.IsValidFirstChar
|
||||||
cmp #'z'+1
|
cmp #'z'+1
|
||||||
.FIN
|
.FIN
|
||||||
XDOS.IsValidFirstChar.RTS
|
XDOS.IsValidFirstChar.RTS
|
||||||
rts
|
rts
|
||||||
|
|
||||||
XDOS.IsValidFirstChar.SEC
|
XDOS.IsValidFirstChar.SEC
|
||||||
sec
|
sec
|
||||||
rts
|
rts
|
||||||
|
@ -654,7 +500,7 @@ calldisp lda RRAMWRAMBNK2 read/write RAM bank 2
|
||||||
sta (A2L),y
|
sta (A2L),y
|
||||||
iny
|
iny
|
||||||
bne .1
|
bne .1
|
||||||
|
|
||||||
inc A1L+1 pointers to next page
|
inc A1L+1 pointers to next page
|
||||||
inc A2L+1
|
inc A2L+1
|
||||||
dex move all pages needed
|
dex move all pages needed
|
||||||
|
@ -664,8 +510,8 @@ calldisp lda RRAMWRAMBNK2 read/write RAM bank 2
|
||||||
lda RRAMWRAMBNK1 swap mli space back in
|
lda RRAMWRAMBNK1 swap mli space back in
|
||||||
|
|
||||||
stz mliact MLI active flag
|
stz mliact MLI active flag
|
||||||
|
|
||||||
stz softev
|
stz softev
|
||||||
lda #$10 point RESET to dispatch entry
|
lda #$10 point RESET to dispatch entry
|
||||||
sta softev+1
|
sta softev+1
|
||||||
eor #$A5
|
eor #$A5
|
||||||
|
@ -700,7 +546,7 @@ XDOS.SPREMAP ldx #$03 assume 3 parameters.
|
||||||
|
|
||||||
lda XDOS.SPUnit-1,x get the smartport unit number and
|
lda XDOS.SPUnit-1,x get the smartport unit number and
|
||||||
sta XDOS.SPParams.U store into smartport parm list.
|
sta XDOS.SPParams.U store into smartport parm list.
|
||||||
lda XDOS.SPVectLo-1,x
|
lda XDOS.SPVectLo-1,x
|
||||||
sta sp_vector+1 copy smartport entry address
|
sta sp_vector+1 copy smartport entry address
|
||||||
lda XDOS.SPVectHi-1,x
|
lda XDOS.SPVectHi-1,x
|
||||||
sta sp_vector+2
|
sta sp_vector+2
|
||||||
|
@ -742,14 +588,13 @@ XDOS.SPParams.U .HS 00 unit number
|
||||||
XDOS.SPParams.B .HS 0000 data buffer
|
XDOS.SPParams.B .HS 0000 data buffer
|
||||||
.HS 000000 block number (3 bytes)
|
.HS 000000 block number (3 bytes)
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
XDOS.TOOLBOX jmp (.1,x)
|
XDOS.TBX jmp (.1,x)
|
||||||
|
|
||||||
.1 .DA XDOS.TOOLBOX.MEMRESET
|
.1 .DA XDOS.TBX.MemReset
|
||||||
.DA XDOS.TOOLBOX.UnpackYA
|
.DA XDOS.TBX.EnumBlk
|
||||||
.DA XDOS.TOOLBOX.EnumBlk
|
.DA XDOS.TBX.EnumNext
|
||||||
.DA XDOS.TOOLBOX.EnumNext
|
*--------------------------------------
|
||||||
|
XDOS.TBX.MemReset
|
||||||
XDOS.TOOLBOX.MEMRESET
|
|
||||||
ldx #$17
|
ldx #$17
|
||||||
|
|
||||||
.1 stz MEMTABL,x P8 memory bitmap
|
.1 stz MEMTABL,x P8 memory bitmap
|
||||||
|
@ -760,81 +605,149 @@ XDOS.TOOLBOX.MEMRESET
|
||||||
lda #$CF protect zero page, stack and page 1
|
lda #$CF protect zero page, stack and page 1
|
||||||
sta MEMTABL
|
sta MEMTABL
|
||||||
rts
|
rts
|
||||||
|
*--------------------------------------
|
||||||
XDOS.TOOLBOX.UnpackYA
|
XDOS.TBX.EnumBlk
|
||||||
sty zpt
|
|
||||||
sta zpt+1
|
|
||||||
|
|
||||||
ldx #1
|
|
||||||
jmp XDOS.UnpackZPT
|
|
||||||
|
|
||||||
XDOS.TOOLBOX.EnumBlk
|
|
||||||
jsr XDOS.ZPT.InitA
|
jsr XDOS.ZPT.InitA
|
||||||
|
|
||||||
|
ldx h_maxent
|
||||||
|
|
||||||
lda (zpt)
|
lda (zpt)
|
||||||
and #$F0
|
|
||||||
cmp #$E0
|
cmp #$E0
|
||||||
bcs .8
|
bcc .2
|
||||||
|
|
||||||
ldy #$1F
|
ldy #$1F+3
|
||||||
ldx #3
|
ldx #3
|
||||||
|
|
||||||
.1 lda (zpt),y
|
.1 lda (zpt),y
|
||||||
sta h_entln,x
|
sta h_entln,x
|
||||||
dey
|
dey
|
||||||
dex
|
dex
|
||||||
bpl .1
|
bpl .1
|
||||||
|
|
||||||
jsr XDOS.ZPT.Next
|
|
||||||
|
|
||||||
lda h_maxent
|
jsr XDOS.ZPT.Next skip header
|
||||||
dec skip header
|
|
||||||
sta cntent
|
ldx h_maxent
|
||||||
|
dex skip header
|
||||||
* ldy h_fcnt
|
|
||||||
* lda h_fcnt+1
|
.2 stx cntent
|
||||||
|
|
||||||
.8 clc
|
XDOS.TBX.CheckFCnt
|
||||||
|
lda h_fcnt
|
||||||
|
ora h_fcnt+1
|
||||||
|
beq XDOS.TBX.SECRTS
|
||||||
|
* clc
|
||||||
rts
|
rts
|
||||||
|
*--------------------------------------
|
||||||
XDOS.TOOLBOX.EnumNext
|
XDOS.TBX.EnumNext
|
||||||
sty sos
|
sty sos
|
||||||
sta sos+1
|
sta sos+1
|
||||||
|
|
||||||
lda cntent
|
|
||||||
beq .9
|
|
||||||
|
|
||||||
.1 lda (zpt)
|
jsr XDOS.TBX.CheckFCnt
|
||||||
|
bcs .9
|
||||||
|
|
||||||
|
.1 dec cntent
|
||||||
|
bmi XDOS.TBX.SECRTS
|
||||||
|
|
||||||
|
lda (zpt)
|
||||||
and #$0F
|
and #$0F
|
||||||
beq .7
|
beq .7
|
||||||
|
|
||||||
sta (sos)
|
sta (sos)
|
||||||
|
|
||||||
pha
|
pha
|
||||||
|
|
||||||
ldx #1
|
jsr XDOS.ZPT.Unpack
|
||||||
jsr XDOS.UnpackZPT
|
|
||||||
|
|
||||||
ply
|
ply
|
||||||
|
|
||||||
.2 lda (zpt),y
|
.2 lda (zpt),y
|
||||||
sta (sos),y
|
sta (sos),y
|
||||||
dey
|
dey
|
||||||
bne .2
|
bne .2
|
||||||
|
|
||||||
ldy #16 FileType
|
ldy #16 FileType
|
||||||
lda (zpt),y
|
lda (zpt),y
|
||||||
|
|
||||||
|
pha
|
||||||
|
jsr XDOS.ZPT.Next
|
||||||
|
|
||||||
clc
|
lda h_fcnt+1
|
||||||
rts
|
bne .3
|
||||||
|
|
||||||
|
dec h_fcnt+1
|
||||||
|
|
||||||
|
.3 dec h_fcnt
|
||||||
|
|
||||||
|
pla
|
||||||
|
* clc
|
||||||
|
.9 rts
|
||||||
|
|
||||||
.7 jsr XDOS.ZPT.Next
|
.7 jsr XDOS.ZPT.Next
|
||||||
|
bra .1
|
||||||
dec cntent
|
*--------------------------------------
|
||||||
bne .1
|
XDOS.TBX.SECRTS sec
|
||||||
|
rts
|
||||||
.9 sec
|
*--------------------------------------
|
||||||
rts
|
XDOS.ZPT.InitGBuf
|
||||||
|
lda /gbuf
|
||||||
|
|
||||||
|
XDOS.ZPT.InitA sta zpt+1
|
||||||
|
lda #4
|
||||||
|
sta zpt
|
||||||
|
|
||||||
|
rts
|
||||||
|
*--------------------------------------
|
||||||
|
XDOS.ZPT.Unpack ldy #$1D MIN_VERSION
|
||||||
|
lda (zpt),y
|
||||||
|
bpl .6 no lowercase information
|
||||||
|
|
||||||
|
lda (zpt)
|
||||||
|
and #$0F
|
||||||
|
beq .6 length=0
|
||||||
|
|
||||||
|
tay
|
||||||
|
|
||||||
|
.2 cpy #8 CS if MIN_VERSION to use
|
||||||
|
phy
|
||||||
|
|
||||||
|
bcs .3
|
||||||
|
|
||||||
|
ldy #$1D MIN_VERSION
|
||||||
|
lda (zpt),y
|
||||||
|
|
||||||
|
ply
|
||||||
|
and whichbit,y
|
||||||
|
beq .5
|
||||||
|
|
||||||
|
bra .4
|
||||||
|
|
||||||
|
.3 ldy #$1C VERSION
|
||||||
|
lda (zpt),y
|
||||||
|
|
||||||
|
ply
|
||||||
|
and whichbit-8,y
|
||||||
|
beq .5
|
||||||
|
|
||||||
|
.4 lda (zpt),y
|
||||||
|
eor #$20 to lowercase
|
||||||
|
sta (zpt),y
|
||||||
|
|
||||||
|
.5 dey
|
||||||
|
bne .2
|
||||||
|
|
||||||
|
.6 rts
|
||||||
|
*--------------------------------------
|
||||||
|
XDOS.ZPT.Next lda h_entln
|
||||||
|
|
||||||
|
XDOS.ZPT.NextA clc
|
||||||
|
adc zpt
|
||||||
|
sta zpt
|
||||||
|
bcc .8
|
||||||
|
|
||||||
|
inc zpt+1
|
||||||
|
clc
|
||||||
|
|
||||||
|
.8 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
* data tables
|
* data tables
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
@ -853,7 +766,7 @@ XDOS.ParamCnt .HS 02020202 parameter counts for the calls
|
||||||
.HS 070102070A0201010303040401010202
|
.HS 070102070A0201010303040401010202
|
||||||
.HS FF
|
.HS FF
|
||||||
.HS 020202
|
.HS 020202
|
||||||
|
|
||||||
XDOS.CmdFlags .HS A0A1A2
|
XDOS.CmdFlags .HS A0A1A2
|
||||||
.HS A384
|
.HS A384
|
||||||
.HS 050607
|
.HS 050607
|
||||||
|
@ -924,12 +837,9 @@ h_credt .HS 0000 directory creation date
|
||||||
.HS 00 version under which this dir created
|
.HS 00 version under which this dir created
|
||||||
.HS 00 earliest version that it's compatible
|
.HS 00 earliest version that it's compatible
|
||||||
h_attr .HS 00 attributes (protect bit, etc.)
|
h_attr .HS 00 attributes (protect bit, etc.)
|
||||||
|
|
||||||
*--------------------------------------
|
|
||||||
h_entln .HS 00 length of each entry in this directory
|
h_entln .HS 00 length of each entry in this directory
|
||||||
h_maxent .HS 00 maximum number of entries per block
|
h_maxent .HS 00 maximum number of entries per block
|
||||||
h_fcnt .HS 0000 current # of files in this directory
|
h_fcnt .HS 0000 current # of files in this directory
|
||||||
*--------------------------------------
|
|
||||||
h_bmap .HS 0000 address of first allocation bitmap
|
h_bmap .HS 0000 address of first allocation bitmap
|
||||||
h_tblk .HS 0000 total number of blocks on this unit
|
h_tblk .HS 0000 total number of blocks on this unit
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
@ -937,7 +847,6 @@ d_dev .HS 00 device number of this directory entry
|
||||||
d_head .HS 0000 address of <sub> directory header
|
d_head .HS 0000 address of <sub> directory header
|
||||||
d_entblk .HS 0000 address of block which contains entry
|
d_entblk .HS 0000 address of block which contains entry
|
||||||
d_entnum .HS 00 entry number within block
|
d_entnum .HS 00 entry number within block
|
||||||
*--------------------------------------
|
|
||||||
d_stor .BS 16 file name
|
d_stor .BS 16 file name
|
||||||
d_filid .HS 00 user's identification byte
|
d_filid .HS 00 user's identification byte
|
||||||
d_frst .HS 0000 first block of file
|
d_frst .HS 0000 first block of file
|
||||||
|
@ -960,7 +869,7 @@ xvcbptr .HS 00 used in 'cmpvcb' as a temp
|
||||||
vcbptr .HS 00
|
vcbptr .HS 00
|
||||||
fcbptr .HS 00
|
fcbptr .HS 00
|
||||||
fcbflg .HS 00
|
fcbflg .HS 00
|
||||||
reql .HS 00
|
reql .HS 00
|
||||||
reqh .HS 00
|
reqh .HS 00
|
||||||
levels .HS 00
|
levels .HS 00
|
||||||
totent .HS 00
|
totent .HS 00
|
||||||
|
@ -968,7 +877,7 @@ entcntl .HS 00
|
||||||
entcnth .HS 00
|
entcnth .HS 00
|
||||||
cntent .HS 00
|
cntent .HS 00
|
||||||
nofree .HS 00
|
nofree .HS 00
|
||||||
bmcnt .HS 00
|
bmcnt .HS 00
|
||||||
saptr .HS 00
|
saptr .HS 00
|
||||||
pathcnt .HS 00
|
pathcnt .HS 00
|
||||||
p_dev .HS 00
|
p_dev .HS 00
|
||||||
|
@ -1021,7 +930,7 @@ dealbufl .HS 0000000000000000
|
||||||
dealbufh .HS 0000000000000000
|
dealbufh .HS 0000000000000000
|
||||||
cbytes .HS 0000
|
cbytes .HS 0000
|
||||||
.HS 00 cbytes+2 must = 0
|
.HS 00 cbytes+2 must = 0
|
||||||
bufaddrl .HS 00
|
bufaddrl .HS 00
|
||||||
bufaddrh .HS 00
|
bufaddrh .HS 00
|
||||||
delflag .HS 00 used by 'detree' to know if called from delete (destroy).
|
delflag .HS 00 used by 'detree' to know if called from delete (destroy).
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
@ -1029,7 +938,7 @@ delflag .HS 00 used by 'detree' to know if called from delete (destroy).
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
XRW.D2Trk .EQ *
|
XRW.D2Trk .EQ *
|
||||||
XDOS.SPUnit .HS 00000000000000 14+1 for S0D2
|
XDOS.SPUnit .HS 00000000000000 14+1 for S0D2
|
||||||
.HS 00
|
.HS 00
|
||||||
.HS 00000000000000
|
.HS 00000000000000
|
||||||
|
|
||||||
XRW.D2VolNum .EQ *
|
XRW.D2VolNum .EQ *
|
||||||
|
@ -1041,20 +950,20 @@ XRW.D2SeekTime .EQ *
|
||||||
XDOS.SPVectHi .HS 00000000000000 storage for high byte of smartport entry.
|
XDOS.SPVectHi .HS 00000000000000 storage for high byte of smartport entry.
|
||||||
.HS 00
|
.HS 00
|
||||||
.HS 00000000000000
|
.HS 00000000000000
|
||||||
|
|
||||||
XDOS.SPStatus .HS 00000000
|
XDOS.SPStatus .HS 00000000
|
||||||
|
|
||||||
.LIST ON
|
.LIST ON
|
||||||
XDOS.DATA.LEN .EQ *-XDOS.DATA
|
XDOS.DATA.LEN .EQ *-XDOS.DATA
|
||||||
.LIST OFF
|
.LIST OFF
|
||||||
.ED
|
.ED
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
* zero fill to page boundary - 3 ($FEFD). so that cortland flag stays within page boundary.
|
* zero fill to page boundary - 3 ($FEFD). so that cortland flag stays within page boundary.
|
||||||
.LIST ON
|
.LIST ON
|
||||||
XDOS.FREE .EQ $FEFD-*-XDOS.DATA.LEN (2.0.3 = $0C)
|
XDOS.FREE .EQ $FEFD-*-XDOS.DATA.LEN (2.0.3 = $0C)
|
||||||
.LIST OFF
|
.LIST OFF
|
||||||
cortdisp .EQ $FEFD
|
cortdisp .EQ $FEFD
|
||||||
cortflag .EQ $FEFF cortland flag. 1 = Cortland system (must stay within page boundary)
|
cortflag .EQ $FEFF cortland flag. 1 = Cortland system (must stay within page boundary)
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
XDOS.LEN .EQ *-XDOS
|
XDOS.LEN .EQ *-XDOS
|
||||||
MAN
|
MAN
|
||||||
|
|
|
@ -54,8 +54,8 @@ CS.INIT >LDYA L.LIBGUI
|
||||||
sta hLIBGUI
|
sta hLIBGUI
|
||||||
|
|
||||||
* clc
|
* clc
|
||||||
.9
|
|
||||||
CS.INIT.RTS rts
|
.9 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.RUN >SLEEP
|
CS.RUN >SLEEP
|
||||||
|
|
||||||
|
@ -87,9 +87,6 @@ CS.RUN >SLEEP
|
||||||
>LDYA L.GUITEST2
|
>LDYA L.GUITEST2
|
||||||
jsr CS.RUN.Exec
|
jsr CS.RUN.Exec
|
||||||
bra CS.RUN
|
bra CS.RUN
|
||||||
|
|
||||||
clc
|
|
||||||
rts
|
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.RUN.MsgBox >PUSHW L.ABOUT.T
|
CS.RUN.MsgBox >PUSHW L.ABOUT.T
|
||||||
>PUSHWI BM.ID.INFO
|
>PUSHWI BM.ID.INFO
|
||||||
|
@ -111,8 +108,13 @@ CS.DOEVENT lda (pEvent)
|
||||||
.9 sec
|
.9 sec
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.QUIT clc
|
CS.QUIT lda hLIBGUI
|
||||||
CS.QUIT.RTS rts
|
beq .8
|
||||||
|
|
||||||
|
>SYSCALL UnloadLib
|
||||||
|
|
||||||
|
.8 clc
|
||||||
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.END
|
CS.END
|
||||||
LIBGUI .AZ "libgui"
|
LIBGUI .AZ "libgui"
|
||||||
|
|
|
@ -398,6 +398,7 @@ K.FOpen.90 pha
|
||||||
rts
|
rts
|
||||||
|
|
||||||
K.FOpen.9 >POP 6
|
K.FOpen.9 >POP 6
|
||||||
|
|
||||||
K.FOpen.99 rts
|
K.FOpen.99 rts
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # FClose
|
* # FClose
|
||||||
|
@ -518,6 +519,7 @@ K.FFlush jsr PFT.CheckNodeA
|
||||||
lda (pFD)
|
lda (pFD)
|
||||||
bne STDIO.IOERR
|
bne STDIO.IOERR
|
||||||
>MLICALL MLIFLUSH
|
>MLICALL MLIFLUSH
|
||||||
|
|
||||||
.9 rts
|
.9 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
STDIO.IOERR lda #MLI.E.IO
|
STDIO.IOERR lda #MLI.E.IO
|
||||||
|
@ -625,6 +627,7 @@ K.FEOF jsr PFT.CheckNodeA
|
||||||
lda (pFD)
|
lda (pFD)
|
||||||
tax
|
tax
|
||||||
jmp (.1,x)
|
jmp (.1,x)
|
||||||
|
|
||||||
.1 .DA FS.EOF.REG
|
.1 .DA FS.EOF.REG
|
||||||
.DA STDIO.IOERR DIR
|
.DA STDIO.IOERR DIR
|
||||||
.DA DEV.EOF
|
.DA DEV.EOF
|
||||||
|
@ -647,6 +650,7 @@ K.FEOF jsr PFT.CheckNodeA
|
||||||
*\--------------------------------------
|
*\--------------------------------------
|
||||||
K.FTell jsr PFT.CheckNodeA
|
K.FTell jsr PFT.CheckNodeA
|
||||||
bcs .9
|
bcs .9
|
||||||
|
|
||||||
>MLICALL MLIGETMARK
|
>MLICALL MLIGETMARK
|
||||||
bcs .9
|
bcs .9
|
||||||
|
|
||||||
|
@ -803,9 +807,7 @@ K.PrintF.1 sec format string->ptr2
|
||||||
sty STDIO.PopCnt Total bytes to POP
|
sty STDIO.PopCnt Total bytes to POP
|
||||||
|
|
||||||
.1 jsr SHARED.GetCP2
|
.1 jsr SHARED.GetCP2
|
||||||
bne .22
|
beq .8 end of format..
|
||||||
|
|
||||||
jmp .8 end of format..
|
|
||||||
|
|
||||||
.22 cmp #'%'
|
.22 cmp #'%'
|
||||||
bne .20
|
bne .20
|
||||||
|
@ -817,8 +819,10 @@ K.PrintF.1 sec format string->ptr2
|
||||||
|
|
||||||
jsr ZP.IsDigit
|
jsr ZP.IsDigit
|
||||||
bcs .6 no digit....go check specifier
|
bcs .6 no digit....go check specifier
|
||||||
|
|
||||||
cmp #'0' ...a 0...mmm... padding char?
|
cmp #'0' ...a 0...mmm... padding char?
|
||||||
bne .4
|
bne .4
|
||||||
|
|
||||||
sta K.PrintF.PadC
|
sta K.PrintF.PadC
|
||||||
jsr SHARED.NextCP2 skip 0 ...
|
jsr SHARED.NextCP2 skip 0 ...
|
||||||
lda (ZPPtr2)
|
lda (ZPPtr2)
|
||||||
|
@ -829,10 +833,12 @@ K.PrintF.1 sec format string->ptr2
|
||||||
|
|
||||||
.4 jsr MATH.Dec2ACC32
|
.4 jsr MATH.Dec2ACC32
|
||||||
bcs .99
|
bcs .99
|
||||||
|
|
||||||
lda ACC32
|
lda ACC32
|
||||||
sta K.PrintF.PadL
|
sta K.PrintF.PadL
|
||||||
lda K.PrintF.PadC
|
lda K.PrintF.PadC
|
||||||
bne .5
|
bne .5
|
||||||
|
|
||||||
lda #C.SPACE
|
lda #C.SPACE
|
||||||
sta K.PrintF.PadC
|
sta K.PrintF.PadC
|
||||||
|
|
||||||
|
@ -898,6 +904,7 @@ PrintFTBL1 .AS "bdDuefhHiILsS"
|
||||||
PrintFTBL1.Cnt .EQ *-PrintFTBL1
|
PrintFTBL1.Cnt .EQ *-PrintFTBL1
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
PrintF.ESC jmp (.1,x)
|
PrintF.ESC jmp (.1,x)
|
||||||
|
|
||||||
.1 .DA PrintF.B
|
.1 .DA PrintF.B
|
||||||
.DA PrintF.D,PrintF.DD,PrintF.U
|
.DA PrintF.D,PrintF.DD,PrintF.U
|
||||||
.DA PrintF.E,PrintF.F
|
.DA PrintF.E,PrintF.F
|
||||||
|
@ -915,9 +922,11 @@ PrintF.B jsr STDIO.GetStkB
|
||||||
rol
|
rol
|
||||||
jsr PrintF.PutC
|
jsr PrintF.PutC
|
||||||
bcs .9
|
bcs .9
|
||||||
|
|
||||||
pla
|
pla
|
||||||
dey
|
dey
|
||||||
bne .1
|
bne .1
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
.9 ply
|
.9 ply
|
||||||
|
@ -991,6 +1000,7 @@ PrintF.F clc
|
||||||
sec at least 5 bytes remaining ?
|
sec at least 5 bytes remaining ?
|
||||||
sbc #5
|
sbc #5
|
||||||
bcc PrintF.StrNum.Err
|
bcc PrintF.StrNum.Err
|
||||||
|
|
||||||
sta (pStack)
|
sta (pStack)
|
||||||
|
|
||||||
* sec
|
* sec
|
||||||
|
@ -1006,6 +1016,7 @@ PrintF.F clc
|
||||||
PrintF.StrNum ldy #0
|
PrintF.StrNum ldy #0
|
||||||
.2 lda FOUTBuf,y
|
.2 lda FOUTBuf,y
|
||||||
beq .8
|
beq .8
|
||||||
|
|
||||||
iny
|
iny
|
||||||
jsr PrintF.PutC
|
jsr PrintF.PutC
|
||||||
bcc .2
|
bcc .2
|
||||||
|
@ -1056,8 +1067,10 @@ PrintF.SS ldy #$00 PSTR
|
||||||
|
|
||||||
lda K.PrintF.PadL
|
lda K.PrintF.PadL
|
||||||
beq .1
|
beq .1
|
||||||
|
|
||||||
cpy K.PrintF.PadL
|
cpy K.PrintF.PadL
|
||||||
bne .1
|
bne .1
|
||||||
|
|
||||||
.8 clc
|
.8 clc
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
@ -1079,15 +1092,18 @@ PrintF.SS ldy #$00 PSTR
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
PrintF.HH jsr STDIO.GetStkB
|
PrintF.HH jsr STDIO.GetStkB
|
||||||
bcs STDIO.RTS
|
bcs STDIO.RTS
|
||||||
|
|
||||||
pha LO byte
|
pha LO byte
|
||||||
jsr STDIO.GetStkB
|
jsr STDIO.GetStkB
|
||||||
plx
|
plx
|
||||||
bcs STDIO.RTS
|
bcs STDIO.RTS
|
||||||
|
|
||||||
pha
|
pha
|
||||||
txa
|
txa
|
||||||
jsr PrintF.H.1
|
jsr PrintF.H.1
|
||||||
plx
|
plx
|
||||||
bcs STDIO.RTS
|
bcs STDIO.RTS
|
||||||
|
|
||||||
txa
|
txa
|
||||||
bra PrintF.H.1
|
bra PrintF.H.1
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
@ -1097,6 +1113,7 @@ PrintF.H jsr STDIO.GetStkB
|
||||||
PrintF.H.1 jsr STDIO.A2HexAX
|
PrintF.H.1 jsr STDIO.A2HexAX
|
||||||
jsr PrintF.PutC
|
jsr PrintF.PutC
|
||||||
bcs STDIO.RTS
|
bcs STDIO.RTS
|
||||||
|
|
||||||
txa
|
txa
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
PrintF.PutC phy
|
PrintF.PutC phy
|
||||||
|
@ -1218,6 +1235,7 @@ K.SScanF.1 clc format string->ptr1
|
||||||
|
|
||||||
.12 jsr SHARED.GetCP2
|
.12 jsr SHARED.GetCP2
|
||||||
beq .9
|
beq .9
|
||||||
|
|
||||||
cmp #C.SPACE
|
cmp #C.SPACE
|
||||||
bne .9
|
bne .9
|
||||||
|
|
||||||
|
@ -1244,9 +1262,11 @@ K.SScanF.1 clc format string->ptr1
|
||||||
|
|
||||||
.4 jsr STDIO.GetStkB
|
.4 jsr STDIO.GetStkB
|
||||||
bcs .9
|
bcs .9
|
||||||
|
|
||||||
sta ZPPtr3+1
|
sta ZPPtr3+1
|
||||||
jsr STDIO.GetStkB
|
jsr STDIO.GetStkB
|
||||||
bcs .9
|
bcs .9
|
||||||
|
|
||||||
sta ZPPtr3
|
sta ZPPtr3
|
||||||
|
|
||||||
jsr .5
|
jsr .5
|
||||||
|
|
Loading…
Reference in New Issue