Kernel version 0.9 : MEDIA reorganisation, FORMAT Cmd

This commit is contained in:
Rémy GIBERT 2017-03-30 18:11:31 +02:00
parent c20ea8b40f
commit 5284913187
23 changed files with 509 additions and 314 deletions

Binary file not shown.

Binary file not shown.

View File

@ -34,7 +34,11 @@ CS.START cld
.DA CS.DOEVENT
.DA CS.QUIT
L.LIBBLKDEV .DA LIBBLKDEV
L.MSG.USAGE .DA MSG.USAGE
L.BlkParams.Ptr .DA BlkParams.Ptr
L.MSG.USAGE .DA MSG.USAGE
L.MSG.INIT .DA MSG.INIT
L.MSG.OK .DA MSG.OK
L.MSG.ERR .DA MSG.ERR
.DA 0
*--------------------------------------
CS.INIT >SYSCALL GetArgC
@ -82,27 +86,58 @@ CS.INIT >SYSCALL GetArgC
sta (pData),y
bra .1
.4 lda (pData)
bne .99 Already have a vol name...syntax error
.4 ldy #hDev
lda (pData),y
bne .5 Already have a dev name...go get VolName
lda (ZPPtr1)
cmp #4
bne .99 DevName must be DxDy
>LDYA ZPPtr1
>SYSCALL GetDevByNameYA
bcs .99
txa
ldy #hDev
sta (pData),y
bra .1
.5 lda (ZPPtr1)
cmp #16
bcc .5
lda #15
.5 sta (ZPPtr1)
bcs .99 VolName too long
tay
.6 lda (ZPPtr1),y
sta (pData),y
dey
bne .6
bra .1 success, scan for any other args
bpl .6
bra .1 success, scan for any other args
.7 lda (pData)
bne .8 Volume name ok
lda A2osX.TIMER16
jsr A2CharAX
sta DefaultVolName+6
stx DefaultVolName+7
lda A2osX.TIMER16+1
jsr A2CharAX
sta DefaultVolName+8
stx DefaultVolName+9
lda A2osX.RANDOM16
jsr A2CharAX
sta DefaultVolName+10
stx DefaultVolName+11
lda A2osX.RANDOM16+1
jsr A2CharAX
sta DefaultVolName+12
stx DefaultVolName+13
ldy DefaultVolName
.71 lda DefaultVolName,y
@ -121,23 +156,113 @@ CS.INIT >SYSCALL GetArgC
clc
rts
*--------------------------------------
CS.RUN ldy #bCANCEL
lda (pData),y
bmi .99
CS.RUN jsr CS.RUN.BuildCat
bcs .9
jsr CS.RUN.WriteCat
bcs .9
.8 clc
rts
.99 lda #0
>LDYA L.MSG.OK
>SYSCALL CPrintFYA
lda #0
sec
rts
.9 pha
>PUSHA
>LDYA L.MSG.ERR
>SYSCALL CPrintFYA
pla
sec
rts
*--------------------------------------
CS.RUN.BuildCat ldy #hDev
lda (pData),y
>SYSCALL GetDevStatusA
bcs .99
>STYA ZPPtr1
ldy #S.DEVSTAT.SIZE
lda (ZPPtr1),y
sta BlockSize
iny
lda (ZPPtr1),y
sta BlockSize+1
ldy #hDev
lda (pData),y
>SYSCALL GetDevByIDA
bcs .99
pha
tya
adc #S.DEV.NAME
sta ZPPtr2
pla
adc /S.DEV.NAME
sta ZPPtr2+1
>PUSHW pData
>PUSHW BlockSize
>PUSHW ZPPtr2
>LDYA L.MSG.INIT
>SYSCALL CPrintFYA
bcs .9
>PUSHW BlockSize
>LIBCALL hLIBBLKDEV,LIBBLKDEV.GetProDOSCatSize
.99 bcs .9
stx BlkCnt
>PUSHYA BufferSize
>PUSHBI S.MEM.F.INIT0
>SYSCALL GetMem
bcs .9
>STYA BlkParams.Ptr
txa
ldy #hBuf
sta (pData),y
>PUSHW BlockSize
>PUSHW pData
>PUSHW BlkParams.Ptr
>LIBCALL hLIBBLKDEV,LIBBLKDEV.BuildProDOSCat
.9 rts
*--------------------------------------
CS.RUN.WriteCat stz BlkParams.Num
stz BlkParams.Num+1
ldy #hDev
lda (pData),y
>SYSCALL GetDevByIDA
bcs .9
>STYA pDev
.1 >LDYA L.BlkParams.Ptr
ldx #DEVMGR.WRITEBLOCK
>DEBUG
jsr pDevJmp
bcs .9
inc BlkParams.Ptr+1
inc BlkParams.Ptr+1
inc BlkParams.Num
dec BlkCnt
bne .1
.9 rts
*--------------------------------------
CS.DOEVENT sec
rts
*--------------------------------------
CS.QUIT lda hLIBBLKDEV
CS.QUIT ldy #hBuf
lda (pData),y
beq .1
>SYSCALL FreeMemA
.1 lda hLIBBLKDEV
beq .8
>SYSCALL UnloadLibA
@ -145,6 +270,25 @@ CS.QUIT lda hLIBBLKDEV
.8 clc
rts
*--------------------------------------
A2CharAX pha
lsr
lsr
lsr
lsr
and #$0F
ora #$30
cmp #'9'+1
bcc .1
adc #6
.1 tax
pla
and #$0F
ora #$30
cmp #'9'+1
bcc .8
adc #6
.8 rts
*--------------------------------------
CS.END
*--------------------------------------
OptionList >PSTR "L"
@ -153,19 +297,24 @@ OptionVars .DA #bLL
MSG.USAGE >CSTR "Usage : FORMAT <BLOCKDEV> [VOLUME.NAME]\r\n -L : Low-Level Format\r\n"
MSG.OK >CSTR "[OK]\r\n"
MSG.ERR >CSTR "[%h]\r\n"
MSG.INIT >CSTR "Formatting %S (%D Blks),Volname:%S..."
*--------------------------------------
LIBBLKDEV >PSTR "libblkdev.o"
DefaultVolName >PSTR "BLANK"
DefaultVolName >PSTR "BLANKXXXXXXXX"
ArgCount .BS 1
ArgIndex .BS 1
hLIBBLKDEV .BS 1
BlockSize .BS 2
hBuf .BS 1
BlkCnt .BS 1
BlkParams.Ptr .BS 2
BlkParams.Num .BS 2
*--------------------------------------
.DUMMY
.OR 0
DS.START
VolName .BS 16
DevName .BS 4
bCANCEL .BS 1
hDev .BS 5
bLL .BS 1
DS.END
.ED

View File

@ -75,13 +75,13 @@ L.TrkWriter .DA TrkWriter
L.ProDOS.Boot .DA ProDOS.Boot
.DA 0
*/--------------------------------------
* #GetProDOSCatSize
* # GetProDOSCatSize
* Compute space needed for ProDOS Catalog
* ##In :
* ## In :
* PUSHW = DevSize (in 512b blocks)
* ##Out :
* ## Out :
* X=BlockCount (max 22)
* A=PageCount (max 44)
* Y,A=BufSize (max $4400)
*\--------------------------------------
GetProDOSCatSize
>PULLAX A=DevSizeLo
@ -109,8 +109,8 @@ GetProDOSCatSizeAX
asl A = Total pages needed to build catalog.
rts
*/--------------------------------------
* #BuildProDOSCat
* ##In :
* # BuildProDOSCat
* ## In :
* PUSHW = DevSize (in 512b blocks)
* PUSHW = VolName (PSTR)
* PUSHW = DstBuf (Zero filled)
@ -250,7 +250,8 @@ BuildProDOSCat >PULLW ZPPtr1 DstBuf
inc ZPPtr1+1
bra .7
.88 rts
.88 clc
rts
*/--------------------------------------
*\--------------------------------------
D2TrkRNIB
@ -258,13 +259,13 @@ D2TrkRNIB
*\--------------------------------------
D2TrkR16s
*/--------------------------------------
* #TrkW16s
* # TrkW16s
* Write a track (16 sectors)
* ##In:
* ## In:
* PUSHW = Ptr to 16*256 buffer
* PUSHB = TrackNum * 4 : 0->140+
* PUSHB = DSSS0000
* ##Out:
* ## Out:
* CC : success
* CS : A = Error
* A=0, currently starting/seeking...
@ -274,13 +275,13 @@ D2TrkW16s
clc
rts
*/--------------------------------------
* #TrkWNIB
* # TrkWNIB
* Write a track (NIBBLE)
* ##In:
* ## In:
* PUSHW = Ptr to NIBBLE buffer (0 ended)
* PUSHB = TrackNum * 4 : 0->140+
* PUSHB = DSSS0000
* ##Out:
* ## Out:
* CC : success
* CS : A = Error
* A=0, currently starting/seeking...
@ -493,7 +494,38 @@ TrkWriter.Start lda D2ReadMode,x
TrkWriter.Size .EQ *-TrkWriter.Start
.EP
*--------------------------------------
ProDOS.Boot .BS 512
ProDOS.Boot .HS 01 38 b0 03 4c 32 a1 86 43 c9 03 08 8a 29 70 4a
.HS 4a 4a 4a 09 c0 85 49 a0 ff 84 48 28 c8 b1 48 d0
.HS 3a b0 0e a9 03 8d 00 08 e6 3d a5 49 48 a9 5b 48
.HS 60 85 40 85 48 a0 63 b1 48 99 94 09 c8 c0 eb d0
.HS f6 a2 06 bc 1d 09 bd 24 09 99 f2 09 bd 2b 09 9d
.HS 7f 0a ca 10 ee a9 09 85 49 a9 86 a0 00 c9 f9 b0
.HS 2f 85 48 84 60 84 4a 84 4c 84 4e 84 47 c8 84 42
.HS c8 84 46 a9 0c 85 61 85 4b 20 12 09 b0 68 e6 61
.HS e6 61 e6 46 a5 46 c9 06 90 ef ad 00 0c 0d 01 0c
.HS d0 6d a9 04 d0 02 a5 4a 18 6d 23 0c a8 90 0d e6
.HS 4b a5 4b 4a b0 06 c9 0a f0 55 a0 04 84 4a ad 02
.HS 09 29 0f a8 b1 4a d9 02 09 d0 db 88 10 f6 29 f0
.HS c9 20 d0 3b a0 10 b1 4a c9 ff d0 33 c8 b1 4a 85
.HS 46 c8 b1 4a 85 47 a9 00 85 4a a0 1e 84 4b 84 61
.HS c8 84 4d 20 12 09 b0 17 e6 61 e6 61 a4 4e e6 4e
.HS b1 4a 85 46 b1 4c 85 47 11 4a d0 e7 4c 00 20 4c
.HS 3f 09 26 50 52 4f 44 4f 53 20 20 20 20 20 20 20
.HS 20 20 a5 60 85 44 a5 61 85 45 6c 48 00 08 1e 24
.HS 3f 45 47 76 f4 d7 d1 b6 4b b4 ac a6 2b 18 60 4c
.HS bc 09 a9 9f 48 a9 ff 48 a9 01 a2 00 4c 79 f4 20
.HS 58 fc a0 1c b9 50 09 99 ae 05 88 10 f7 4c 4d 09
.HS aa aa aa a0 d5 ce c1 c2 cc c5 a0 d4 cf a0 cc cf
.HS c1 c4 a0 d0 d2 cf c4 cf d3 a0 aa aa aa a5 53 29
.HS 03 2a 05 2b aa bd 80 c0 a9 2c a2 11 ca d0 fd e9
.HS 01 d0 f7 a6 2b 60 a5 46 29 07 c9 04 29 03 08 0a
.HS 28 2a 85 3d a5 47 4a a5 46 6a 4a 4a 85 41 0a 85
.HS 51 a5 45 85 27 a6 2b bd 89 c0 20 bc 09 e6 27 e6
.HS 3d e6 3d b0 03 20 bc 09 bc 88 c0 60 a5 40 0a 85
.HS 53 a9 00 85 54 a5 53 85 50 38 e5 51 f0 14 b0 04
.HS e6 53 90 02 c6 53 38 20 6d 09 a5 50 18 20 6f 09
.HS d0 e3 a0 7f 84 52 08 28 38 c6 52 f0 ce 18 08 88
.HS f0 f5 bd 8c c0 10 fb 00 00 00 00 00 00 00 00 00
*--------------------------------------
VolDirHdr .DA 0 pointer to previous block
.DA 3 pointer to next block

View File

@ -5,10 +5,10 @@ INC 1
AUTO 6
.LIST OFF
*/--------------------------------------
* #ARP.Clear
* # ARP.Clear
* Clear ARP Cache
* ##In :
* ##Out :
* ## In :
* ## Out :
*\--------------------------------------
ARP.Clear ldx #K.ARPCACHE.SIZE*S.ARPCACHE
.1 stz ARP.CACHE-1,x
@ -17,12 +17,12 @@ ARP.Clear ldx #K.ARPCACHE.SIZE*S.ARPCACHE
clc
rts
*/--------------------------------------
* #ARP.Query
* # ARP.Query
* Query ARP Cache and returns HW address
* ##In:
* ## In:
* PUSHW PTR to MAC (to fill)
* PUSHW PTR to IP
* ##Out:
* ## Out:
* CC: hit: MAC filled
* CS: missed
*\--------------------------------------
@ -45,9 +45,9 @@ ARP.Query >PULLW ZPPtrIP IP
clc
.9 rts
*/--------------------------------------
* #ARP.Add
* # ARP.Add
* Add a static ARP cache record
* ##In:
* ## In:
* PUSHW PTR to MAC
* PUSHW PTR to IP
*\--------------------------------------
@ -86,10 +86,10 @@ ARP.ADD.I sta ARP.TmpCache
clc
rts
*/--------------------------------------
* #ARP.GetCache
* # ARP.GetCache
* Return a Ptr to ARP Cache Table
* ##In:
* ##Out:
* ## In:
* ## Out:
* Y,A = PTR to ARP.CACHE
*\--------------------------------------
ARP.GetCache >LDYA L.ARP.CACHE

View File

@ -5,10 +5,10 @@ INC 1
AUTO 6
.LIST OFF
*/--------------------------------------
* #DNS.Clear
* # DNS.Clear
* Clear DNS Cache
* ##In :
* ##Out :
* ## In :
* ## Out :
*\--------------------------------------
DNS.Clear ldx #K.DNSCACHE.SIZE*S.DNSCACHE
.1 stz DNS.CACHE-1,x
@ -17,12 +17,12 @@ DNS.Clear ldx #K.DNSCACHE.SIZE*S.DNSCACHE
clc
rts
*/--------------------------------------
* #DNS.Query
* # DNS.Query
* Query DNS for specified host
* ##In:
* ## In:
* PUSHW = PTR to IP to fill with cached data
* PUSHW = hostname PTR to PSTR
* ##Out:
* ## Out:
* CC: hit: IP filled with address
* CS: missed
*\--------------------------------------
@ -125,9 +125,9 @@ DNS.REQUEST lda hDNSSocket1
.9 sec
rts
*/--------------------------------------
* #DNS.Add
* # DNS.Add
* Add a static DNS record
* ##In:
* ## In:
* PUSHW = PTR to IP
* PUSHW = hostname PSTR to Add
*\--------------------------------------
@ -175,10 +175,10 @@ DNS.ADD.I sta DNS.TmpCache
clc
.9 rts
*/--------------------------------------
* #DNS.GetCache
* # DNS.GetCache
* Return a Ptr to DNS Cache Table
* ##In:
* ##Out:
* ## In:
* ## Out:
* Y,A = PTR to DNS.CACHE
*\--------------------------------------
DNS.GetCache >LDYA L.DNS.CACHE

View File

@ -5,11 +5,11 @@ INC 1
AUTO 6
.LIST OFF
*/--------------------------------------
* #SKT.New
* # SKT.New
* Create a new socket
* ##In :
* ## In :
* PUSHW = PTR to S.SOCKET template
* ##Out :
* ## Out :
* YA = PTR to new S.SOCKET
* X = hSocket
*\--------------------------------------
@ -122,11 +122,11 @@ SKT.New.Listen sec
sec
.99 rts
*/--------------------------------------
* #SKT.CloseA
* # SKT.CloseA
* Close socket
* ##In :
* ## In :
* A = hSocket
* ##Out :
* ## Out :
*\--------------------------------------
SKT.CloseA and #$7f
cmp #K.SKTTABLE.SIZE
@ -193,11 +193,11 @@ SKT.CloseA and #$7f
clc
rts
*/--------------------------------------
* #SKT.GetA
* # SKT.GetA
* Get Ptr to socket
* ##In :
* ## In :
* A = hSocket
* ##Out :
* ## Out :
* Y,A = pS.SOCKET
*\--------------------------------------
SKT.GetA jsr SKT.GetA.I
@ -250,10 +250,10 @@ SKT.GetA.I and #$7f
sec
rts
*/--------------------------------------
* #SKT.GetTable
* # SKT.GetTable
* Get socket table
* ##In :
* ##Out :
* ## In :
* ## Out :
* Y,A = pS.SOCKET
*\--------------------------------------
SKT.GetTable lda hSocketTable
@ -261,11 +261,11 @@ SKT.GetTable lda hSocketTable
clc
rts
*/--------------------------------------
* #SKT.AcceptA
* # SKT.AcceptA
* Check for an incoming connection
* ##In :
* ## In :
* A = hListeningSocket
* ##Out :
* ## Out :
* A = hSocket
*\--------------------------------------
SKT.AcceptA jsr SKT.GetA.I
@ -302,11 +302,11 @@ SKT.AcceptA jsr SKT.GetA.I
sec
.9 rts
*/--------------------------------------
* #SKT.MkNodA
* # SKT.MkNodA
* Create a new file from TCP socket
* ##In :
* ## In :
* A = hSocket
* ##Out :
* ## Out :
* A = hFile
*\--------------------------------------
SKT.MkNodA
@ -314,13 +314,13 @@ SKT.MkNodA
sec
rts
*/--------------------------------------
* #SKT.Write (DGRAM,STREAM,RAW)
* # SKT.Write (DGRAM,STREAM,RAW)
* Send block of data
* ##In :
* ## In :
* PUSHB = hSocket
* PUSHW = pBuf
* PUSHW = len
* ##Out :
* ## Out :
*\--------------------------------------
SKT.Write >PULLW ZPDataInLen
>PULLW ZPDataInPtr
@ -419,10 +419,10 @@ SKT.Write.TCP ldy #S.SOCKET.TCP.STATUS
sec
.99 rts
*/--------------------------------------
* #SKT.ReadA (DGRAM,RAW)
* ##In :
* # SKT.ReadA (DGRAM,RAW)
* ## In :
* A = hSocket
* ##Out :
* ## Out :
* A = hFrame
*\--------------------------------------
SKT.ReadA jsr SKT.GetA.I
@ -455,12 +455,12 @@ SKT.ReadA jsr SKT.GetA.I
.99 sec
.9 rts
*/--------------------------------------
* #SKT.PutC (STREAM)
* # SKT.PutC (STREAM)
* Write a Char To Stream
* ##In :
* ## In :
* PUSHB = hSocket
* PUSHB = Char
* ##Out :
* ## Out :
*\--------------------------------------
SKT.PutC >PULLB TmpByte
@ -475,12 +475,12 @@ SKT.PutC >PULLB TmpByte
stx ZPDataInPtr+1
bra SKT.PutS.1
*/--------------------------------------
* #SKT.PutS (STREAM)
* # SKT.PutS (STREAM)
* Write Line in pBuf
* ##In :
* ## In :
* PUSHB = hSocket
* PUSHW = PSTR
* ##Out :
* ## Out :
*\--------------------------------------
SKT.PutS >PULLW ZPDataOutPtr
lda (ZPDataInPtr)
@ -505,11 +505,11 @@ SKT.PutS.1 >PULLA
sec
rts
*/--------------------------------------
* #SKT.GetCA (STREAM)
* # SKT.GetCA (STREAM)
* Read a Char From Stream in A
* ##In :
* ## In :
* A = hSocket
* ##Out :
* ## Out :
* A = char
*\--------------------------------------
SKT.GetCA stz bTextMode
@ -529,25 +529,25 @@ SKT.GetCA stz bTextMode
.9 rts
*/--------------------------------------
* #SKT.GetS (STREAM)
* # SKT.GetS (STREAM)
* Read a CR terminated Line in pBuf
* ##In :
* ## In :
* PUSHB = hSocket
* PUSHW = pBuf
* PUSHW = len
* ##Out :
* ## Out :
* Y,A = bytes read
*\--------------------------------------
SKT.GetS sec
.HS 90 bcc
*/--------------------------------------
* #SKT.Read (STREAM)
* # SKT.Read (STREAM)
* Read data in pBuf
* ##In :
* ## In :
* PUSHB = hSocket
* PUSHW = pBuf
* PUSHW = len
* ##Out :
* ## Out :
* Y,A = bytes transfered
*\--------------------------------------
SKT.Read clc

View File

@ -146,6 +146,7 @@ note : '$VAR' does NOT expand Variable
| CAT | Working | -A : Show All non printable caracters | 0.9 |
| | | -N : Number all output lines | |
| | | -S : Suppress repeated empty output lines | |
| FORMAT | In Progress | -L : Low-Level Format | 0.9 |
| EDIT | Working | still missing : find/replace | 0.9 |
| NSCUTIL | Working | Tool for setting time in NSC/DL1216E | 0.9 |
| ---- | ------ | ------- | ----- |

View File

@ -4,11 +4,11 @@ LOMEM $A00
INC 1
AUTO 6
*/--------------------------------------
* #GetArgC
* # GetArgC
* Returns argument count in the process command line.
* ##In:
* ## In:
* none.
* ##Out:
* ## Out:
* A = Command line Arg Count (Including /path/cmd)
*\--------------------------------------
K.GetArgC jsr ARG.InitArgPtr1
@ -25,10 +25,10 @@ K.GetArgC jsr ARG.InitArgPtr1
.8 txa
rts
*/--------------------------------------
* #GetArgA
* ##In:
* # GetArgA
* ## In:
* A = argument index.
* ##Out:
* ## Out:
* CC : success
* Y,A = PStr To Arg[A]
* CS : Out Of Bound

View File

@ -4,12 +4,12 @@ LOMEM $A00
INC 1
AUTO 6
*/--------------------------------------
* #FPutCAY
* # FPutCAY
* Print A (char) to File
* ##In:
* ## In:
* A : char to print
* Y = hFILE
* ##Out:
* ## Out:
* CC = success
*\--------------------------------------
K.FPutCAY sta K.PutC.Char
@ -21,11 +21,11 @@ K.PutCA.8 ply
clc
rts
*/--------------------------------------
* #PutCA
* # PutCA
* Print A (char) to StdOut
* ##In:
* ## In:
* A : char to print
* ##Out:
* ## Out:
* CC = success
*\--------------------------------------
K.PutCA sta K.PutC.Char
@ -123,20 +123,20 @@ K.PutCA.FIFO ldy #S.NODE.FIFO.S
K.PutC.Char .BS 1
K.PutC.Node .BS 1
*/--------------------------------------
* #FGetCA
* # FGetCA
* Get char from File
* ##In:
* ## In:
* A = hFILE
* ##Out:
* ## Out:
* CC = success
* A = char
*\--------------------------------------
*/--------------------------------------
* #GetC
* # GetC
* Get char from StdIn
* ##In:
* ## In:
* none.
* ##Out:
* ## Out:
* CC = success
* A = char
*\--------------------------------------
@ -190,40 +190,40 @@ K.GetC.SSOCK lda (pDev) #S.NODE.HANDLER
*--------------------------------------
K.GetC.FIFO
*/--------------------------------------
* #FPutS
* # FPutS
* Write String to FILE
* ##In:
* ## In:
* PUSHW : CPtr
* PUSHB : hFILE
* ##Out:
* ## Out:
* CC = success
*\--------------------------------------
K.FPutS
*/--------------------------------------
* #PutSYA
* # PutSYA
* Write String to StdOut
* ##In:
* ## In:
* Y,A : CPtr
* ##Out:
* ## Out:
* CC = success
*\--------------------------------------
K.PutSYA
*/--------------------------------------
* #FGetS
* # FGetS
* Read String From FILE
* ##In:
* ## In:
* PUSHW : CPtr
* PUSHB : hFILE
* ##Out:
* ## Out:
* CC = success
*\--------------------------------------
K.FGetS
*/--------------------------------------
* #GetSYA
* # GetSYA
* Read String From StdIn
* ##In:
* ## In:
* Y,A : CPtr
* ##Out:
* ## Out:
* CC = success
*\--------------------------------------
K.GetSYA

View File

@ -4,14 +4,14 @@ LOMEM $A00
INC 1
AUTO 6
*/--------------------------------------
* #SScanF
* # SScanF
* Scan a PStr (in progress)
* ##In:
* ## In:
* PUSHW PTR to target buffer
* PUSHW PSTR pattern (ex: "%d.%d.%d.%d")
* %d : byte
* PUSHW PSTR to scan (ex: "192.168.1.5")
* ##Out:
* ## Out:
*\--------------------------------------
K.SScanF jsr PullPtr1Ptr2Ptr3
@ -102,9 +102,9 @@ K.SScanF.IsDigit
.1 sec
rts
*/--------------------------------------
* #PPrintFYA/CPrintFYA
* # PPrintFYA/CPrintFYA
* Prints Pascal/C-Style String
* ##In:
* ## In:
* Y,A = PTR to PStr/CStr
* %a : pull 2 bytes to Print Access right String 'drwxrwxrwx'
* %b : pull 1 byte to Print BIN
@ -137,7 +137,7 @@ K.SScanF.IsDigit
* %11s : 'ABCDEFGH '
* %011s : 'ABCDEFGH000'
* %2f : '3.14'
* ##Out:
* ## Out:
* CC : success
* CS : I/O error from COut
*\--------------------------------------

View File

@ -46,7 +46,7 @@ A2osX.PrtDrv.Go.Cmd
*--------------------------------------
A2osX.PrtDrv.GetParam
>STYA ZPDRV Get Ptr To ParamList
jsr A2osX.Blk.GetDev
jsr A2osX.Blk.GetCmdAndDev
ldy #7

View File

@ -4,10 +4,10 @@ LOMEM $A00
INC 1
AUTO 6
*/--------------------------------------
* #GetDevByIDA
* ##IN:
* # GetDevByIDA
* ## IN:
* A = DevID
* ##OUT:
* ## OUT:
* CC = OK, CS = ERROR
* Y,A = DEVSLOT
* note: X Unmodified
@ -29,10 +29,10 @@ K.GetDevByIDA cmp DevMgr.Count
adc /DevMgr.Table
rts CC
*/--------------------------------------
* #GetDevByNameYA
* ##IN:
* # GetDevByNameYA
* ## IN:
* Y,A = Ptr to device name (PStr)
* ##OUT:
* ## OUT:
* CC = OK, CS = ERROR
* X = DEVID
* Y,A = DEVSLOT
@ -81,10 +81,10 @@ K.GetDevByNameYA
K.GetDevDNF lda #MLI.ERR.NODEV CS from cpx/beq
rts
*/--------------------------------------
* #GetDevStatusA
* ##IN:
* # GetDevStatusA
* ## IN:
* A = DevID
* ##OUT:
* ## OUT:
* CC = OK, CS = ERROR
* Y,A = Ptr to S.DEVINFO
*\--------------------------------------
@ -94,11 +94,11 @@ K.GetDevStatusA jsr K.GetDevByIDA
ldx #DEVMGR.STATUS
jmp (ZPPtr1)
*/--------------------------------------
* #MkNodYA
* # MkNodYA
* return a hFile for a given Device Name
* ##IN:
* ## IN:
* Y,A=DevName
* ##OUT:
* ## OUT:
* CC = OK, CS = ERROR
* A = hFILE
*\--------------------------------------
@ -148,11 +148,11 @@ K.MkNodYA jsr K.GetDevByNameYA Ptr1=NAME
sec
rts
*/--------------------------------------
* #MkNodA
* # MkNodA
* return a hFile for a given Socket
* ##IN:
* ## IN:
* A=hSocket
* ##OUT:
* ## OUT:
* CC = OK, CS = ERROR
* A = hFILE
*\--------------------------------------
@ -175,10 +175,10 @@ K.MkNodA sta .1+1
txa
.9 rts
*/--------------------------------------
* #MKFIFO
* # MKFIFO
* return a S.FILE to a new FIFO
* ##IN:
* ##OUT:
* ## IN:
* ## OUT:
* CC = OK, CS = ERROR
* A = hFILE
*\--------------------------------------

View File

@ -4,10 +4,10 @@ LOMEM $A00
INC 1
AUTO 6
*/--------------------------------------
* #OpenDirYA
* ##In:
* # OpenDirYA
* ## In:
* Y,A = PATH (PSTR)
* ##Out:
* ## Out:
* CC : success
* A = hDIR
* CS : error
@ -64,10 +64,10 @@ K.OpenDirYA jsr PFT.CheckPathYA
sec
.99 rts
*/--------------------------------------
* #ReadDirA
* ##In:
* # ReadDirA
* ## In:
* A = hDIR
* ##Out:
* ## Out:
* CC : success
* X = hDIRENT
* Y,A = PTR to S.DIRENT
@ -565,10 +565,10 @@ ADDF.DST .DA #S.STAT.P.TYPE,#S.STAT.BLOCKS,#S.STAT.BLOCKS+1
.DA #S.STAT.SIZE,#S.STAT.SIZE+1,#S.STAT.SIZE+2
.DA #S.STAT.P.AUXTYPE,#S.STAT.P.AUXTYPE+1
*/-------------------------------------
* #CloseDirA
* ##In:
* # CloseDirA
* ## In:
* A = hDIR
* ##Out:
* ## Out:
* none, always succeed.
*\-------------------------------------
K.CloseDirA .EQ K.FCloseA
@ -594,10 +594,10 @@ K.CloseDirA.1 .EQ K.FCloseA.1
*.2 lda K.ReadDirA.hDir
* jmp K.FreeMemA
*/-------------------------------------
* #MKDirYA
* ##In:
* # MKDirYA
* ## In:
* Y,A = DIR name
* ##Out:
* ## Out:
* CC : success
* CS : error
* A = EC

View File

@ -4,10 +4,10 @@ LOMEM $A00
INC 1
AUTO 6
*/--------------------------------------
* #ExpandPStrYA
* ##In:
* # ExpandPStrYA
* ## In:
* Y,A = PTR to String to Expand (PSTR)
* ##Out:
* ## Out:
* X = hMem to Expanded String (PSTR)
* Y,A = PTR to Expanded String
*\--------------------------------------
@ -173,10 +173,10 @@ K.ExpandPStr.bFound .BS 1
K.ExpandPStr.bNoExp .BS 1
K.ExpandPStr.hPStr .BS 1
*/--------------------------------------
* #PutEnvYA
* ##In:
* # PutEnvYA
* ## In:
* Y,A = PTR to String NAME=VALUE (PSTR)
* ##Out:
* ## Out:
*\--------------------------------------
K.PutEnvYA >STYA ZPPtr1 NAME=VALUE
@ -227,11 +227,11 @@ K.PutEnvYA >STYA ZPPtr1 NAME=VALUE
.9 sec
rts
*/--------------------------------------
* #SetEnv
* ##In:
* # SetEnv
* ## In:
* PUSHW = PTR To Value (PSTR)
* PUSHW = PTR To Name (PSTR)
* ##Out:
* ## Out:
*\--------------------------------------
K.SetEnv jsr PullPtr1Ptr2 Ptr1=NAME,Ptr2=VALUE
@ -306,10 +306,10 @@ K.SetEnvPtr1Ptr2
sec
rts
*/--------------------------------------
* #GetEnvYA
* ##In:
* # GetEnvYA
* ## In:
* Y,A = PTR to NAME (PSTR)
* ##Out:
* ## Out:
* CC : Y,A = PTR to VALUE (PSTR)
* CS : not found
*\--------------------------------------
@ -327,10 +327,10 @@ K.GetEnvYA >STYA ZPPtr1
.9 >LDYAI EmptyPSTR
rts
*/--------------------------------------
* #UnsetEnvYA
* ##In:
* # UnsetEnvYA
* ## In:
* Y,A = PTR To Name (PSTR)
* ##Out:
* ## Out:
*\--------------------------------------
K.UnsetEnvYA >STYA ZPPtr1 Store VAR Name
S.UnsetEnvPtr1 jsr ENV.FindVarPtr1

View File

@ -8,9 +8,9 @@ AUTO 6
* Must be kept in X before calling
* PFT.Check
*/--------------------------------------
* #FOpen
* # FOpen
* Open a file
* ##In :
* ## In :
* PUSHW = AUXTYPE
* PUSHB = TYPE
* PUSHB = MODE
@ -20,7 +20,7 @@ AUTO 6
* SYS.FOpen.T : Open/Append in Text mode
* SYS.FOpen.X : Create if not exists
* PUSHW = PATH (PSTR)
* ##Out :
* ## Out :
* CC : A = hFILE
* CS : A = EC
*\--------------------------------------
@ -124,11 +124,11 @@ K.FOpen.TYPE .BS 1
K.FOpen.AUXTYPE .BS 2
hFILE .BS 1
*/--------------------------------------
* #FCloseA
* # FCloseA
* Close a file
* ##In :
* ## In :
* A = hFILE
* ##Out :
* ## Out :
*\--------------------------------------
K.FCloseA jsr PFT.CheckNodeA
sta K.FCloseA.2+1
@ -149,22 +149,22 @@ K.FCloseA.1 ldy #S.NODE.REG.REF
K.FCloseA.2 lda #$ff Self Modified
jmp K.FreeMemA
*/--------------------------------------
* #FReadA
* # FReadA
* Read ONE byte from file
* ##In :
* ## In :
* A = hFILE
* ##Out :
* ## Out :
* A = Byte Read
*\--------------------------------------
K.FReadA jsr PFT.CheckNodeA
ldx #MLIREAD
bra K.FReadWrite.0
*/--------------------------------------
* #FWriteAY
* ##In:
* # FWriteAY
* ## In:
* A = hFILE
* Y = char
* #Out:
* # Out:
* Y,A = Bytes Written
*\--------------------------------------
K.FWriteAY jsr PFT.CheckNodeA
@ -183,25 +183,25 @@ K.FReadWrite.0 jsr FILE.SetupPrt1A
.9 rts
K.FWriteAY.Buf .BS 1
*/--------------------------------------
* #FRead
* # FRead
* Read bytes from file
* ##In :
* ## In :
* PUSHW = Dest Ptr
* PUSHW = Bytes To Read
* PUSHB = hFILE
* ##Out :
* ## Out :
* Y,A = Bytes Read
*\--------------------------------------
K.FRead jsr PFT.CheckNodeSTK
ldx #MLIREAD
bra K.FReadWrite.1
*/--------------------------------------
* #FWrite
* ##In:
* # FWrite
* ## In:
* PUSHW = Src Ptr
* PUSHW = Bytes To Write
* PUSHB = hFILE
* #Out:
* # Out:
* Y,A = Bytes Written
*\--------------------------------------
K.FWrite jsr PFT.CheckNodeSTK
@ -217,8 +217,8 @@ K.FReadWrite.1 >PULLA
>LDYA K.MLI.PARAMS+6
.9 rts
*/--------------------------------------
* #FFlushA
* ##In:
* # FFlushA
* ## In:
* A = hFILE
*\--------------------------------------
K.FFlushA jsr PFT.CheckNodeA
@ -226,8 +226,8 @@ K.FFlushA jsr PFT.CheckNodeA
>MLICALL MLIFLUSH
rts
*/-------------------------------------
* #FSeek
* ##In:
* # FSeek
* ## In:
* PUSHW = OffsetHi
* PUSHW = OffsetLo
* PUSHB = From
@ -285,10 +285,10 @@ K.FSeek jsr PFT.CheckNodeSTK
K.FSeek.FROM .BS 1
K.FSeek.OFFSET .BS 4
*/--------------------------------------
* #FTellA
* ##In:
* # FTellA
* ## In:
* A = hFILE
* ##Out:
* ## Out:
* Y,A,X = Offset
*\--------------------------------------
K.FTellA jsr PFT.CheckNodeA
@ -299,10 +299,10 @@ K.FTellA.1 jsr FILE.SetupPrt1A
ldx K.MLI.PARAMS+4
.9 rts
*/--------------------------------------
* #FEOFA
* ##In:
* # FEOFA
* ## In:
* A = hFILE
* ##Out:
* ## Out:
* CC :
* A=0 EOF
* A !=0 NOT EOF
@ -331,19 +331,19 @@ K.FEOFA jsr PFT.CheckNodeA
.9 rts
K.FEOFA.MARK .BS 3
*/--------------------------------------
* #RemoveYA
* # RemoveYA
*\--------------------------------------
K.RemoveYA jsr PFT.CheckPathYA
>STYA K.MLI.PARAMS+1
>MLICALL MLIDESTROY
rts
*/--------------------------------------
* #Rename
* # Rename
* Rename a file
* ##In :
* ## In :
* PUSHW = New Name
* PUSHW = Old Name
* ##Out :
* ## Out :
*\--------------------------------------
K.Rename jsr PFT.CheckPathSTK
>PULLW K.MLI.PARAMS+1
@ -351,12 +351,12 @@ K.Rename jsr PFT.CheckPathSTK
>MLICALL MLIRename
rts
*/--------------------------------------
* #Stat
* # Stat
* Return information about a file
* ##In :
* ## In :
* PUSHW = PTR to S.STAT buffer
* PUSHW = PTR to Filename (PSTR)
* ##Out :
* ## Out :
*\--------------------------------------
K.Stat jsr PFT.CheckPathSTK
>PULLW K.MLI.PARAMS+1

View File

@ -4,13 +4,13 @@ LOMEM $A00
INC 1
AUTO 6
*/--------------------------------------
* #FileSearch
* # FileSearch
* Search a file in the provided PATH list
* And return, if found, the full path to it.
* ##In:
* ## In:
* PUSHW = Ptr to Search Path (PSTR) %LIB%;/SYS/SLIB
* PUSHW = Ptr to File Name (PSTR)
* ##Out:
* ## Out:
* CC : success
* Y,A = PSTR to FilePath (PSTR)
* X = hMem to FilePath
@ -78,10 +78,10 @@ K.FileSearch >PULLW ZPPtr4 ZPPtr1 trashed by ExpandPStrYA
K.FileSearch.hSrch .BS 1
K.FileSearch.Index .BS 1
*/--------------------------------------
* #GetFullPathYA
* ##In :
* # GetFullPathYA
* ## In :
* Y,A = Filename (PSTR)
* ##Out :
* ## Out :
* CC : success
* Y,A = FullPath (PSTR)
* X = hMem of FullPath
@ -117,13 +117,13 @@ K.GetFullPathYA.9
sec
rts
*/--------------------------------------
* #LoadFile
* ##In:
* # LoadFile
* ## In:
* PUSHW = AUXTYPE (Handled by....
* PUSHB = TYPE ...
* PUSHB = MODE ...
* PUSHW = PATH ...FOpen)
* ##Out:
* ## Out:
* Y,A = File Length
* X = hMem of Loaded File
*\--------------------------------------
@ -190,8 +190,8 @@ K.LoadFile.Seek >PUSHWI 0
>PUSHB K.LoadFile.hFile
jmp K.FSeek
*/--------------------------------------
* #SaveFile
* ##In:
* # SaveFile
* ## In:
* PUSHW = SrcLen
* PUSHW = SrcPtr
* PUSHW = AUXTYPE (Handled by....

View File

@ -89,10 +89,10 @@ A2osX.MLICALL1 stx .1
jsr GO.A2osX
rts
*--------------------------------------
* A2osX.DIIDrv,A2osX.BlkDrv
* A2osX.DIIDrv
* X = DEVMGR.cmd
* Y,A = PTR to Params
* pDev -> Dev Header
* pDev -> Dev Header AUX!!!
* $42 Command Number
* $43 Unit Number
* $44-$45 Buffer Pointer
@ -102,21 +102,25 @@ A2osX.DIIDrv .DA A2osX.DIIDrv.S status
.DA A2osX.DIIDrv.RW Read
.DA A2osX.DIIDrv.RW Write
.DA A2osX.DRV.BadCall Format
.DA A2osX.DRV.BadCall
.DA A2osX.DRV.BadCall
.DA A2osX.DRV.BadCall
.DA A2osX.DRV.BadCall
.DA A2osX.DRV.BadCall
.DA A2osX.DRV.BadCall
.DA A2osX.DRV.BadCall
* .DA A2osX.DRV.BadCall
* .DA A2osX.DRV.BadCall
* .DA A2osX.DRV.BadCall
* .DA A2osX.DRV.BadCall
* .DA A2osX.DRV.BadCall
* .DA A2osX.DRV.BadCall
* .DA A2osX.DRV.BadCall
*--------------------------------------
A2osX.DIIDrv.S >LDYAI A2osx.DIIStat
clc
rts
*--------------------------------------
A2osX.DIIDrv.RW jsr A2osX.Blk.GetParam
A2osX.DIIDrv.RW >STYA A2osX.Blk.GetParam.1+1
jsr A2osX.Blk.GetCmdAndDevAX
jsr GO.ProDOS
stx $42
sta $43
jsr A2osX.Blk.GetParam
jsr $D000
jsr GO.A2osX
rts
@ -130,35 +134,47 @@ A2osx.DIIStat .DA #S.DEVSTAT.S.BLOCK+S.DEVSTAT.S.WRITE+S.DEVSTAT.S.READ
.DA #0
.DA #0,#9
*--------------------------------------
* Generic Blk Device
* A2osX.BlkDrv
* X = DEVMGR.cmd
* Y,A = PTR to Params
* pDev -> Dev Header
* $42 Command Number
* $43 Unit Number
* $44-$45 Buffer Pointer
* $46-$47 Block Number
*--------------------------------------
A2osX.BlkDrv .DA A2osX.BlkDrv.S status
.DA A2osX.BlkDrv.RW
.DA A2osX.BlkDrv.RW
.DA A2osX.BlkDrv.F
.DA A2osX.DRV.BadCall
.DA A2osX.DRV.BadCall
.DA A2osX.DRV.BadCall
.DA A2osX.DRV.BadCall
.DA A2osX.DRV.BadCall
.DA A2osX.DRV.BadCall
.DA A2osX.DRV.BadCall
* .DA A2osX.DRV.BadCall
* .DA A2osX.DRV.BadCall
* .DA A2osX.DRV.BadCall
* .DA A2osX.DRV.BadCall
* .DA A2osX.DRV.BadCall
* .DA A2osX.DRV.BadCall
* .DA A2osX.DRV.BadCall
*--------------------------------------
A2osX.BlkDrv.S jsr A2osX.Blk.GetDev
A2osX.BlkDrv.S jsr A2osX.Blk.GetCmdAndDev
jsr A2osX.BlkDrv.Go
bcs *
bcs .9
stx A2osx.BlkStat+S.DEVSTAT.SIZE
sty A2osx.BlkStat+S.DEVSTAT.SIZE+1
>LDYAI A2osX.BlkStat
clc
rts
.9 rts
*--------------------------------------
A2osX.BlkDrv.RW jsr A2osX.Blk.GetParam
A2osX.BlkDrv.RW >STYA A2osX.Blk.GetParam.1+1
jsr A2osX.Blk.GetCmdAndDev
jsr A2osX.Blk.GetParam
bra A2osX.BlkDrv.Go
*--------------------------------------
A2osX.BlkDrv.F jsr A2osX.Blk.GetDev
A2osX.BlkDrv.F jsr A2osX.Blk.GetCmdAndDev
A2osX.BlkDrv.Go ldy #S.DEV.ROM.JMP
lda (pDev),y
sta .8+1
@ -175,21 +191,23 @@ A2osX.BlkStat .DA #S.DEVSTAT.S.BLOCK+S.DEVSTAT.S.WRITE+S.DEVSTAT.S.READ
.DA #0,#9
*--------------------------------------
A2osX.Blk.GetParam
>STYA ZPDRV Get Ptr To ParamList
jsr A2osX.Blk.GetDev
ldy #3
.1 lda (ZPDRV),y
A2osX.Blk.GetParam.1
lda $ffff,y Self Modified
sta $44,y
dey
bpl .1
bpl A2osX.Blk.GetParam.1
rts
*--------------------------------------
A2osX.Blk.GetDev
A2osX.Blk.GetCmdAndDev
jsr A2osX.Blk.GetCmdAndDevAX
stx $42
sta $43
rts
A2osX.Blk.GetCmdAndDevAX
txa
asl
sta $42 CMD
lsr
tax CMD
ldy #S.DEV.DEVID Drive 1, or 2
lda (pDev),y
@ -205,8 +223,7 @@ A2osX.Blk.GetDev
asl
asl
plp
ror
sta $43 DSSS0000
ror DSSS0000
rts
*--------------------------------------

View File

@ -22,13 +22,13 @@ MemMgr.ReqFlags .EQ ZPMEMMGR+10 store requested Flags
*--------------------------------------
* PUBLIC
*/--------------------------------------
* #GetMem
* ##In:
* # GetMem
* ## In:
* PUSHW = Size Requested
* PUSHB = Options
* S.MEM.F.INIT0 : init memory with 00
* S.MEM.F.ALIGN : page aligned
* ##Out:
* ## Out:
* CC : success
* YA = PTR to Mem
* X = hMem
@ -238,10 +238,10 @@ MemMgr.Init0 ldy #S.MEM.PTR
.8 rts
*/--------------------------------------
* #FreeMemA
* ##In:
* # FreeMemA
* ## In:
* A = hMem To Free
* ##Out:
* ## Out:
* none.
* (X,Y unmodified)
*\--------------------------------------
@ -327,10 +327,10 @@ K.FreeMemA phy
*--------------------------------------
K.FreeMemA.ERR >CSTR "***MemMgr:Attempt to Free an already freed hMem at $%H"
*/--------------------------------------
* #GetMemPtrA
* ##In:
* # GetMemPtrA
* ## In:
* A = hMem
* ##Out:
* ## Out:
* Y,A = PTR to MemBlock
* (X unmodified)
*\--------------------------------------
@ -343,10 +343,10 @@ K.GetMemPtrA jsr K.GetMemByIDA
ply
rts
*/--------------------------------------
* #GetMemByIDA
* ##In:
* # GetMemByIDA
* ## In:
* A = hMem
* ##Out:
* ## Out:
* Y,A = ZPMemMgrSPtr = PTR to S.MEM
* X unmodified
*\--------------------------------------
@ -403,10 +403,10 @@ K.SetLoMem
clc
rts
*/--------------------------------------
* #GetMemStatYA
* ##In:
* # GetMemStatYA
* ## In:
* Y,A = 24 bytes buffer
* ##Out:
* ## Out:
* Buffer filled with memory stats
*\--------------------------------------
K.GetMemStatYA >STYA ZPMemMgrDstPtr

View File

@ -4,13 +4,13 @@ LOMEM $A00
INC 1
AUTO 6
*/--------------------------------------
* #ExecProcessNewEnvYA
* #ExecProcessYA (Blocking Parent PID)
* #CreateProcessNewEnvYA
* #CreateProcessYA (Non Blocking)
* ##In:
* # ExecProcessNewEnvYA
* # ExecProcessYA (Blocking Parent PID)
* # CreateProcessNewEnvYA
* # CreateProcessYA (Non Blocking)
* ## In:
* Y,A = PTR To Cmd Line
* ##Out:
* ## Out:
* A = Child PSID
*\--------------------------------------
K.ExecProcessNewEnvYA
@ -47,10 +47,10 @@ K.CreateProcessYA
K.CreateProcess.Flags .BS 1
K.CreateProcess.CmdLine .BS 2
*/--------------------------------------
* #GetPSByIDA
* ##In :
* # GetPSByIDA
* ## In :
* A = PID
* ##Out :
* ## Out :
* Y,A = PTR to TSKSLOT
*\--------------------------------------
K.GetPSByIDA pha
@ -89,11 +89,11 @@ K.GetPSByIDA pha
clc
rts
*/--------------------------------------
* #Sleep
* # Sleep
* Make current process suspend until next RUN
* ##In :
* ## In :
* (none)
* ##Out :
* ## Out :
* (none)
*\--------------------------------------
K.Sleep pla get PC LO

View File

@ -4,11 +4,11 @@ LOMEM $A00
INC 1
AUTO 6
*/--------------------------------------
* #NewPStrYA
* # NewPStrYA
* Create a new copy of PSTR
* ##In:
* ## In:
* Y,A = PTR to buffer
* ##Out:
* ## Out:
* CC : success
* Y,A = PTR to String
* X = hMem (PSTR)
@ -34,12 +34,12 @@ K.NewPStrYA >STYA ZPPtr2
clc
.9 rts
*/--------------------------------------
* #PStrCpy
* # PStrCpy
* Copy string
* ##In:
* ## In:
* PUSHW = Ptr to SRC (PSTR)
* PUSHW = Ptr to DST (PSTR)
* ##Out:
* ## Out:
* DST = SRC (PSTR)
*\--------------------------------------
K.PStrCpy jsr PullPtr1Ptr2
@ -58,12 +58,12 @@ K.PStrCpyPtr2Ptr1
.2 clc
rts
*/--------------------------------------
* #PStrCat
* # PStrCat
* Append SRC to DST
* ##In:
* ## In:
* PUSHW = Ptr to SRC (PSTR)
* PUSHW = Ptr to DST (PSTR)
* ##Out:
* ## Out:
* DST = DST+SRC (PSTR)
*\--------------------------------------
K.PStrCat jsr PullPtr1Ptr2
@ -93,12 +93,12 @@ K.PStrCat jsr PullPtr1Ptr2
clc
rts
*/--------------------------------------
* #PStrMatch
* # PStrMatch
* Compare a String against pattern
* ##In:
* ## In:
* PUSHW = PTR to Pattern (e.g. '*test?.txt')
* PUSHW = PTR to Src String
* ##Out:
* ## Out:
* CC : match
* CS : no match
*\--------------------------------------
@ -167,11 +167,11 @@ K.PStrMatch jsr PullPtr1Ptr2
.9 sec
rts
*/--------------------------------------
* #PStrUprYA/PStrLwrYA
* # PStrUprYA/PStrLwrYA
* Convert string to UPPERCASE/lowercase
* ##In:
* ## In:
* Y,A = PTR to String (PSTR)
* ##Out:
* ## Out:
* Uppercased/lowercased String in Buffer
*\--------------------------------------
K.PStrUprYA ldx #0
@ -202,9 +202,9 @@ K.PStrLwrYA ldx #2
*--------------------------------------
K.PStrUprLwr .AS "azAZ"
*/--------------------------------------
* #PStrFTime
* # PStrFTime
* Convert S.TIME struct to PSTR
* ##In:
* ## In:
* PUSHW = Dst PTR To PSTR Buf
* PUSHW = Src PTR To Format String
* %a : Abbreviated weekday name : Thu
@ -222,7 +222,7 @@ K.PStrUprLwr .AS "azAZ"
* %y : Year, last two digits (00-99)
* %Y : Year four digits 2001
* PUSHW = Src PTR To S.Time
* ##Out:
* ## Out:
* none. always succeed.
*\--------------------------------------
K.PStrFTime jsr PullPtr1Ptr2Ptr3
@ -452,11 +452,11 @@ K.PStrFTime.MON >PSTR "January"
K.PStrFTime.BIN .BS 1
K.PStrFTime.DEC .BS 1 always < 100
*/--------------------------------------
* #PStr2StrArrayYA
* # PStr2StrArrayYA
* Convert a PSTR (e.g. : command Line) to a Array of PSTRs (Args[])
* ##In:
* ## In:
* Y,A = PTR to String
* ##Out:
* ## Out:
* CC : success
* Y,A = PTR to StrArray
* X = hMem

View File

@ -98,21 +98,17 @@ A2osX.E0 .EQ *
A2osX.E0.SIZE .EQ *-A2osX.E0
* CONTROL SECTION :
.DO A2osX.GP.SIZE>$1E0
.LIST ON
.DO A2osX.GP.SIZE>$1E0
* !!!!!!!!! ERROR:GP too big !!!!!!!!!!
.LIST OFF
.FIN
.DO A2osX.D1.SIZE>$1000
.LIST ON
* !!!!!!!!! ERROR:BNK1 too big !!!!!!!!
.LIST OFF
.FIN
.DO A2osX.D2.SIZE>$1000
.LIST ON
* !!!!!!!!! ERROR:BNK2 too big !!!!!!!!
.LIST OFF
.FIN
.LIST OFF
MAN
SAVE /A2OSX.SRC/SYS/KERNEL.S
ASM

View File

@ -8,7 +8,7 @@
## Out :
+ X=BlockCount (max 22)
+ A=PageCount (max 44)
+ Y,A=BufSize (max $4400)
# BuildProDOSCat