mirror of
https://github.com/A2osX/A2osX.git
synced 2025-02-19 07:30:41 +00:00
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
|
||||
bpl .8
|
||||
|
||||
|
||||
php
|
||||
sei
|
||||
|
||||
|
@ -37,9 +37,6 @@ LDR.START1 ldx #$FF
|
||||
jsr LDR.ShrinkRAM
|
||||
bcs .3
|
||||
|
||||
lda bRAMFlag
|
||||
sta GP.CISPARE1
|
||||
|
||||
lda #%11001111 pages 0,1,...,4,5,6,7 protected
|
||||
sta MLI.MEMTABL
|
||||
|
||||
@ -67,6 +64,9 @@ LDR.START1 ldx #$FF
|
||||
lda /LDR.GP.DST
|
||||
jsr X.Unpak.XatYA
|
||||
|
||||
lda bRAMFlag
|
||||
sta GP.CISPARE1
|
||||
|
||||
bit IO.RRAMWRAMBNK2
|
||||
bit IO.RRAMWRAMBNK2
|
||||
|
||||
|
@ -210,7 +210,7 @@ Wait.TimeOut sec
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CS.END
|
||||
LIBETALK .AZ "LIBETALK"
|
||||
LIBETALK .AZ "libetalk"
|
||||
hLIBETALK .BS 1
|
||||
SSCANF.ADDR .AZ "%D.%d"
|
||||
SSCANF.MAC .AZ "%h:%h:%h:%h:%h:%h"
|
||||
|
@ -623,9 +623,11 @@ SCRN.ToLineBuf sta (LineBufPtr)
|
||||
SCRN.LineBufOut lda #0
|
||||
sta (LineBufPtr)
|
||||
|
||||
ldy #S.PS.hStdOut
|
||||
lda (pPS),y
|
||||
>PUSHA
|
||||
>PUSHW.G LineBufBase
|
||||
>PUSHBI 0
|
||||
>SYSCALL PrintF
|
||||
>SYSCALL FPutS
|
||||
rts
|
||||
*--------------------------------------
|
||||
MAN
|
||||
|
@ -514,42 +514,42 @@ CS.END
|
||||
LIBETALK .AZ "libetalk"
|
||||
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"
|
||||
.AS " Device ID : $%h\r\n"
|
||||
.AS " Device Name : %s\r\n"
|
||||
.AS " Device Type : %S\r\n"
|
||||
.AZ " HW Address : %02h:%02h:%02h:%02h:%02h:%02h\r\n"
|
||||
MSG1.DEV.ARP .AZ " ARP Offload : %d\r\n"
|
||||
MSG1.DEV.IP .AS " IP Offload : %d\r\n"
|
||||
.AZ " Link Status : "
|
||||
MSG1.LINK.OK .AZ "OK"
|
||||
MSG1.LINK.KO .AZ "Media Disconnected"
|
||||
MSG1.LINKSPEED .AZ " Link Speed : 1"
|
||||
MSG1.DPLX.FD .AZ " Mbit/s,Full Duplex"
|
||||
MSG1.DPLX.HD .AZ " Mbit/s,Half Duplex"
|
||||
MSG1.DEV .CS "NIC Device Configuration :\r\n"
|
||||
.CS " Device ID : $%h\r\n"
|
||||
.CS " Device Name : %s\r\n"
|
||||
.CS " Device Type : %S\r\n"
|
||||
.CZ " HW Address : %02h:%02h:%02h:%02h:%02h:%02h\r\n"
|
||||
MSG1.DEV.ARP .CZ " ARP Offload : %d\r\n"
|
||||
MSG1.DEV.IP .CS " IP Offload : %d\r\n"
|
||||
.CZ " Link Status : "
|
||||
MSG1.LINK.OK .CZ "OK"
|
||||
MSG1.LINK.KO .CZ "Media Disconnected"
|
||||
MSG1.LINKSPEED .CZ " Link Speed : 1"
|
||||
MSG1.DPLX.FD .CZ " Mbit/s,Full Duplex"
|
||||
MSG1.DPLX.HD .CZ " Mbit/s,Half Duplex"
|
||||
*--------------------------------------
|
||||
MSG2 .AZ "EtherTalk Configuration : "
|
||||
MSG2.C .AZ "Configured"
|
||||
MSG2.U .AZ "Not Configured"
|
||||
MSG2.ADDR .AZ " Network/Node : %D/%d\r\n"
|
||||
MSG2.ROUTER .AZ " Router : %D/%d\r\n"
|
||||
MSG2.OBJECT .AZ " Object Name : %S\r\n"
|
||||
MSG2 .CZ "EtherTalk Configuration : "
|
||||
MSG2.C .CZ "Configured"
|
||||
MSG2.U .CZ "Not Configured"
|
||||
MSG2.ADDR .CZ " Network/Node : %D/%d\r\n"
|
||||
MSG2.ROUTER .CZ " Router : %D/%d\r\n"
|
||||
MSG2.OBJECT .CZ " Object Name : %S\r\n"
|
||||
*--------------------------------------
|
||||
MSG.CFG .AZ "ETCONFIG:Reading %s..."
|
||||
MSG.CFG.KO .AZ "Not Found. [%h]\r\n"
|
||||
MSG.CFG.OK .AZ "OK."
|
||||
MSG.CFG .CZ "ETCONFIG:Reading %s..."
|
||||
MSG.CFG.KO .CZ "Not Found. [%h]\r\n"
|
||||
MSG.CFG.OK .CZ "OK."
|
||||
*--------------------------------------
|
||||
HOSTNAME .AZ "${ROOT}etc/hostname"
|
||||
*--------------------------------------
|
||||
CFG.DefaultHost .AZ "a2osx-%H"
|
||||
CFG.DefaultHost .CZ "a2osx-%H"
|
||||
*--------------------------------------
|
||||
MSG.PROBE .AZ "ETCONFIG:Acquiring NODE..."
|
||||
MSG.PROBE.KO .AZ "ETCONFIG:Time Out [%h].\r\n"
|
||||
MSG.PROBE.OK .AZ "ETCONFIG:Success."
|
||||
MSG.PROBE .CZ "ETCONFIG:Acquiring NODE..."
|
||||
MSG.PROBE.KO .CZ "ETCONFIG:Time Out [%h].\r\n"
|
||||
MSG.PROBE.OK .CZ "ETCONFIG:Success."
|
||||
*--------------------------------------
|
||||
ETKCFG .BS S.ETKCFG
|
||||
CFG.hCfgFile .BS 1
|
||||
|
@ -460,17 +460,17 @@ ZPCode sta SETREADAUX
|
||||
rts
|
||||
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 .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.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"
|
||||
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"
|
||||
MSG3 .CS "High Memory: $%H, "
|
||||
.CS "Free ULimit: $%H, "
|
||||
.CS "Low : $%H, "
|
||||
MSG3 .CS "High Memory: %H, "
|
||||
.CS "Free ULimit: %H, "
|
||||
.CS "Low : %H, "
|
||||
.CS "Free : %5D Bytes."
|
||||
MSG.CRLF .CZ "\r\n"
|
||||
MSG.FLAGS .CS "UZXAfcds"
|
||||
|
@ -21,9 +21,11 @@ UD.IO.Cmd.NetOpen .EQ $70
|
||||
UD.IO.Cmd.NetClose .EQ $71
|
||||
UD.IO.Cmd.NetSend .EQ $72
|
||||
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.MemPtrL .EQ $C084
|
||||
UD.IO.MemPtrH .EQ $C085
|
||||
UD.IO.MemPtrL .EQ $C084
|
||||
UD.IO.MemPtrH .EQ $C085
|
||||
UD.IO.BlockNum .EQ $C086 Write 4 bytes, BE
|
||||
UD.IO.RData .EQ $C087 Read
|
||||
UD.IO.WData .EQ $C088 Write
|
||||
@ -77,9 +79,9 @@ Dev.Detect >STYA ZPArgPtr
|
||||
lda #$C7
|
||||
|
||||
.1 sta ZPPtr1+1
|
||||
|
||||
|
||||
ldy #ROM.SIG.L-1
|
||||
|
||||
|
||||
.10 lda (ZPPtr1),y
|
||||
cmp ROM.SIG,y
|
||||
bne .2
|
||||
@ -95,7 +97,7 @@ Dev.Detect >STYA ZPArgPtr
|
||||
asl
|
||||
asl
|
||||
|
||||
sta DEVSLOTx0
|
||||
sta DEVSLOTx0
|
||||
bra .3
|
||||
|
||||
.2 dec FD.DEV.NAME+3
|
||||
@ -120,12 +122,12 @@ Dev.Detect >STYA ZPArgPtr
|
||||
|
||||
jsr Dev.ParseArgs
|
||||
bcs .99
|
||||
|
||||
|
||||
.8 >PUSHW L.MSG.DETECT.OK
|
||||
>PUSHW L.FD.DEV.NAME
|
||||
>PUSHBI 2
|
||||
>SYSCALL PrintF
|
||||
|
||||
|
||||
>PUSHWI DRV.END
|
||||
>PUSHWI DRV.CS.END-DRV.CS.START
|
||||
>PUSHWI DRV.CS.START
|
||||
@ -161,7 +163,7 @@ Dev.ParseArgs lda (ZPArgPtr)
|
||||
|
||||
.1 >PUSHW ZPArgPtr
|
||||
>PUSHW L.SSCANF.MAC
|
||||
|
||||
|
||||
ldx #0
|
||||
|
||||
.2 >PUSHW L.MAC0,x
|
||||
@ -173,7 +175,7 @@ Dev.ParseArgs lda (ZPArgPtr)
|
||||
>PUSHBI 12 6 x byte PTRs
|
||||
>SYSCALL SScanF
|
||||
bcc .8
|
||||
|
||||
|
||||
lda #E.SYN
|
||||
* sec
|
||||
.8 rts
|
||||
@ -220,6 +222,9 @@ DRV.CS.START cld
|
||||
*--------------------------------------
|
||||
STATUS >STYA ZPIOCTL
|
||||
|
||||
jsr IO.GetStatus
|
||||
bcs STATUS.99
|
||||
|
||||
ldy #S.IOCTL.S
|
||||
lda (ZPIOCTL),y
|
||||
beq .1
|
||||
@ -256,7 +261,7 @@ STATUS.DCB cmp #S.IOCTL.S.GETDCB
|
||||
|
||||
lda #S.DCB.NIC.LINK.OK
|
||||
tsb DCB+S.DCB.NIC.LINK
|
||||
|
||||
|
||||
|
||||
lda #S.DCB.NIC.LINK.FD
|
||||
tsb DCB+S.DCB.NIC.LINK
|
||||
@ -279,7 +284,7 @@ STATUS.DCB cmp #S.IOCTL.S.GETDCB
|
||||
rts
|
||||
|
||||
STATUS.9 lda #MLI.E.BADCTL
|
||||
sec
|
||||
STATUS.99 sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
OPEN lda #S.DIB.S.OPENED
|
||||
@ -291,7 +296,6 @@ OPEN lda #S.DIB.S.OPENED
|
||||
* ldx DEVSLOTx0 Done by CLOSE
|
||||
|
||||
lda #UD.IO.Cmd.NetOpen
|
||||
sta UD.IO.Cmd,x
|
||||
jsr IO.Exec
|
||||
bcs .99
|
||||
|
||||
@ -300,13 +304,13 @@ OPEN lda #S.DIB.S.OPENED
|
||||
.1 lda UD.IO.RData,x
|
||||
sta DCB+S.DCB.NIC.MAC,y
|
||||
iny
|
||||
|
||||
|
||||
cpy #6
|
||||
bcc .1
|
||||
|
||||
lda #S.DIB.S.OPENED
|
||||
tsb DIB+S.DIB.S
|
||||
|
||||
|
||||
clc
|
||||
rts
|
||||
|
||||
@ -317,7 +321,6 @@ OPEN lda #S.DIB.S.OPENED
|
||||
CLOSE ldx DEVSLOTx0
|
||||
|
||||
lda #UD.IO.Cmd.NetClose
|
||||
sta UD.IO.Cmd,x
|
||||
jsr IO.Exec
|
||||
bcs .9
|
||||
|
||||
@ -331,40 +334,26 @@ READ php
|
||||
sei
|
||||
|
||||
>STYA ZPIOCTL
|
||||
|
||||
|
||||
ldx DEVSLOTx0
|
||||
|
||||
lda #UD.IO.Cmd.NetRcvd
|
||||
sta UD.IO.Cmd,x
|
||||
lda #UD.IO.Cmd.NetPeek
|
||||
jsr IO.Exec
|
||||
bcs READWRITE.99
|
||||
|
||||
|
||||
lda UD.IO.RData,x
|
||||
ldy #S.IOCTL.BYTECNT
|
||||
sta (ZPIOCTL),y
|
||||
pha
|
||||
eor #$ff
|
||||
sta Counter
|
||||
|
||||
lda UD.IO.RData,x
|
||||
iny
|
||||
sta (ZPIOCTL),y
|
||||
pha
|
||||
eor #$ff
|
||||
sta Counter+1
|
||||
|
||||
pla
|
||||
ply
|
||||
bne .1
|
||||
|
||||
tax
|
||||
ora Counter
|
||||
beq READWRITE.9
|
||||
|
||||
.1 >SYSCALL2 GetMem
|
||||
>LDYA Counter
|
||||
>SYSCALL2 GetMem
|
||||
bcs READWRITE.99
|
||||
|
||||
>STYA ZPBufPtr
|
||||
phx
|
||||
stx .8+1
|
||||
phy
|
||||
ldy #S.IOCTL.BUFPTR+1
|
||||
sta (ZPIOCTL),y
|
||||
@ -374,6 +363,22 @@ READ php
|
||||
|
||||
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
|
||||
|
||||
.2 inc Counter
|
||||
@ -390,7 +395,7 @@ READ php
|
||||
inc ZPBufPtr+1
|
||||
bra .2
|
||||
|
||||
.8 pla hMem
|
||||
.8 lda #$ff SELF MODIFIED
|
||||
|
||||
plp
|
||||
clc
|
||||
@ -408,9 +413,6 @@ WRITE php
|
||||
|
||||
ldx DEVSLOTx0
|
||||
|
||||
lda #UD.IO.Cmd.NetSend
|
||||
sta UD.IO.Cmd,x
|
||||
|
||||
ldy #S.IOCTL.BYTECNT
|
||||
lda (ZPIOCTL),y
|
||||
sta UD.IO.WData,x
|
||||
@ -447,20 +449,54 @@ WRITE php
|
||||
inc ZPBufPtr+1
|
||||
bra .1
|
||||
|
||||
.8 jsr IO.Exec
|
||||
.8 lda #UD.IO.Cmd.NetSend
|
||||
|
||||
jsr IO.Exec
|
||||
bcs WRITE.99
|
||||
|
||||
plp
|
||||
clc
|
||||
rts
|
||||
|
||||
|
||||
WRITE.99 lda #MLI.E.IO
|
||||
plp
|
||||
sec
|
||||
rts
|
||||
rts
|
||||
*--------------------------------------
|
||||
IO.Exec lda #0
|
||||
sta UD.IO.UnitNum,x
|
||||
IO.GetStatus stz DCB+S.DCB.NIC.LINK
|
||||
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
|
||||
|
||||
@ -484,7 +520,7 @@ DIB .DA #0
|
||||
DCB .DA #S.DCB.T.NIC
|
||||
.BS 1 FLAGS
|
||||
.BS 1 LINK
|
||||
.DA #S.DCB.NIC.SPEED.10
|
||||
.BS 1 SPEED
|
||||
.HS 000000000000 MAC
|
||||
.BS 12 IP/MASK/GW
|
||||
*--------------------------------------
|
||||
|
@ -66,6 +66,7 @@ S.FI.T.TXT .EQ $04
|
||||
S.FI.T.BIN .EQ $06
|
||||
S.FI.T.DIR .EQ $0F
|
||||
S.FI.T.ASM .EQ $FA
|
||||
S.FI.T.BAS .EQ $FC
|
||||
S.FI.T.PIX .EQ $CB
|
||||
S.FI.T.FON .EQ $CC
|
||||
S.FI.T.PAK .EQ $CF
|
||||
@ -117,6 +118,10 @@ S.FIEX.ACL.MOD .EQ 46
|
||||
*
|
||||
S.FIEX .EQ 48
|
||||
*--------------------------------------
|
||||
TBX.MemReset .EQ 0
|
||||
TBX.EnumBlk .EQ 2
|
||||
TBX.EnumNext .EQ 4
|
||||
*--------------------------------------
|
||||
MLI .EQ $BF00
|
||||
*JSPARE .EQ $BF03
|
||||
DATETIME .EQ $BF06
|
||||
|
@ -3,8 +3,7 @@ NEW
|
||||
*--------------------------------------
|
||||
* NewBitmap (hWND, pBM, X, Y)
|
||||
*--------------------------------------
|
||||
BITMAP.New >PULLW DY
|
||||
>PULLW DX
|
||||
BITMAP.New jsr OBJ.PullDXDY
|
||||
>PULLW ZPBMPtr
|
||||
jsr OBJ.PullHWND
|
||||
|
||||
|
@ -9,11 +9,7 @@ BUT.New lda #S.OBJ.T.BUT
|
||||
|
||||
phx hOBJ
|
||||
|
||||
ldy #S.OBJ.Y1
|
||||
jsr OBJ.PullWordAtY
|
||||
|
||||
ldy #S.OBJ.X1
|
||||
jsr OBJ.PullWordAtY
|
||||
jsr OBJ.PullY1X1
|
||||
|
||||
ldy #S.BUT.ID
|
||||
jsr OBJ.PullWordAtY
|
||||
|
@ -151,7 +151,8 @@ CB.SrcWCenterH ldy #S.OBJ.W
|
||||
tax
|
||||
pla
|
||||
ror
|
||||
clc
|
||||
*--------------------------------------
|
||||
CB.AddAX2X1 clc
|
||||
adc 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
|
||||
|
||||
lda CLIP.Cache+S.CB.X1
|
||||
clc
|
||||
adc TmpW
|
||||
sta CLIP.Cache+S.CB.X1
|
||||
ldy #S.CB.X1
|
||||
jsr CLIP.AddTmpW2ClipCacheY
|
||||
|
||||
lda CLIP.Cache+S.CB.X1+1
|
||||
adc TmpW+1
|
||||
sta CLIP.Cache+S.CB.X1+1
|
||||
ldy #S.CB.SrcX
|
||||
jsr CLIP.AddTmpW2ClipCacheY
|
||||
|
||||
lda CLIP.Cache+S.CB.SrcX
|
||||
clc
|
||||
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
|
||||
ldy #S.CB.SrcW
|
||||
jsr CLIP.SubTmpW2ClipCacheY
|
||||
bcc CLIP.Text.9
|
||||
*--------------------------------------
|
||||
.2 lda CLIP.Cache+S.CB.X2
|
||||
@ -170,14 +152,8 @@ CLIP.BitBltX lda CLIP.Screen+S.RECT.X1,x
|
||||
|
||||
.3 bmi .4
|
||||
|
||||
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
|
||||
ldy #S.CB.SrcW
|
||||
jsr CLIP.SubTmpW2ClipCacheY
|
||||
bcc .9
|
||||
*--------------------------------------
|
||||
.4 lda CLIP.Screen+S.RECT.Y1,x
|
||||
@ -194,32 +170,14 @@ CLIP.BitBltX lda CLIP.Screen+S.RECT.X1,x
|
||||
|
||||
.5 bmi .6
|
||||
|
||||
lda CLIP.Cache+S.CB.Y1
|
||||
clc
|
||||
adc TmpW
|
||||
sta CLIP.Cache+S.CB.Y1
|
||||
ldy #S.CB.Y1
|
||||
jsr CLIP.AddTmpW2ClipCacheY
|
||||
|
||||
lda CLIP.Cache+S.CB.Y1+1
|
||||
adc TmpW+1
|
||||
sta CLIP.Cache+S.CB.Y1+1
|
||||
|
||||
lda CLIP.Cache+S.CB.SrcY
|
||||
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
|
||||
ldy #S.CB.SrcY
|
||||
jsr CLIP.AddTmpW2ClipCacheY
|
||||
|
||||
ldy #S.CB.SrcH
|
||||
jsr CLIP.SubTmpW2ClipCacheY
|
||||
bcc .9
|
||||
*--------------------------------------
|
||||
.6 lda CLIP.Cache+S.CB.Y2
|
||||
@ -236,14 +194,8 @@ CLIP.BitBltX lda CLIP.Screen+S.RECT.X1,x
|
||||
|
||||
.7 bmi .8
|
||||
|
||||
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
|
||||
ldy #S.CB.SrcH
|
||||
jsr CLIP.SubTmpW2ClipCacheY
|
||||
bcc .9
|
||||
|
||||
.8 clc
|
||||
@ -466,6 +418,30 @@ CLIP.Rect.Overlap
|
||||
.9 sec
|
||||
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
|
||||
SAVE usr/src/lib/libgui.s.clip
|
||||
LOAD usr/src/lib/libgui.s
|
||||
|
@ -3,8 +3,7 @@ NEW
|
||||
*--------------------------------------
|
||||
* NewLabel(HWND, pTEXT, wX, wY)
|
||||
*--------------------------------------
|
||||
LABEL.New >PULLW DY
|
||||
>PULLW DX
|
||||
LABEL.New jsr OBJ.PullDXDY
|
||||
>PULLW ZPPtr1
|
||||
jsr OBJ.PullHWND
|
||||
|
||||
|
@ -3,8 +3,7 @@ NEW
|
||||
*--------------------------------------
|
||||
* NewMenu(pMENU, x, y)
|
||||
*--------------------------------------
|
||||
MENU.New >PULLW DY
|
||||
>PULLW DX
|
||||
MENU.New jsr OBJ.PullDXDY
|
||||
>PULLYA
|
||||
|
||||
MENU.New.I >STYA ZPPtr1 MENU definition
|
||||
@ -249,7 +248,7 @@ MENU.SetMenuSizePos
|
||||
lda DY
|
||||
sta (ZPObjPtr),y
|
||||
iny
|
||||
lda DY+1
|
||||
lda DY+1
|
||||
sta (ZPObjPtr),y
|
||||
|
||||
ldy #S.MENU.iW
|
||||
@ -481,9 +480,9 @@ MENU.Enter >LDYA L.WND.Screen
|
||||
>PUSHW Counter Y1
|
||||
|
||||
jsr MENU.New
|
||||
bcs .9
|
||||
|
||||
jmp MENU.Draw
|
||||
bcc MENU.Draw
|
||||
|
||||
rts
|
||||
*--------------------------------------
|
||||
.5 lda MSG+S.MSG.S
|
||||
bit #S.XY.S.CLK
|
||||
@ -618,16 +617,12 @@ MENU.DrawMItem jsr MENU.ResetX1Y1X2
|
||||
ldx hSYSFON
|
||||
jsr DRAW.YAText
|
||||
|
||||
ldy #S.MENU.tW
|
||||
ldy #S.MENU.tW+1
|
||||
lda (ZPObjPtr),y
|
||||
clc
|
||||
adc CB.Cache+S.CB.X1
|
||||
sta CB.Cache+S.CB.X1
|
||||
|
||||
iny
|
||||
tax
|
||||
dey
|
||||
lda (ZPObjPtr),y
|
||||
adc CB.Cache+S.CB.X1+1
|
||||
sta CB.Cache+S.CB.X1+1
|
||||
jsr CB.AddAX2X1
|
||||
*--------------------------------------
|
||||
lda (ZPPtr1)
|
||||
cmp #S.MITEM.T.ITEM
|
||||
@ -642,16 +637,13 @@ MENU.DrawMItem jsr MENU.ResetX1Y1X2
|
||||
.4 cmp #S.MITEM.T.SUBMENU
|
||||
bne .8
|
||||
|
||||
ldy #S.MENU.kW
|
||||
ldy #S.MENU.kW+1
|
||||
lda (ZPObjPtr),y
|
||||
clc
|
||||
adc CB.Cache+S.CB.X1
|
||||
sta CB.Cache+S.CB.X1
|
||||
|
||||
iny
|
||||
tax
|
||||
dey
|
||||
lda (ZPObjPtr),y
|
||||
adc CB.Cache+S.CB.X1+1
|
||||
sta CB.Cache+S.CB.X1+1
|
||||
|
||||
jsr CB.AddAX2X1
|
||||
|
||||
ldx #BM.ID.RIGHT
|
||||
jmp DRAW.xBM
|
||||
|
@ -97,6 +97,10 @@ OBJ.GetPropAtY lda (ZPObjPtr),y
|
||||
|
||||
rts
|
||||
*--------------------------------------
|
||||
OBJ.PullDXDY >PULLW DY
|
||||
>PULLW DX
|
||||
rts
|
||||
*--------------------------------------
|
||||
OBJ.SetDXDYX1Y1 ldx #3
|
||||
ldy #S.OBJ.X1+3
|
||||
|
||||
@ -178,6 +182,11 @@ OBJ.SetAXAtY sta (ZPObjPtr),y
|
||||
sta (ZPObjPtr),y
|
||||
rts
|
||||
*--------------------------------------
|
||||
OBJ.PullY1X1 ldy #S.OBJ.Y1
|
||||
jsr OBJ.PullWordAtY
|
||||
|
||||
ldy #S.OBJ.X1
|
||||
*--------------------------------------
|
||||
OBJ.PullWordAtY >PULLA
|
||||
sta (ZPObjPtr),y
|
||||
iny
|
||||
|
@ -175,7 +175,7 @@ PTR.ShowRect.I lda #S.CB.CMD.HLINE
|
||||
sta CLIP.Cache+S.CB.M
|
||||
lda #C.WHITE
|
||||
sta CLIP.Cache+S.CB.COLOR
|
||||
>DEBUG
|
||||
* >DEBUG
|
||||
ldx #5 X1,Y1,X2
|
||||
|
||||
.1 lda PTR.Rect+S.RECT.X1,x
|
||||
|
@ -146,11 +146,7 @@ WND.New ldy WND.Stack.Top
|
||||
ldy #S.OBJ.W
|
||||
jsr OBJ.PullWordAtY
|
||||
|
||||
ldy #S.OBJ.Y1
|
||||
jsr OBJ.PullWordAtY
|
||||
|
||||
ldy #S.OBJ.X1
|
||||
jsr OBJ.PullWordAtY
|
||||
jsr OBJ.PullY1X1
|
||||
|
||||
>PULLA
|
||||
bit #S.WND.F.RESIZE
|
||||
@ -576,15 +572,10 @@ WND.DrawTitleBar
|
||||
ldx #BM.ID.MIN
|
||||
jsr DRAW.xBM
|
||||
|
||||
.3 lda CB.Cache+S.CB.X1
|
||||
clc
|
||||
adc #16
|
||||
sta CB.Cache+S.CB.X1
|
||||
bcc .31
|
||||
.3 lda #16
|
||||
jsr CB.AddA2X1
|
||||
|
||||
inc CB.Cache+S.CB.X1+1
|
||||
|
||||
.31 ldy #S.OBJ.F
|
||||
ldy #S.OBJ.F
|
||||
lda (ZPWNDPtr),y
|
||||
bit #S.WND.F.MAX
|
||||
beq .4
|
||||
@ -592,15 +583,10 @@ WND.DrawTitleBar
|
||||
ldx #BM.ID.MAX
|
||||
jsr DRAW.xBM
|
||||
|
||||
.4 lda CB.Cache+S.CB.X1
|
||||
clc
|
||||
adc #16
|
||||
sta CB.Cache+S.CB.X1
|
||||
bcc .41
|
||||
|
||||
inc CB.Cache+S.CB.X1+1
|
||||
|
||||
.41 ldy #S.OBJ.F
|
||||
.4 lda #16
|
||||
jsr CB.AddA2X1
|
||||
|
||||
ldy #S.OBJ.F
|
||||
lda (ZPWNDPtr),y
|
||||
bit #S.WND.F.CLOSE
|
||||
beq .8
|
||||
|
@ -332,7 +332,7 @@ SkipStrZPtr2 ldy #$ff
|
||||
.INB usr/src/lib/libgui.s.but
|
||||
.INB usr/src/lib/libgui.s.cb
|
||||
.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.fon
|
||||
.INB usr/src/lib/libgui.s.label
|
||||
|
@ -151,7 +151,7 @@ GP.MLICONT sec
|
||||
*--------------------------------------
|
||||
GP.TOOLBOX bit RRAMWRAMBNK1
|
||||
bit RRAMWRAMBNK1
|
||||
jsr XDOS.TOOLBOX
|
||||
jsr XDOS.TBX
|
||||
bit RROMBNK2
|
||||
rts
|
||||
*--------------------------------------
|
||||
|
@ -5,50 +5,40 @@ VolListPtr .EQ $65
|
||||
*
|
||||
SelectedIndex .EQ $67 name counter
|
||||
filecount .EQ $68 # of displayable files in directory
|
||||
FilenameLen .EQ $69 length of filename
|
||||
|
||||
bInSubDir .EQ $6B directory level
|
||||
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
|
||||
*--------------------------------------
|
||||
SEL1.PathBuf .EQ $280
|
||||
SEL1.BSPathBuf .EQ $2C0
|
||||
*--------------------------------------
|
||||
SEL1.FileBuf .EQ $1800 1k
|
||||
SEL1.DirEntry .EQ $1C00 512b
|
||||
SEL1.DirBlk .EQ $1C00 512b
|
||||
SEL1.filetypes .EQ $1F00
|
||||
SEL1.Filenames .EQ $2000
|
||||
*--------------------------------------
|
||||
SEL1.START cld
|
||||
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
|
||||
jsr $C300 initialize 80 column text card
|
||||
|
||||
* set up memory bitmap in global page
|
||||
|
||||
ldx #0
|
||||
jsr GP.TOOLBOX reset MEMTABL
|
||||
ldx #TBX.MemReset
|
||||
jsr GP.TOOLBOX
|
||||
|
||||
lda #$02
|
||||
sta SEL1.SetMarkP init set mark parms pcount.
|
||||
stz SEL1.BSPathBuf
|
||||
*--------------------------------------
|
||||
ldx DEVCNT
|
||||
|
||||
|
||||
.1 lda DEVLST,x
|
||||
and #$F0
|
||||
cmp DEVNUM
|
||||
beq SEL1.GetVol
|
||||
|
||||
|
||||
dex
|
||||
bra .1
|
||||
*--------------------------------------
|
||||
@ -57,7 +47,7 @@ SEL1.NextVol ldx VolListPtr get device list pointer.
|
||||
|
||||
ldx DEVCNT get device count.
|
||||
inx
|
||||
|
||||
|
||||
.1 dex
|
||||
lda DEVLST,x get unit number from list.
|
||||
*--------------------------------------
|
||||
@ -69,20 +59,18 @@ SEL1.GetVol stx VolListPtr
|
||||
bcs SEL1.NextVol error check.
|
||||
|
||||
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.
|
||||
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.
|
||||
tax name length in x.
|
||||
|
||||
SEL1.OpenDir stx pbuf save the name length
|
||||
SEL1.OpenDir stx SEL1.PathBuf save the name length
|
||||
lda #'/'
|
||||
sta pbuf+1 slash before and
|
||||
sta pbuf,x after name.
|
||||
stz pbuf+1,x now "/VOLNAME/0
|
||||
sta SEL1.PathBuf+1 slash before and
|
||||
sta SEL1.PathBuf,x after name.
|
||||
|
||||
jsr MLI
|
||||
.DA #MLIOPEN
|
||||
@ -94,149 +82,103 @@ SEL1.OpenDir stx pbuf save the name length
|
||||
|
||||
jsr bell1 no, generate bell tone
|
||||
jsr SEL1.FullPath.. and stay at same level.
|
||||
stx pbuf
|
||||
jmp keyloop
|
||||
stx SEL1.PathBuf
|
||||
jmp SEL1.KeyLoop
|
||||
*--------------------------------------
|
||||
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
|
||||
lda /SEL1.DirEntry
|
||||
lda /SEL1.DirBlk
|
||||
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
|
||||
bcs SEL1.CloseDir1
|
||||
stz SEL1.ReadP+4 512 bytes
|
||||
lda #2
|
||||
sta SEL1.ReadP+5
|
||||
|
||||
ldx #$03
|
||||
|
||||
.1 lda SEL1.DirEntry+$23,x copy directory info
|
||||
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
|
||||
SEL1.EnumBlk jsr MLI
|
||||
.DA #MLIREAD
|
||||
.DA SEL1.ReadP
|
||||
bcs SEL1.CloseDir
|
||||
|
||||
jsr SEL1.ReadEntry
|
||||
SEL1.CloseDir1 bcs SEL1.CloseDir
|
||||
lda /SEL1.DirBlk
|
||||
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.
|
||||
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
|
||||
beq SEL1.CloseDir
|
||||
|
||||
stx filecount
|
||||
|
||||
sta SEL1.BSPathBuf,x
|
||||
|
||||
cpy #SEL1.BS.L
|
||||
bne .1
|
||||
|
||||
stx SEL1.BSPathBuf
|
||||
|
||||
ldx SEL1.PathBuf
|
||||
|
||||
.2 lda SEL1.PathBuf,x
|
||||
sta SEL1.BSPathBuf,x
|
||||
dex
|
||||
bne .2
|
||||
|
||||
sta SEL1.filetypes,x else store filetype in zero page
|
||||
jsr SEL1.SetFNPtrX and go set up storage area.
|
||||
|
||||
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.
|
||||
.8 inc filecount
|
||||
bne SEL1.EnumDirNext
|
||||
*--------------------------------------
|
||||
SEL1.CloseDir jsr MLI close directory file
|
||||
.DA #MLICLOSE
|
||||
.DA SEL1.CloseP
|
||||
bcs L5E26 error.
|
||||
|
||||
jsr settxt use full screen for windows
|
||||
jsr home
|
||||
|
||||
lda #$17 cursor at bottom of screen.
|
||||
jsr TABV set vertical position.
|
||||
|
||||
lda #$14 horizontal position.
|
||||
sta ch
|
||||
|
||||
ldy #0 Footer
|
||||
jsr SET1.MsgOutY
|
||||
ldy #SEL1.RetIcon-SEL1.Strings
|
||||
jsr SEL1.IconOutY
|
||||
|
||||
ldy #SEL1.Footer-SEL1.Strings
|
||||
jsr SEL1.MsgOutY
|
||||
|
||||
lda #$99
|
||||
jsr cout cursor to upper/left.
|
||||
|
||||
ldx #$00
|
||||
ldy SEL1.PathBuf
|
||||
|
||||
.1 lda pbuf+1,x
|
||||
beq .2
|
||||
.1 lda SEL1.PathBuf+1,x
|
||||
|
||||
jsr SEL1.COut
|
||||
inx
|
||||
dey
|
||||
bne .1
|
||||
|
||||
.2 stz SelectedIndex
|
||||
stz ScrollIndex init top filename index.
|
||||
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 ?
|
||||
bcc .3 no.
|
||||
@ -245,17 +187,15 @@ SEL1.CloseDir jsr MLI close directory file
|
||||
|
||||
.3 lda #2 set window dimensions
|
||||
sta wndtop
|
||||
sta wndlft
|
||||
|
||||
lda #22
|
||||
sta wndwdth
|
||||
sta wndbot
|
||||
|
||||
.4 phx
|
||||
|
||||
|
||||
jsr SEL1.PrintFN
|
||||
inc SelectedIndex
|
||||
|
||||
|
||||
plx
|
||||
dex
|
||||
bne .4
|
||||
@ -263,7 +203,7 @@ SEL1.CloseDir jsr MLI close directory file
|
||||
stz SelectedIndex
|
||||
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
|
||||
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
|
||||
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
|
||||
inx add one.
|
||||
cpx filecount
|
||||
@ -290,55 +230,62 @@ dnarrow jsr SEL1.PrintFN print old name in normal.
|
||||
inc ScrollIndex update offset index
|
||||
lda #$17 else scroll up a line.
|
||||
|
||||
L5EA7 jsr cout
|
||||
SEL1.Scroll jsr cout
|
||||
|
||||
L5EAA jsr setinv set inverse text mode.
|
||||
jsr SEL1.PrintFN output last filename.
|
||||
L5EAA jsr SEL1.PrintFNInv output last filename.
|
||||
*--------------------------------------
|
||||
keyloop lda kbd get keyboard input.
|
||||
bpl keyloop loop until key pressed.
|
||||
SEL1.KeyLoop lda kbd get keyboard input.
|
||||
bpl SEL1.KeyLoop loop until key pressed.
|
||||
|
||||
sta KBDSTROBE clear strobe.
|
||||
jsr setnorm set normal text mode.
|
||||
|
||||
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 ?
|
||||
beq L5EF4 then run selected file.
|
||||
beq SEL1.CR then run selected file.
|
||||
|
||||
cmp #$8A down ?
|
||||
beq dnarrow move down a name.
|
||||
beq SEL1.Down
|
||||
|
||||
cmp #$8B up ?
|
||||
beq uparrow move up a name.
|
||||
beq SEL1.Up
|
||||
|
||||
L5ECB cmp #$89 tab ?
|
||||
.1 cmp #$89 tab ?
|
||||
beq L5EED new volume.
|
||||
|
||||
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 ..
|
||||
jmp SEL1.OpenDir
|
||||
*--------------------------------------
|
||||
L5EED jmp SEL1.NextVol set up new unit number.
|
||||
*--------------------------------------
|
||||
L5EF4 ldy SelectedIndex
|
||||
SEL1.CR ldy SelectedIndex
|
||||
lda SEL1.filetypes,y get file type.
|
||||
|
||||
jsr SEL1.CheckType
|
||||
bmi SEL1.KeyLoop
|
||||
|
||||
cmp #S.FI.T.DIR
|
||||
bne .1 branch if directory.
|
||||
bne .1
|
||||
|
||||
jsr SEL1.SetFullPath
|
||||
bcs L5EED
|
||||
|
||||
inx
|
||||
|
||||
jmp SEL1.OpenDir get new directory info.
|
||||
jmp SEL1.OpenDir1
|
||||
|
||||
.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
|
||||
|
||||
jsr MLI open file
|
||||
@ -346,15 +293,15 @@ L5EF4 ldy SelectedIndex
|
||||
.DA SEL1.OpenP
|
||||
bcs L5EED
|
||||
|
||||
lda SEL1.OpenP+5 move reference number
|
||||
sta SEL1.ReadP+1 for read.
|
||||
|
||||
lda #$20
|
||||
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.
|
||||
jsr MLI close file. ignore any error from close
|
||||
.DA #MLICLOSE
|
||||
@ -362,23 +309,29 @@ L5EF4 ldy SelectedIndex
|
||||
plp restore status from read.
|
||||
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.
|
||||
lda #$95 ctrl-u
|
||||
jsr cout turn off 80 columns.
|
||||
|
||||
jmp $2000 execute selected system file.
|
||||
*--------------------------------------
|
||||
SET1.MsgOutY lda SEL1.Footer,y
|
||||
beq .8
|
||||
SEL1.PrintFN lda #$0E
|
||||
.HS 2C BIT ABS
|
||||
SEL1.PrintFNInv lda #$0F
|
||||
pha
|
||||
|
||||
jsr cout
|
||||
iny
|
||||
bne SET1.MsgOutY
|
||||
|
||||
.8 rts
|
||||
*--------------------------------------
|
||||
SEL1.PrintFN ldx SelectedIndex
|
||||
ldx SelectedIndex
|
||||
txa
|
||||
sec
|
||||
sbc ScrollIndex calculate line # to display name
|
||||
@ -386,49 +339,43 @@ SEL1.PrintFN ldx SelectedIndex
|
||||
inc
|
||||
jsr TABV set vertical position.
|
||||
|
||||
lda SEL1.filetypes,x get filetype (x is unchanged by tabv).
|
||||
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
|
||||
lda #$01
|
||||
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.SetFNPtrX calc name location.
|
||||
|
||||
ldy #0
|
||||
|
||||
.2 iny
|
||||
lda (FilenamePtr),y get name character.
|
||||
jsr SEL1.COut put on screen.
|
||||
cpy FilenameLen end of name ?
|
||||
tya
|
||||
cmp (FilenamePtr) end of name ?
|
||||
bcc .2 no.
|
||||
|
||||
SEL1.SPOut lda #' ' SPACE
|
||||
|
||||
SEL1.COut ora #$80 set high bit.
|
||||
jmp cout output to screen.
|
||||
|
||||
SEL1.ReadEntry jsr SEL1.Read
|
||||
bcs SEL1.Read.RTS
|
||||
|
||||
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
|
||||
*.3 jsr SEL1.SPOut
|
||||
* iny
|
||||
* cpy #16
|
||||
* bne .3
|
||||
|
||||
jsr SEL1.SPOut
|
||||
jmp setnorm set normal text mode.
|
||||
*--------------------------------------
|
||||
SEL1.SetFullPath
|
||||
jsr MLI
|
||||
@ -437,101 +384,159 @@ SEL1.SetFullPath
|
||||
bcs .9
|
||||
|
||||
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
|
||||
|
||||
.1 iny start at y = 1.
|
||||
lda (FilenamePtr),y get character of name.
|
||||
inx
|
||||
sta pbuf,x store in prefix buffer.
|
||||
cpy FilenameLen check length of name.
|
||||
bcc .1 loop until all transferred.
|
||||
sta SEL1.PathBuf,x store in prefix buffer.
|
||||
tya
|
||||
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
|
||||
|
||||
clc
|
||||
|
||||
* clc
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
SEL1.FullPath.. ldx pbuf
|
||||
SEL1.FullPath.. ldx SEL1.PathBuf
|
||||
|
||||
.1 dex
|
||||
lda pbuf,x
|
||||
lda SEL1.PathBuf,x
|
||||
cmp #'/'
|
||||
bne .1
|
||||
|
||||
cpx #$01
|
||||
bne .9
|
||||
|
||||
ldx pbuf
|
||||
ldx SEL1.PathBuf
|
||||
|
||||
.9 dec bInSubDir
|
||||
|
||||
rts
|
||||
*--------------------------------------
|
||||
SEL1.SetFNPtr ldx filecount
|
||||
|
||||
SEL1.SetFNPtrX lda /SEL1.Filenames/16
|
||||
sta FilenamePtr+1
|
||||
txa
|
||||
|
||||
|
||||
ldx #4
|
||||
|
||||
.1 asl
|
||||
rol FilenamePtr+1
|
||||
dex
|
||||
bne .1
|
||||
|
||||
|
||||
sta FilenamePtr
|
||||
tay
|
||||
lda FilenamePtr+1
|
||||
|
||||
lda (FilenamePtr)
|
||||
sta FilenameLen
|
||||
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
|
||||
*--------------------------------------
|
||||
SEL1.Footer .AS -"RETURN:Select,TAB:Chg Vol,ESC:Back"
|
||||
.HS 00
|
||||
|
||||
SEL1.DirIcon .HS 0F inverse control code
|
||||
.HS 1B enable mousetext
|
||||
.AS -"XY" folder characters
|
||||
.HS 18 disable mousetext
|
||||
.HS 0E normal control code
|
||||
.HS 00
|
||||
SEL1.BS .AS "BASIC.SYSTEM"
|
||||
SEL1.BS.L .EQ *-SEL1.BS
|
||||
*--------------------------------------
|
||||
SEL1.ValidTypes .DA #S.FI.T.DIR
|
||||
.DA #S.FI.T.SYS
|
||||
.DA #S.FI.T.BIN
|
||||
.DA #S.FI.T.BAS
|
||||
SEL1.ValidTypes.L .EQ *-SEL1.ValidTypes
|
||||
*--------------------------------------
|
||||
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
|
||||
.DA pbuf pathname
|
||||
.DA SEL1.PathBuf pathname
|
||||
.DA SEL1.FileBuf file buffer
|
||||
.HS 01 reference number
|
||||
*--------------------------------------
|
||||
SEL1.CloseP .DA #1 Param Count
|
||||
.HS 01 reference number.
|
||||
.HS 01 reference number
|
||||
*--------------------------------------
|
||||
SEL1.OnLineP .DA #2 Param Count
|
||||
.HS 60 unit number, default = s6, d1
|
||||
.DA pbuf+1 data buffer
|
||||
.DA SEL1.PathBuf+1 data buffer
|
||||
*--------------------------------------
|
||||
SEL1.SetPrefixP .DA #1 Param Count
|
||||
.DA pbuf pathname
|
||||
.DA SEL1.PathBuf pathname
|
||||
*--------------------------------------
|
||||
SEL1.ReadP .DA #4 Param Count
|
||||
.HS 01 reference number
|
||||
*--------------------------------------
|
||||
.LIST ON
|
||||
SEL1.LEN .EQ *-SEL1.START
|
||||
.LIST OFF
|
||||
*--------------------------------------
|
||||
.DUMMY
|
||||
.BS 1 RefNum
|
||||
.BS 2 MemPtr
|
||||
.BS 2 requested length
|
||||
.BS 2 actual length
|
||||
|
||||
SEL1.SetMarkP .BS 1 Param Count
|
||||
.BS 1 RefNum
|
||||
.BS 3 FPos
|
||||
.BS 2 read length
|
||||
.ED
|
||||
*--------------------------------------
|
||||
MAN
|
||||
|
@ -2,11 +2,11 @@ NEW
|
||||
AUTO 3,1
|
||||
*--------------------------------------
|
||||
XDOS.DeallocAX stx bmcnt high address of block.
|
||||
pha save low address.
|
||||
* pha save low address.
|
||||
ldx vcbptr check that bitmap block address is
|
||||
lda VCBs+VCB.TBLK+1,x valid given the total # of blocks
|
||||
cmp bmcnt on the volume.
|
||||
pla
|
||||
ldy VCBs+VCB.TBLK+1,x valid given the total # of blocks
|
||||
cpy bmcnt on the volume.
|
||||
* pla
|
||||
bcc L3C8C branch if invalid
|
||||
|
||||
tax
|
||||
@ -15,12 +15,19 @@ XDOS.DeallocAX stx bmcnt high address of block.
|
||||
lda whichbit,y (shifting takes 7 bytes, but is slower)
|
||||
sta nofree save bit pattern.
|
||||
txa low block address.
|
||||
lsr bmcnt
|
||||
ror get pointer to byte in block that
|
||||
lsr bmcnt represents the block address.
|
||||
ror
|
||||
lsr bmcnt
|
||||
|
||||
ldx #3
|
||||
|
||||
.1 lsr bmcnt
|
||||
ror
|
||||
dex
|
||||
bne .1
|
||||
|
||||
* lsr bmcnt
|
||||
* ror
|
||||
* lsr bmcnt
|
||||
* ror
|
||||
|
||||
sta bmptr save pointer.
|
||||
lsr bmcnt transfer bit which is page of bitmap
|
||||
rol half
|
||||
@ -100,12 +107,14 @@ L3CB9 sty bmptr save index pointer to valid bit group.
|
||||
lda basval prep for block address calculation
|
||||
sta scrtch+1
|
||||
tya address of bit pattern.
|
||||
asl multiply this and basval by 8
|
||||
rol scrtch+1
|
||||
asl
|
||||
rol scrtch+1
|
||||
asl
|
||||
|
||||
ldx #3
|
||||
|
||||
.1 asl multiply this and basval by 8
|
||||
rol scrtch+1
|
||||
dex
|
||||
bne .1
|
||||
|
||||
tax low address within 7 of actual address
|
||||
sec
|
||||
lda half
|
||||
@ -296,49 +305,9 @@ XDOS.UnpackGBuf jsr XDOS.ZPT.InitGBuf
|
||||
|
||||
ldx h_maxent
|
||||
|
||||
XDOS.UnpackZPT .EQ *
|
||||
|
||||
.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
|
||||
.1 jsr XDOS.ZPT.Unpack
|
||||
|
||||
.6 dex
|
||||
dex
|
||||
beq .8
|
||||
|
||||
jsr XDOS.ZPT.Next
|
||||
@ -403,27 +372,7 @@ XDOS.PackGBuf jsr XDOS.ZPT.InitGBuf
|
||||
bne .1
|
||||
|
||||
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
|
||||
*--------------------------------------
|
||||
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 ?
|
||||
|
||||
lda #MLI.E.EOF something is wrong with directory file!
|
||||
L3FD6 sec error.
|
||||
rts
|
||||
|
||||
sec error.
|
||||
|
||||
L3FD6 rts
|
||||
|
||||
L3FD8 sta bloknml+1
|
||||
*--------------------------------------
|
||||
|
@ -179,7 +179,7 @@ L4310 lda (sos),y move data to user's buffer
|
||||
bcs tstnewl test for newline 1st !
|
||||
|
||||
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.
|
||||
iny page crossed ?
|
||||
@ -191,16 +191,20 @@ L4319 dex dec # of bytes left to move.
|
||||
bne L4329
|
||||
|
||||
inc tposhi
|
||||
|
||||
L4329 inc sos+1 and sos buffer high address.
|
||||
eor datptr+1 (carry is undisturbed)
|
||||
beq L4310 branch if more to read in buffer.
|
||||
|
||||
clv indicate not finished.
|
||||
bvc L4360 always.
|
||||
|
||||
L4332 lda rwreqh
|
||||
beq L4350 branch if request is satisfied.
|
||||
|
||||
iny done with this block of data ?
|
||||
bne L4340 no, adjust high byte of request.
|
||||
|
||||
lda sos+1 maybe, check for end of block buffer.
|
||||
eor datptr+1 (don't disturb carry).
|
||||
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 ?
|
||||
bne L4462 yes, continue...
|
||||
|
||||
L445E lda #$4E illegal access error.
|
||||
L445E lda #MLI.E.LOCKED illegal access error.
|
||||
bne L44A2
|
||||
|
||||
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.
|
||||
*--------------------------------------
|
||||
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
|
||||
|
||||
.1 sta gbuf+4,x
|
||||
|
@ -1,160 +1,6 @@
|
||||
NEW
|
||||
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
|
||||
* been pre-selected and the 'gbuf' may be used.
|
||||
*
|
||||
@ -193,7 +39,7 @@ detree lda stortyp which kind of tree ?
|
||||
|
||||
L4C46 lda dsap
|
||||
ora dtree
|
||||
bne L4CC2
|
||||
bne L4CC2
|
||||
|
||||
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.
|
||||
|
||||
shrink ldx firstbh first deallocate top index block
|
||||
txa
|
||||
pha
|
||||
phx
|
||||
lda firstbl
|
||||
pha save block address of this index block.
|
||||
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.
|
||||
|
||||
jsr swapme
|
||||
jsr swapme
|
||||
|
||||
L4DB0 iny next block address.
|
||||
bne L4D96 if more to deallocate or test.
|
||||
|
||||
clc no error.
|
||||
|
||||
L4DB4 tax save error code, if any.
|
||||
pla restore blocknm (16 bit)
|
||||
sta bloknml+1
|
||||
@ -434,11 +280,11 @@ L4DCB sta gbuf+$100,y save index high
|
||||
txa
|
||||
sta gbuf,y save index low
|
||||
rts done.
|
||||
|
||||
*--------------------------------------
|
||||
* MEMMGR memory manager
|
||||
*
|
||||
* allocate buffer in memory tables
|
||||
|
||||
*--------------------------------------
|
||||
alcbuffr ldy #$04 index to user specified buffer.
|
||||
alcbufr1 lda (A3L),y this buffer must be on a page boundary.
|
||||
tax save for validation.
|
||||
@ -591,17 +437,17 @@ XDOS.SetBuf ldy #$03
|
||||
|
||||
ldy #$00
|
||||
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.
|
||||
iny
|
||||
bne L4EB8
|
||||
bne .1
|
||||
|
||||
inc datptr+1
|
||||
inc usrbuf+1
|
||||
dex
|
||||
bpl L4EB8
|
||||
XDOS.SetBuf.CLCRTS
|
||||
bpl .1
|
||||
XDOS.SetBuf.CLCRTS
|
||||
clc no errors
|
||||
L4EC7 rts
|
||||
*--------------------------------------
|
||||
@ -627,8 +473,8 @@ XDOS.IsValidFirstChar
|
||||
cmp #'z'+1
|
||||
.FIN
|
||||
XDOS.IsValidFirstChar.RTS
|
||||
rts
|
||||
|
||||
rts
|
||||
|
||||
XDOS.IsValidFirstChar.SEC
|
||||
sec
|
||||
rts
|
||||
@ -654,7 +500,7 @@ calldisp lda RRAMWRAMBNK2 read/write RAM bank 2
|
||||
sta (A2L),y
|
||||
iny
|
||||
bne .1
|
||||
|
||||
|
||||
inc A1L+1 pointers to next page
|
||||
inc A2L+1
|
||||
dex move all pages needed
|
||||
@ -664,8 +510,8 @@ calldisp lda RRAMWRAMBNK2 read/write RAM bank 2
|
||||
lda RRAMWRAMBNK1 swap mli space back in
|
||||
|
||||
stz mliact MLI active flag
|
||||
|
||||
stz softev
|
||||
|
||||
stz softev
|
||||
lda #$10 point RESET to dispatch entry
|
||||
sta softev+1
|
||||
eor #$A5
|
||||
@ -700,7 +546,7 @@ XDOS.SPREMAP ldx #$03 assume 3 parameters.
|
||||
|
||||
lda XDOS.SPUnit-1,x get the smartport unit number and
|
||||
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
|
||||
lda XDOS.SPVectHi-1,x
|
||||
sta sp_vector+2
|
||||
@ -742,14 +588,13 @@ XDOS.SPParams.U .HS 00 unit number
|
||||
XDOS.SPParams.B .HS 0000 data buffer
|
||||
.HS 000000 block number (3 bytes)
|
||||
*--------------------------------------
|
||||
XDOS.TOOLBOX jmp (.1,x)
|
||||
XDOS.TBX jmp (.1,x)
|
||||
|
||||
.1 .DA XDOS.TOOLBOX.MEMRESET
|
||||
.DA XDOS.TOOLBOX.UnpackYA
|
||||
.DA XDOS.TOOLBOX.EnumBlk
|
||||
.DA XDOS.TOOLBOX.EnumNext
|
||||
|
||||
XDOS.TOOLBOX.MEMRESET
|
||||
.1 .DA XDOS.TBX.MemReset
|
||||
.DA XDOS.TBX.EnumBlk
|
||||
.DA XDOS.TBX.EnumNext
|
||||
*--------------------------------------
|
||||
XDOS.TBX.MemReset
|
||||
ldx #$17
|
||||
|
||||
.1 stz MEMTABL,x P8 memory bitmap
|
||||
@ -760,81 +605,149 @@ XDOS.TOOLBOX.MEMRESET
|
||||
lda #$CF protect zero page, stack and page 1
|
||||
sta MEMTABL
|
||||
rts
|
||||
|
||||
XDOS.TOOLBOX.UnpackYA
|
||||
sty zpt
|
||||
sta zpt+1
|
||||
|
||||
ldx #1
|
||||
jmp XDOS.UnpackZPT
|
||||
|
||||
XDOS.TOOLBOX.EnumBlk
|
||||
*--------------------------------------
|
||||
XDOS.TBX.EnumBlk
|
||||
jsr XDOS.ZPT.InitA
|
||||
|
||||
|
||||
ldx h_maxent
|
||||
|
||||
lda (zpt)
|
||||
and #$F0
|
||||
cmp #$E0
|
||||
bcs .8
|
||||
|
||||
ldy #$1F
|
||||
bcc .2
|
||||
|
||||
ldy #$1F+3
|
||||
ldx #3
|
||||
|
||||
|
||||
.1 lda (zpt),y
|
||||
sta h_entln,x
|
||||
dey
|
||||
dex
|
||||
bpl .1
|
||||
|
||||
jsr XDOS.ZPT.Next
|
||||
|
||||
lda h_maxent
|
||||
dec skip header
|
||||
sta cntent
|
||||
|
||||
* ldy h_fcnt
|
||||
* lda h_fcnt+1
|
||||
|
||||
.8 clc
|
||||
jsr XDOS.ZPT.Next skip header
|
||||
|
||||
ldx h_maxent
|
||||
dex skip header
|
||||
|
||||
.2 stx cntent
|
||||
|
||||
XDOS.TBX.CheckFCnt
|
||||
lda h_fcnt
|
||||
ora h_fcnt+1
|
||||
beq XDOS.TBX.SECRTS
|
||||
* clc
|
||||
rts
|
||||
|
||||
XDOS.TOOLBOX.EnumNext
|
||||
*--------------------------------------
|
||||
XDOS.TBX.EnumNext
|
||||
sty sos
|
||||
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
|
||||
beq .7
|
||||
|
||||
sta (sos)
|
||||
|
||||
|
||||
pha
|
||||
|
||||
ldx #1
|
||||
jsr XDOS.UnpackZPT
|
||||
|
||||
|
||||
jsr XDOS.ZPT.Unpack
|
||||
|
||||
ply
|
||||
|
||||
|
||||
.2 lda (zpt),y
|
||||
sta (sos),y
|
||||
dey
|
||||
bne .2
|
||||
|
||||
|
||||
ldy #16 FileType
|
||||
lda (zpt),y
|
||||
|
||||
pha
|
||||
jsr XDOS.ZPT.Next
|
||||
|
||||
clc
|
||||
rts
|
||||
lda h_fcnt+1
|
||||
bne .3
|
||||
|
||||
dec h_fcnt+1
|
||||
|
||||
.3 dec h_fcnt
|
||||
|
||||
pla
|
||||
* clc
|
||||
.9 rts
|
||||
|
||||
.7 jsr XDOS.ZPT.Next
|
||||
|
||||
dec cntent
|
||||
bne .1
|
||||
|
||||
.9 sec
|
||||
rts
|
||||
bra .1
|
||||
*--------------------------------------
|
||||
XDOS.TBX.SECRTS 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
|
||||
*--------------------------------------
|
||||
@ -853,7 +766,7 @@ XDOS.ParamCnt .HS 02020202 parameter counts for the calls
|
||||
.HS 070102070A0201010303040401010202
|
||||
.HS FF
|
||||
.HS 020202
|
||||
|
||||
|
||||
XDOS.CmdFlags .HS A0A1A2
|
||||
.HS A384
|
||||
.HS 050607
|
||||
@ -924,12 +837,9 @@ h_credt .HS 0000 directory creation date
|
||||
.HS 00 version under which this dir created
|
||||
.HS 00 earliest version that it's compatible
|
||||
h_attr .HS 00 attributes (protect bit, etc.)
|
||||
|
||||
*--------------------------------------
|
||||
h_entln .HS 00 length of each entry in this directory
|
||||
h_maxent .HS 00 maximum number of entries per block
|
||||
h_fcnt .HS 0000 current # of files in this directory
|
||||
*--------------------------------------
|
||||
h_bmap .HS 0000 address of first allocation bitmap
|
||||
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_entblk .HS 0000 address of block which contains entry
|
||||
d_entnum .HS 00 entry number within block
|
||||
*--------------------------------------
|
||||
d_stor .BS 16 file name
|
||||
d_filid .HS 00 user's identification byte
|
||||
d_frst .HS 0000 first block of file
|
||||
@ -960,7 +869,7 @@ xvcbptr .HS 00 used in 'cmpvcb' as a temp
|
||||
vcbptr .HS 00
|
||||
fcbptr .HS 00
|
||||
fcbflg .HS 00
|
||||
reql .HS 00
|
||||
reql .HS 00
|
||||
reqh .HS 00
|
||||
levels .HS 00
|
||||
totent .HS 00
|
||||
@ -968,7 +877,7 @@ entcntl .HS 00
|
||||
entcnth .HS 00
|
||||
cntent .HS 00
|
||||
nofree .HS 00
|
||||
bmcnt .HS 00
|
||||
bmcnt .HS 00
|
||||
saptr .HS 00
|
||||
pathcnt .HS 00
|
||||
p_dev .HS 00
|
||||
@ -1021,7 +930,7 @@ dealbufl .HS 0000000000000000
|
||||
dealbufh .HS 0000000000000000
|
||||
cbytes .HS 0000
|
||||
.HS 00 cbytes+2 must = 0
|
||||
bufaddrl .HS 00
|
||||
bufaddrl .HS 00
|
||||
bufaddrh .HS 00
|
||||
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 *
|
||||
XDOS.SPUnit .HS 00000000000000 14+1 for S0D2
|
||||
.HS 00
|
||||
.HS 00
|
||||
.HS 00000000000000
|
||||
|
||||
XRW.D2VolNum .EQ *
|
||||
@ -1041,20 +950,20 @@ XRW.D2SeekTime .EQ *
|
||||
XDOS.SPVectHi .HS 00000000000000 storage for high byte of smartport entry.
|
||||
.HS 00
|
||||
.HS 00000000000000
|
||||
|
||||
|
||||
XDOS.SPStatus .HS 00000000
|
||||
|
||||
.LIST ON
|
||||
XDOS.DATA.LEN .EQ *-XDOS.DATA
|
||||
.LIST OFF
|
||||
.ED
|
||||
*--------------------------------------
|
||||
*--------------------------------------
|
||||
* zero fill to page boundary - 3 ($FEFD). so that cortland flag stays within page boundary.
|
||||
.LIST ON
|
||||
XDOS.FREE .EQ $FEFD-*-XDOS.DATA.LEN (2.0.3 = $0C)
|
||||
.LIST OFF
|
||||
cortdisp .EQ $FEFD
|
||||
cortflag .EQ $FEFF cortland flag. 1 = Cortland system (must stay within page boundary)
|
||||
cortdisp .EQ $FEFD
|
||||
cortflag .EQ $FEFF cortland flag. 1 = Cortland system (must stay within page boundary)
|
||||
*--------------------------------------
|
||||
XDOS.LEN .EQ *-XDOS
|
||||
MAN
|
||||
|
@ -54,8 +54,8 @@ CS.INIT >LDYA L.LIBGUI
|
||||
sta hLIBGUI
|
||||
|
||||
* clc
|
||||
.9
|
||||
CS.INIT.RTS rts
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CS.RUN >SLEEP
|
||||
|
||||
@ -87,9 +87,6 @@ CS.RUN >SLEEP
|
||||
>LDYA L.GUITEST2
|
||||
jsr CS.RUN.Exec
|
||||
bra CS.RUN
|
||||
|
||||
clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN.MsgBox >PUSHW L.ABOUT.T
|
||||
>PUSHWI BM.ID.INFO
|
||||
@ -111,8 +108,13 @@ CS.DOEVENT lda (pEvent)
|
||||
.9 sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.QUIT clc
|
||||
CS.QUIT.RTS rts
|
||||
CS.QUIT lda hLIBGUI
|
||||
beq .8
|
||||
|
||||
>SYSCALL UnloadLib
|
||||
|
||||
.8 clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.END
|
||||
LIBGUI .AZ "libgui"
|
||||
|
@ -398,6 +398,7 @@ K.FOpen.90 pha
|
||||
rts
|
||||
|
||||
K.FOpen.9 >POP 6
|
||||
|
||||
K.FOpen.99 rts
|
||||
*/--------------------------------------
|
||||
* # FClose
|
||||
@ -518,6 +519,7 @@ K.FFlush jsr PFT.CheckNodeA
|
||||
lda (pFD)
|
||||
bne STDIO.IOERR
|
||||
>MLICALL MLIFLUSH
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
STDIO.IOERR lda #MLI.E.IO
|
||||
@ -625,6 +627,7 @@ K.FEOF jsr PFT.CheckNodeA
|
||||
lda (pFD)
|
||||
tax
|
||||
jmp (.1,x)
|
||||
|
||||
.1 .DA FS.EOF.REG
|
||||
.DA STDIO.IOERR DIR
|
||||
.DA DEV.EOF
|
||||
@ -647,6 +650,7 @@ K.FEOF jsr PFT.CheckNodeA
|
||||
*\--------------------------------------
|
||||
K.FTell jsr PFT.CheckNodeA
|
||||
bcs .9
|
||||
|
||||
>MLICALL MLIGETMARK
|
||||
bcs .9
|
||||
|
||||
@ -803,9 +807,7 @@ K.PrintF.1 sec format string->ptr2
|
||||
sty STDIO.PopCnt Total bytes to POP
|
||||
|
||||
.1 jsr SHARED.GetCP2
|
||||
bne .22
|
||||
|
||||
jmp .8 end of format..
|
||||
beq .8 end of format..
|
||||
|
||||
.22 cmp #'%'
|
||||
bne .20
|
||||
@ -817,8 +819,10 @@ K.PrintF.1 sec format string->ptr2
|
||||
|
||||
jsr ZP.IsDigit
|
||||
bcs .6 no digit....go check specifier
|
||||
|
||||
cmp #'0' ...a 0...mmm... padding char?
|
||||
bne .4
|
||||
|
||||
sta K.PrintF.PadC
|
||||
jsr SHARED.NextCP2 skip 0 ...
|
||||
lda (ZPPtr2)
|
||||
@ -829,10 +833,12 @@ K.PrintF.1 sec format string->ptr2
|
||||
|
||||
.4 jsr MATH.Dec2ACC32
|
||||
bcs .99
|
||||
|
||||
lda ACC32
|
||||
sta K.PrintF.PadL
|
||||
lda K.PrintF.PadC
|
||||
bne .5
|
||||
|
||||
lda #C.SPACE
|
||||
sta K.PrintF.PadC
|
||||
|
||||
@ -898,6 +904,7 @@ PrintFTBL1 .AS "bdDuefhHiILsS"
|
||||
PrintFTBL1.Cnt .EQ *-PrintFTBL1
|
||||
*--------------------------------------
|
||||
PrintF.ESC jmp (.1,x)
|
||||
|
||||
.1 .DA PrintF.B
|
||||
.DA PrintF.D,PrintF.DD,PrintF.U
|
||||
.DA PrintF.E,PrintF.F
|
||||
@ -915,9 +922,11 @@ PrintF.B jsr STDIO.GetStkB
|
||||
rol
|
||||
jsr PrintF.PutC
|
||||
bcs .9
|
||||
|
||||
pla
|
||||
dey
|
||||
bne .1
|
||||
|
||||
rts
|
||||
|
||||
.9 ply
|
||||
@ -991,6 +1000,7 @@ PrintF.F clc
|
||||
sec at least 5 bytes remaining ?
|
||||
sbc #5
|
||||
bcc PrintF.StrNum.Err
|
||||
|
||||
sta (pStack)
|
||||
|
||||
* sec
|
||||
@ -1006,6 +1016,7 @@ PrintF.F clc
|
||||
PrintF.StrNum ldy #0
|
||||
.2 lda FOUTBuf,y
|
||||
beq .8
|
||||
|
||||
iny
|
||||
jsr PrintF.PutC
|
||||
bcc .2
|
||||
@ -1056,8 +1067,10 @@ PrintF.SS ldy #$00 PSTR
|
||||
|
||||
lda K.PrintF.PadL
|
||||
beq .1
|
||||
|
||||
cpy K.PrintF.PadL
|
||||
bne .1
|
||||
|
||||
.8 clc
|
||||
rts
|
||||
|
||||
@ -1079,15 +1092,18 @@ PrintF.SS ldy #$00 PSTR
|
||||
*--------------------------------------
|
||||
PrintF.HH jsr STDIO.GetStkB
|
||||
bcs STDIO.RTS
|
||||
|
||||
pha LO byte
|
||||
jsr STDIO.GetStkB
|
||||
plx
|
||||
bcs STDIO.RTS
|
||||
|
||||
pha
|
||||
txa
|
||||
jsr PrintF.H.1
|
||||
plx
|
||||
bcs STDIO.RTS
|
||||
|
||||
txa
|
||||
bra PrintF.H.1
|
||||
*--------------------------------------
|
||||
@ -1097,6 +1113,7 @@ PrintF.H jsr STDIO.GetStkB
|
||||
PrintF.H.1 jsr STDIO.A2HexAX
|
||||
jsr PrintF.PutC
|
||||
bcs STDIO.RTS
|
||||
|
||||
txa
|
||||
*--------------------------------------
|
||||
PrintF.PutC phy
|
||||
@ -1218,6 +1235,7 @@ K.SScanF.1 clc format string->ptr1
|
||||
|
||||
.12 jsr SHARED.GetCP2
|
||||
beq .9
|
||||
|
||||
cmp #C.SPACE
|
||||
bne .9
|
||||
|
||||
@ -1244,9 +1262,11 @@ K.SScanF.1 clc format string->ptr1
|
||||
|
||||
.4 jsr STDIO.GetStkB
|
||||
bcs .9
|
||||
|
||||
sta ZPPtr3+1
|
||||
jsr STDIO.GetStkB
|
||||
bcs .9
|
||||
|
||||
sta ZPPtr3
|
||||
|
||||
jsr .5
|
||||
|
Loading…
x
Reference in New Issue
Block a user