Kernel 0.9.2

This commit is contained in:
Rémy GIBERT 2018-07-18 17:30:42 +02:00
parent 0a8f2a8a01
commit 2199f9e651
64 changed files with 438 additions and 364 deletions

Binary file not shown.

Binary file not shown.

View File

@ -63,7 +63,7 @@ CS.RUN ldy #S.PS.ARGC
>PUSHEA.G DST.IP
>PUSHW L.SSCANF.IP
lda #1
>SYSCALL GetArg.A
>SYSCALL GetArg
>SYSCALL SScanF.YA
bcs .9
@ -125,7 +125,7 @@ CS.RUN.ADD >PUSHEA.G DST.MAC+5
>PUSHEA.G DST.MAC
>PUSHW L.SSCANF.MAC
lda #2
>SYSCALL GetArg.A
>SYSCALL GetArg
>SYSCALL SScanF.YA
bcs .9

View File

@ -400,7 +400,7 @@ DIR.IN jsr SRC.GetNextCharNB
bcs .9
>LDYA ZPLinePtr
>SYSCALL RealPath.YA
>SYSCALL RealPath
phx
@ -410,7 +410,7 @@ DIR.IN jsr SRC.GetNextCharNB
pha
txa
>SYSCALL FreeMem.A
>SYSCALL FreeMem
pla
plp

View File

@ -7,7 +7,7 @@ FIO.LOAD.ASM.T >STYA ZPPtr2
ldy #S.PS.hARGS
lda (pPS),y
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>STYA ZPPtr1
@ -48,7 +48,7 @@ FIO.LOAD.ASM.T >STYA ZPPtr2
lda (pData),y
beq .4
>SYSCALL FreeMem.A
>SYSCALL FreeMem
ldy #ASM.T.hMem
lda #0
sta (pData),y
@ -68,7 +68,7 @@ FIO.LOAD.ASM.T >STYA ZPPtr2
ldy #ASM.T.hMem
sta (pData),y
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>STYA ZPPtr1
ldy #ASM.T.AM

View File

@ -38,7 +38,7 @@ MAC.Reset >STZ.G MAC.CtxID
MAC.Quit >LDA.G MAC.hCtxBuf
beq .1
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.1 >LDA.G MAC.hCtxList
beq .2
@ -47,7 +47,7 @@ MAC.Quit >LDA.G MAC.hCtxBuf
.2 >LDA.G MAC.hMacroBuf
beq .3
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.3 >LDA.G MAC.hMacroList
beq .8
@ -84,15 +84,15 @@ MAC.AddChar >LDA.G ASM.PASS If Pass#2, ignore
tax
beq .1
* >SYSCALL PutChar.A
* >SYSCALL PutChar
.8 clc
rts
.1
* lda #13
* >SYSCALL PutChar.A
* >SYSCALL PutChar
* lda #10
* >SYSCALL PutChar.A
* >SYSCALL PutChar
clc

View File

@ -47,7 +47,7 @@ OUT.PrintLineErr
.3 phx
lda #'-'
>SYSCALL PutChar.A
>SYSCALL PutChar
plx
bcs .9
dex
@ -56,14 +56,14 @@ OUT.PrintLineErr
.4 lda #'^'
phy
>SYSCALL PutChar.A
>SYSCALL PutChar
ply
bcs .9
.5 lda #13
>SYSCALL PutChar.A
>SYSCALL PutChar
lda #10
>SYSCALL PutChar.A
>SYSCALL PutChar
.9 rts
*---------------------------------------
@ -167,9 +167,9 @@ OUT.Print >SYSCALL printf
bra OUT.Print1
OUT.PrintCR lda #13
>SYSCALL PutChar.A
>SYSCALL PutChar
lda #10
>SYSCALL PutChar.A
>SYSCALL PutChar
OUT.Print1 >DEC.G OUT.LineCnt
bne .8

View File

@ -53,17 +53,17 @@ SYM.Reset lda #0
SYM.Quit >LDA.G SYM.hLookupBuf
beq .1
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.1 >LDA.G SYM.hNameBuf
beq .2
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.2 >LDA.G SYM.hGlobalBuf
beq .3
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.3 >LDA.G SYM.hGlobalList
beq .8
>SYSCALL SListFree.A

View File

@ -200,8 +200,8 @@ CS.INIT ldy #S.PS.ARGC
beq .99
lda #1
>SYSCALL GetArg.A
>SYSCALL RealPath.YA
>SYSCALL GetArg
>SYSCALL RealPath
txa
ldy #SRC.hFILENAME
@ -278,7 +278,7 @@ CS.RUN >SYSCALL GetChar
ldy #SRC.hFILENAME
lda (pData),y
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
jsr FIO.OpenFile
bcs .99
@ -344,22 +344,22 @@ CS.QUIT jsr FIO.FileClose
>LDA.G ASM.T.hMem
beq .1
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.1 >LDA.G SRC.hFILENAME
beq .2
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.2 >LDA.G SRC.hLineBuf
beq .3
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.3 >LDA.G SRC.hTmpBuf
beq .8
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.8 clc
rts

View File

@ -141,7 +141,7 @@ CS.DOEVENT sec
*--------------------------------------
CS.QUIT >LDA.G hBuf
beq .8
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.8 clc
rts

View File

@ -40,7 +40,7 @@ L.ASCII .DA ASCII
*--------------------------------------
CS.INIT
.1 >INC.G ArgCount
>SYSCALL GetArg.A
>SYSCALL GetArg
bcs .7
>STYA ZPPtr1
@ -112,7 +112,7 @@ CS.RUN >SYSCALL GetChar
bne .2
.1 >INC.G ArgIndex
>SYSCALL GetArg.A
>SYSCALL GetArg
bcs .99 No more arg...the end!
>STYA ZPPtr1
@ -219,11 +219,11 @@ CS.RUN.PRINT sty BytesRead Y,A = Bytes read
bra .7
.4 lda #13
>SYSCALL PutChar.A
>SYSCALL PutChar
bcs .9
lda #10
.6 >SYSCALL PutChar.A
.6 >SYSCALL PutChar
bcs .9
.7 inc ByteIndex
@ -245,7 +245,7 @@ CS.RUN.PRINTNUM clc
>SYSCALL printf
.8 rts
*--------------------------------------
CS.RUN.OPEN >SYSCALL RealPath.YA
CS.RUN.OPEN >SYSCALL RealPath
bcs .9
stx hFullPath
pha
@ -272,14 +272,14 @@ CS.RUN.OPEN >SYSCALL RealPath.YA
.99 pha
lda hFullPath
>SYSCALL FreeMem.A
>SYSCALL FreeMem
pla
.9 sec
rts
*--------------------------------------
CS.QUIT >LDA.G hBuf
beq CS.RUN.CLOSE
>SYSCALL FreeMem.A
>SYSCALL FreeMem
CS.RUN.CLOSE ldy #hFILE
lda (pData),y

View File

@ -47,7 +47,7 @@ L.PRODOS.FT.TXT .DA PRODOS.FT.TXT
*--------------------------------------
CS.INIT
.1 >INC.G ArgCount
>SYSCALL GetArg.A
>SYSCALL GetArg
bcs .7
>STYA ZPPtr1
@ -134,7 +134,7 @@ CS.RUN >SYSCALL GetChar
>LDA.G hFilter
beq .4 No filter....
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>PUSHYA
>PUSHW ZPFileName
>SYSCALL StrMatch
@ -225,16 +225,16 @@ CS.RUN.CheckErr bcs .1
rts
.2 lda #13
>SYSCALL PutChar.A
>SYSCALL PutChar
lda #10
>SYSCALL PutChar.A
>SYSCALL PutChar
pla
sec
.9 rts
*--------------------------------------
CS.RUN.GetFilePath
>LDA.G hSrcBasePath
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>PUSHYA
>PUSHW ZPFullPath
@ -254,11 +254,11 @@ CS.QUIT jsr LeaveSubDir
>LDA.G hFilter
beq .1
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.1 >LDA.G hSrcFullPath
beq .8
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.8 clc
rts

View File

@ -63,14 +63,14 @@ CS.RUN.ADD cmp #2
>PUSHEA.G DST.IP
>PUSHW L.SSCANF.IP
lda #1
>SYSCALL GetArg.A
>SYSCALL GetArg
>SYSCALL SScanF.YA
bcs .9
>PUSHEA.G DST.IP
lda #2
>SYSCALL GetArg.A
>SYSCALL GetArg
>PUSHYA
>LIBCALL hLIBTCPIP,LIBTCPIP.DNS.ADD
bcs .99
@ -110,7 +110,7 @@ CS.RUN.DUMP >LIBCALL hLIBTCPIP,LIBTCPIP.DNS.GetCache
ldy #S.DNSCACHE.hNAME
lda (ZPPTR1),y
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>PUSHYA
ldy #S.DNSCACHE.ID

View File

@ -8,7 +8,7 @@ BUF.InsertClipboard
lda (pData),y
beq .8
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>STYA ClipboardPtr
jsr BUF.ComputeCOffset
@ -250,10 +250,10 @@ BUF.SelToClipboard
lda (pData),y
beq .1
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.1 >LDYA TmpCount
>SYSCALL GetMem.YA
>SYSCALL GetMem
bcs .9
>STYA ClipboardPtr
@ -270,7 +270,7 @@ BUF.SelToClipboard
ldy #hBuffer
lda (pData),y
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>STYA BufPtr
lda BufPtr
@ -372,7 +372,7 @@ BUF.GetLineAX sta BUF.TmpLine1
ldy #hBuffer
lda (pData),y
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>STYA BufPtr
stz BUF.TmpLine2
@ -443,17 +443,17 @@ BUF.GetNewYA >STYA TmpLen
ldy #hBufferBackup
lda (pData),y
beq .1
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.1 ldy #hBuffer
lda (pData),y
ldy #hBufferBackup
sta (pData),y
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>STYA BufPtrBackup
>LDYA TmpLen
>SYSCALL GetMem0.YA
>SYSCALL GetMem0
bcs .9
>STYA BufPtr

View File

@ -361,7 +361,7 @@ Ctrl.S lda #PromptModeSave
lda (pData),y
beq .2
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>STYA ZPPTR1
lda (ZPPTR1)
@ -622,10 +622,10 @@ Prompt.Save cmp #3
ldy #hFileName
lda (pData),y
beq .11
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.11 >LDYA pData
>SYSCALL NewStr.YA
>SYSCALL NewStr
txa
ldy #hFileName

View File

@ -12,7 +12,7 @@ SCRN.Init ldy #ScreenH
>SYSCALL printf
bcs .9
lda #12
>SYSCALL PutChar.A
>SYSCALL PutChar
bcs .9
lda #0
@ -48,7 +48,7 @@ SCRN.UpdateTopBar
ldy #hFileName
lda (pData),y
beq .1
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
bra .2
.1 >LDYA L.MSG.NEWFILE
@ -161,7 +161,7 @@ SCRN.UpdateLineAtALenY
pla
bcs .11
>SYSCALL PutChar.A
>SYSCALL PutChar
.11 ply
plx
bcs .9
@ -306,7 +306,7 @@ SCRN.ClearEOLA pha
pha
lda #' '
>SYSCALL PutChar.A
>SYSCALL PutChar
bcc .1
plx
rts
@ -333,7 +333,7 @@ SCRN.InvLineA sta .2+1
.1 pha
lda #' '
>SYSCALL PutChar.A
>SYSCALL PutChar
pla
bcs .9

View File

@ -106,9 +106,9 @@ CS.INIT lda #$ff
beq .1 No arg, new file....
lda #1
>SYSCALL GetArg.A
>SYSCALL GetArg
>SYSCALL RealPath.YA
>SYSCALL RealPath
txa
ldy #hFileName
sta (pData),y
@ -117,7 +117,7 @@ CS.INIT lda #$ff
bcc .8 if CS, Failed to load file, keep name, but new file....
.1 >LDYAI 1 buffer size = 0 (+ 1 for ending 0)
>SYSCALL GetMem0.YA
>SYSCALL GetMem0
bcs .9
txa
@ -169,22 +169,22 @@ CS.DOEVENT sec
CS.QUIT ldy #hBuffer
lda (pData),y
beq .1
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.1 ldy #hBufferBackup
lda (pData),y
beq .2
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.2 ldy #hClipBoard
lda (pData),y
beq .3
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.3 ldy #hFileName
lda (pData),y
beq .8
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.8 >LDYA L.SEQ.RESET
>SYSCALL printf
@ -344,7 +344,7 @@ LoadFile >PUSHWI 0 Aux type
ldy #hFileName
lda (pData),y
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>PUSHYA
>SYSCALL LoadFile
@ -356,7 +356,7 @@ LoadFile >PUSHWI 0 Aux type
bne .2
inc +1 for ending zero
.2 >SYSCALL GetMem0.YA
.2 >SYSCALL GetMem0
bcs .98
>STYA ZPPTR2
@ -366,7 +366,7 @@ LoadFile >PUSHWI 0 Aux type
lda hMem
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>STYA ZPPTR1
lda TmpLen
@ -405,7 +405,7 @@ LoadFile >PUSHWI 0 Aux type
.98 pha
lda hMem
>SYSCALL FreeMem.A
>SYSCALL FreeMem
pla
sec
.9 rts
@ -414,7 +414,7 @@ SaveFile >PUSHWI 0 Aux type
>PUSHBI 4 S.FI.T.TXT
>PUSHBI SYS.FOpen.X+SYS.FOpen.W
>LDA.G hFileName
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>PUSHYA
>SYSCALL FOpen
bcs .9
@ -422,7 +422,7 @@ SaveFile >PUSHWI 0 Aux type
pha
>LDA.G hBuffer
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>PUSHYA
>PUSHW.G FileLen
@ -436,13 +436,13 @@ SaveFile >PUSHWI 0 Aux type
tax
pla
phx
>SYSCALL FClose.A
>SYSCALL FClose
pla
sec
rts
.1 pla
>SYSCALL FClose.A
>SYSCALL FClose
.9 rts
*--------------------------------------

View File

@ -45,7 +45,7 @@ CS.INIT ldy #S.PS.ARGC
.1 >INC.G ArgIndex
>SYSCALL GetArg.A
>SYSCALL GetArg
bcc .11
jmp .8
@ -201,7 +201,7 @@ CS.RUN.InitCat >LDA.G CatSize
rts
*--------------------------------------
CS.RUN.BuildCat >LDA.G hDev
>SYSCALL GetDevStatus.A
>SYSCALL GetDevStatus
bcs .99
>STYA ZPPtr1
@ -213,7 +213,7 @@ CS.RUN.BuildCat >LDA.G hDev
>STA.G SizeInBlocks+1
>LDA.G hDev
>SYSCALL GetDevByID.A
>SYSCALL GetDevByID
bcs .99
pha
@ -244,7 +244,7 @@ CS.RUN.BuildCat >LDA.G hDev
pla
ply
>SYSCALL GetMem0.YA BufferSize
>SYSCALL GetMem0 BufferSize
bcs .9
phx
@ -272,7 +272,7 @@ CS.RUN.WriteCat >PUSHB.G hDev
bcs .9
lda #'.'
>SYSCALL PutChar.A
>SYSCALL PutChar
>LDA.G BlkParams.Ptr+1
clc
@ -292,7 +292,7 @@ CS.DOEVENT sec
*--------------------------------------
CS.QUIT >LDA.G hBuf
beq .1
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.1 lda hLIBBLKDEV
beq .8

View File

@ -79,11 +79,11 @@ CS.RUN >LDYA L.MSG0
jmp CS.RUN.DONE
CS.RUN.DUMPDEV >STA.G DevID
>SYSCALL GetDevByID.A
>SYSCALL GetDevByID
>STYA ZPDevPtr
>LDA.G DevID
>SYSCALL GetDevStatus.A
>SYSCALL GetDevStatus
>STYA ZPDevStatPtr
>LDYA L.MSG0.L
@ -159,7 +159,7 @@ CS.RUN.LINK >PUSHW L.MSG1.LINK.OK
.4 phx
lda #'0'
>SYSCALL PutChar.A
>SYSCALL PutChar
plx
dex
bne .4

View File

@ -51,7 +51,7 @@ L.FMT.DateTime .DA FMT.DateTime
*--------------------------------------
CS.INIT
.1 >INC.G ArgCount
>SYSCALL GetArg.A
>SYSCALL GetArg
bcs .6
>STYA ZPPtr1
@ -88,7 +88,7 @@ CS.INIT
.7 ldy #S.PS.hPREFIX
lda (pPs),y
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
jsr InitSrcDirYA
bcs .9
@ -123,7 +123,7 @@ CS.RUN >SYSCALL GetChar
>LDA.G hFilter
beq .4 No filter....
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>PUSHYA
>PUSHW ZPFileName
>SYSCALL StrMatch
@ -225,7 +225,7 @@ CS.RUN.DIR >LDA.G bAllmostAll
bcs .2
lda #' '
phy
>SYSCALL PutChar.A
>SYSCALL PutChar
ply
bcc .11
rts
@ -388,9 +388,9 @@ CS.RUN.NewLine ldy #ColCount
beq CS.RUN.NewLine.8
CS.RUN.NewLine.1
lda #13
>SYSCALL PutChar.A
>SYSCALL PutChar
lda #10
>SYSCALL PutChar.A
>SYSCALL PutChar
rts
CS.RUN.NewLine.8
clc
@ -399,7 +399,7 @@ CS.RUN.NewLine.8
CS.RUN.ENTER.MSG
ldy #hSrcBasePath
lda (pData),y
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>PUSHYA
>LDYA L.MSG.ENTER
>SYSCALL printf
@ -414,7 +414,7 @@ CS.QUIT jsr LeaveSubDir
ldy #hFilter
lda (pData),y
beq .3
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.3 clc
rts

View File

@ -9,7 +9,6 @@ AUTO 4,1
.INB /A2OSX.BUILD/INC/MACROS.I
.INB /A2OSX.BUILD/INC/PRODOS.I
.INB /A2OSX.BUILD/INC/A2OSX.I
.INB /A2OSX.BUILD/INC/KERNEL.I
*--------------------------------------
ZPPTR1 .EQ ZPBIN
ZPPTR2 .EQ ZPBIN+2
@ -44,10 +43,10 @@ CS.INIT clc
*--------------------------------------
CS.RUN >LDYA L.MSG0
>SYSCALL printf
>DEBUG
>LDA.G DEV.ID
.1 >SYSCALL GetDevByID.A
.1 >SYSCALL GetDevByID
bcs .7
>STYA ZPPTR1
@ -57,7 +56,7 @@ CS.RUN >LDYA L.MSG0
bcs .9
>LDA.G DEV.ID
>SYSCALL GetDevStatus.A
>SYSCALL GetDevStatus
bcs .6
>STYA ZPPTR2
@ -67,10 +66,10 @@ CS.RUN >LDYA L.MSG0
bcs .9
.6 lda #13
>SYSCALL PutChar.A
>SYSCALL PutChar
lda #10
>SYSCALL PutChar.A
>SYSCALL PutChar
>DEBUG
.7 >LDA.G DEV.ID
inc
sta (pData),y
@ -81,46 +80,22 @@ CS.RUN >LDYA L.MSG0
sec we do not want to stay in memory
.9 rts
*--------------------------------------
DumpHeader ldy #S.DEV.DRV.JMP+1
DumpHeader ldy #S.FD.DEV.DRVPTR+1
>PUSHB (ZPPTR1),y
dey
>PUSHB (ZPPTR1),y
lda #S.DEV.NAME
lda #S.FD.DEV.NAME
clc
adc ZPPTR1
tay
lda /S.DEV.NAME
lda /S.FD.DEV.NAME
adc ZPPTR1+1
>PUSHYA
ldy #S.DEV.F
>PUSHB (ZPPTR1),y
ldy #S.DEV.S
lda (ZPPTR1),y
>STA.G DEV.S
ldy #DEV.SFLAGS+7
ldx #7
.1 lsr
pha
lda #'-'
bcc .2
lda MSG.SFLAGS,x
.2 sta (pData),y
pla
dey
dex
bpl .1
>PUSHEA.G DEV.SFLAGS
>LDA.G DEV.ID
>PUSHA
@ -175,6 +150,30 @@ DumpStatus >LDA.G DEV.S
.3 >SYSCALL printf
rts
*--------------------------------------
ST ldy #S.DSTAT.S
lda (ZPPTR1),y
>STA.G DEV.S
ldy #DEV.SFLAGS+7
ldx #7
.1 lsr
pha
lda #'-'
bcc .2
lda MSG.SFLAGS,x
.2 sta (pData),y
pla
dey
dex
bpl .1
>PUSHEA.G DEV.SFLAGS
*--------------------------------------
CS.EVENT sec
rts
*--------------------------------------
@ -182,8 +181,8 @@ CS.QUIT clc
rts
*--------------------------------------
CS.END
MSG0 .AZ "ID Status Flags Name Addr. Typ/Sub IDString Version Size (BLK)\r\n"
MSG1 .AZ "%03d %s %b %4s $%H "
MSG0 .AZ "ID Name Addr. Status Typ/Sub IDString Version Size (BLK)\r\n"
MSG1 .AZ "%03d %s $%H "
MSG2.B .AZ "$%h/$%h %16S %03d.%03d %10u"
MSG2.C .AZ "$%h/$%h %16S %03d.%03d n/a"
MSG.SFLAGS .AS "BWRLNEIO"

View File

@ -34,10 +34,10 @@ CS.INIT clc
rts
*--------------------------------------
CS.RUN lda #1
>SYSCALL GetArg.A
>SYSCALL GetArg
bcs .99
>SYSCALL RealPath.YA
>SYSCALL RealPath
bcs .9
phy
pha
@ -61,7 +61,7 @@ CS.DOEVENT sec
*--------------------------------------
CS.QUIT >LDA.G hFullPath
beq .8
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.8 clc
rts

View File

@ -48,7 +48,7 @@ CS.INIT ldy #S.PS.ARGC
.1 >INC.G ArgIndex
>SYSCALL GetArg.A
>SYSCALL GetArg
bcs .8
>STYA ZPPtr1
@ -103,7 +103,7 @@ CS.RUN >LDA.G bText
beq CS.RUN.FILE
*--------------------------------------
CS.RUN.TEXT >LDA.G Arg
>SYSCALL GetArg.A
>SYSCALL GetArg
>PUSHYA
>PUSHEA.G MD5Buf
@ -114,17 +114,17 @@ CS.RUN.TEXT >LDA.G Arg
>SYSCALL printf
lda #13
>SYSCALL PutChar.A
>SYSCALL PutChar
lda #10
>SYSCALL PutChar.A
>SYSCALL PutChar
lda #0
sec
.9 rts
*--------------------------------------
CS.RUN.FILE >LDA.G Arg
>SYSCALL GetArg.A
>SYSCALL RealPath.YA
>SYSCALL GetArg
>SYSCALL RealPath
bcc .10
rts
@ -143,7 +143,7 @@ CS.RUN.FILE >LDA.G Arg
>PUSHBI SYS.FOpen.R
>LDA.G hFullPath
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>PUSHYA
@ -180,9 +180,9 @@ CS.RUN.FILE >LDA.G Arg
>SYSCALL printf
lda #13
>SYSCALL PutChar.A
>SYSCALL PutChar
lda #10
>SYSCALL PutChar.A
>SYSCALL PutChar
lda #0
sec
@ -194,12 +194,12 @@ CS.DOEVENT sec
CS.QUIT >LDA.G hFullPath
beq .1
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.1 >LDA.G hDataBuf
beq .2
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.2 >LDA.G hFile
beq .3

View File

@ -46,7 +46,7 @@ CS.INIT clc
rts
*--------------------------------------
CS.RUN >LDYA L.MemStat
>SYSCALL GetMemStat.YA
>SYSCALL GetMemStat
>LDYA L.MSG.Main
>SYSCALL printf

View File

@ -50,7 +50,7 @@ L.MSG.FREE .DA MSG.FREE
CS.INIT >INC.G MEM.COUNT Skip SLOT0
>LEA.G MemStat
>SYSCALL GetMemStat.YA
>SYSCALL GetMemStat
* lda (pPs)
* ora #S.PS.F.EVENT Now accept events
@ -93,7 +93,7 @@ CS.RUN >SYSCALL GetChar
>SYSCALL printf
.1 >LDA.G MEM.COUNT
>SYSCALL GetMemByID.A
>SYSCALL GetMemByID
>STYA ZPPTR1
lda (ZPPTR1)
bpl .2
@ -213,7 +213,7 @@ CS.RUN.PRINTMEM ldy #S.MEM.LEN+1
ldy #S.MEM.OWNERPID
lda (ZPPTR1),y
>SYSCALL GetPSStatus.A
>SYSCALL GetPSStatus
bcc .12
>LDYA L.MSG1.INV
@ -261,7 +261,7 @@ CS.RUN.PRINTMEM ldy #S.MEM.LEN+1
>LDYA L.MSG1.HEX
bra .8
****** BIN
.7 >SYSCALL GetMemPtr.A
.7 >SYSCALL GetMemPtr
>PUSHYA
>LDYA L.MSG1.BIN

View File

@ -74,7 +74,7 @@ CS.RUN.READ jsr NSC.Init
rts
CS.RUN.SET lda #1
>SYSCALL GetArg.A
>SYSCALL GetArg
>STYA ZPPtr1
lda (ZPPtr1)
@ -290,11 +290,11 @@ NSC.Dump ldx #1
lda DS1216E.DATA+2
jsr PrintBCD
lda #'/'
>SYSCALL PutChar.A
>SYSCALL PutChar
lda DS1216E.DATA+1
jsr PrintBCD
lda #'/'
>SYSCALL PutChar.A
>SYSCALL PutChar
lda DS1216E.DATA
jsr PrintBCD
@ -307,15 +307,15 @@ NSC.Dump ldx #1
.4 and #$3F
jsr PrintBCD
lda #':'
>SYSCALL PutChar.A
>SYSCALL PutChar
lda DS1216E.DATA+5
jsr PrintBCD
lda #':'
>SYSCALL PutChar.A
>SYSCALL PutChar
lda DS1216E.DATA+6
jsr PrintBCD
lda #'.'
>SYSCALL PutChar.A
>SYSCALL PutChar
lda DS1216E.DATA+7
jsr PrintBCD
rts
@ -326,12 +326,12 @@ PrintBCD pha
lsr
lsr
ora #$30
>SYSCALL PutChar.A
>SYSCALL PutChar
bcs .9
pla
and #$0f
ora #$30
>SYSCALL PutChar.A
>SYSCALL PutChar
.9 rts
*--------------------------------------
GetBCD lda (ZPPtr1),y

View File

@ -80,7 +80,7 @@ CS.RUN.IPOK ldy #S.PS.ARGC
.2 >PUSHW pData DST.IP
lda #1
>SYSCALL GetArg.A
>SYSCALL GetArg
>PUSHYA
>LIBCALL hLIBTCPIP,LIBTCPIP.HST.GETBYNAME
bcc CS.RUN.HOSTOK
@ -89,7 +89,7 @@ CS.RUN.IPOK ldy #S.PS.ARGC
bcc .2
lda #1
>SYSCALL GetArg.A
>SYSCALL GetArg
>PUSHYA
>LDYA L.MSG.UNKNOWN
bra .99
@ -101,7 +101,7 @@ CS.RUN.IPOK ldy #S.PS.ARGC
rts
CS.RUN.HOSTOK lda #1
>SYSCALL GetArg.A
>SYSCALL GetArg
>PUSHYA
ldy #DST.IP+3
@ -196,14 +196,14 @@ CS.RUN.WAIT.REPLY
ldy #hFrame
sta (pData),y
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>STYA ZPFrameBase
jsr CS.Print.REPLY
bcs CS.RUN.ERR
ldy #hFrame
lda (pData),y
>SYSCALL FreeMem.A
>SYSCALL FreeMem
ldy #hFrame
lda #0
@ -295,7 +295,7 @@ CS.QUIT ldy #hFrame
lda (pData),y
beq .1
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.1 ldy #hSocket
lda (pData),y

View File

@ -40,7 +40,7 @@ CS.INIT clc
rts
*--------------------------------------
CS.RUN >LDYA pData
>SYSCALL GetPSStat.YA
>SYSCALL GetPSStat
>LDYA L.MSG0
>SYSCALL printf
@ -60,12 +60,12 @@ CS.RUN >LDYA pData
tay
lda (pData),y PID
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>STYA ZPPtr
ldy #S.PS.hARGS
lda (ZPPtr),y
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>PUSHYA
ldy #S.PS.PPID

View File

@ -82,7 +82,7 @@ CS.RUN jsr Init.Timeout
.1 >PUSHW L.Socket.Dst.Addr
lda #1
>SYSCALL GetArg.A
>SYSCALL GetArg
>PUSHYA
>LIBCALL hLIBTCPIP,LIBTCPIP.HST.GETBYNAME
bcc .2
@ -92,7 +92,7 @@ CS.RUN jsr Init.Timeout
bcc .1
lda #1
>SYSCALL GetArg.A
>SYSCALL GetArg
>PUSHYA
>LDYA L.MSG.UNKNOWN
>SYSCALL printf
@ -140,21 +140,21 @@ CS.RUN jsr Init.Timeout
.6 ldy #hFrame
sta (pData),y
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>STYA ZPFrameBase
jsr DumpRPCFrame
ldy #hFrame
lda (pData),y
>SYSCALL FreeMem.A
>SYSCALL FreeMem
lda #0
sec
rts
.99 lda #1
>SYSCALL GetArg.A
>SYSCALL GetArg
>PUSHYA
>LDYA L.MSG.TIMEOUT
>SYSCALL printf

View File

@ -47,7 +47,7 @@ L.STAT .DA STAT
*--------------------------------------
CS.INIT
.1 >INC.G ArgCount
>SYSCALL GetArg.A
>SYSCALL GetArg
bcs .7
>STYA ZPPtr1
@ -117,7 +117,7 @@ CS.INIT
ldy #S.PS.hPREFIX no dst folder, use actual prefix
lda (pPs),y
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
jsr InitDstDirYA
bcs .99
.FIN
@ -235,7 +235,7 @@ CS.RUN >SYSCALL GetChar
lda (pData),y
beq .4 No filter....
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>PUSHYA
>PUSHW ZPFileName
>SYSCALL StrMatch
@ -527,10 +527,10 @@ CS.RUN.OVERWRITE.KEY
.FIN
*--------------------------------------
CS.RUN.CR lda #13
>SYSCALL PutChar.A
>SYSCALL PutChar
bcs .9
lda #10
>SYSCALL PutChar.A
>SYSCALL PutChar
.9 rts
*--------------------------------------
.DO X.COPY.TO.DEST=1
@ -645,14 +645,14 @@ CS.RUN.Copy stz .90+1
bcs .9
lda .90+1
>SYSCALL FreeMem.A
>SYSCALL FreeMem
ldy #bQuiet
lda (pData),y
bmi .8
lda #'.'
>SYSCALL PutChar.A
>SYSCALL PutChar
rts
.8 clc
@ -663,7 +663,7 @@ CS.RUN.Copy stz .90+1
.90 lda #$00
beq CS.RUN.CopyEnd
>SYSCALL FreeMem.A
>SYSCALL FreeMem
*--------------------------------------
CS.RUN.CopyEnd ldy #hSrcFile
lda (pData),y
@ -749,7 +749,7 @@ CS.RUN.BuildFilePath
lda (pData),y
beq .1
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>PUSHYA
bra .2
@ -763,7 +763,7 @@ CS.RUN.BuildFilePath
rts
*--------------------------------------
CS.RUN.GetPathY lda (pData),y
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
rts
*--------------------------------------
CS.RUN.IncCount ldy #Count
@ -812,7 +812,7 @@ CS.QUIT jsr LeaveSubDir
*--------------------------------------
CS.QUIT.FREE lda (pData),y
beq .9
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.9 rts
*--------------------------------------
MAN

View File

@ -13,7 +13,7 @@ X.MAX.RECURSE .EQ 8
* hDstBasePath .BS 1 (optional)
* STAT .BS S.STAT
*--------------------------------------
InitSrcDirYA >SYSCALL RealPath.YA
InitSrcDirYA >SYSCALL RealPath
bcc .10
rts
@ -84,7 +84,7 @@ InitSrcDirYA >SYSCALL RealPath.YA
adc #0
sta ZPPtr2+1
>SYSCALL Newstr.YA
>SYSCALL Newstr
bcs .9
txa
>STA.G hFilter
@ -93,7 +93,7 @@ InitSrcDirYA >SYSCALL RealPath.YA
sta (ZPPtr2)
.5 >LDYAI 256
>SYSCALL GetMem.YA Get a 256 buffer to store BasePath
>SYSCALL GetMem Get a 256 buffer to store BasePath
bcs .9
>STYA ZPPtr2
@ -108,7 +108,7 @@ InitSrcDirYA >SYSCALL RealPath.YA
bne .6
>LDYA ZPPtr2
>SYSCALL OpenDir.YA
>SYSCALL OpenDir
bcs .9
@ -128,7 +128,7 @@ InitSrcDirYA >SYSCALL RealPath.YA
.9 pha
>LDA.G hFullPath
>SYSCALL FreeMem.A
>SYSCALL FreeMem
pla
sec
InitSrcDirYA.RTS
@ -136,7 +136,7 @@ InitSrcDirYA.RTS
*--------------------------------------
.DO X.COPY.TO.DEST=1
InitDstDirYA >SYSCALL RealPath.YA
InitDstDirYA >SYSCALL RealPath
bcs InitSrcDirYA.RTS
>STYA ZPPtr1
@ -173,7 +173,7 @@ InitDstDirYA >SYSCALL RealPath.YA
adc #0
sta ZPPtr2+1
>SYSCALL NewStr.YA
>SYSCALL NewStr
bcs .9
txa
>STA.G hDstFileName
@ -182,7 +182,7 @@ InitDstDirYA >SYSCALL RealPath.YA
sta (ZPPtr2)
.5 >LDYAI 256
>SYSCALL GetMem.YA Get a 256 buffer to store DstBasePath
>SYSCALL GetMem Get a 256 buffer to store DstBasePath
bcs .9
>STYA ZPPtr2
@ -215,7 +215,7 @@ InitDstDirYA >SYSCALL RealPath.YA
.9 pha
>LDA.G hFullPath
>SYSCALL FreeMem.A
>SYSCALL FreeMem
pla
sec
rts
@ -324,11 +324,11 @@ GetEntry ldy #index
bne .8
* txa
* >SYSCALL FreeMem.A
* >SYSCALL FreeMem
sec
rts
.1 >SYSCALL GetMemPtr.A
.1 >SYSCALL GetMemPtr
>STYA ZPFileName
ldy #index
@ -376,7 +376,7 @@ GetEntry.ReadDir
lda #0
sta (pData),y reset hDIRENT
pla
>SYSCALL FreeMem.A discard previous hDIRENT
>SYSCALL FreeMem discard previous hDIRENT
.1 ldy #index
lda (pData),y
@ -385,7 +385,7 @@ GetEntry.ReadDir
tay
lda (pData),y
>SYSCALL ReadDir.A
>SYSCALL ReadDir
bcs .9
>STYA ZPFileName
@ -421,7 +421,7 @@ EnterSubDirYA >STYA ZPPtr2 save SUBDIR for StrCat
jsr EnterSubDirYA.1
>LDYA ZPPtr1
>SYSCALL OpenDir.YA
>SYSCALL OpenDir
bcs .9
pha
@ -452,7 +452,7 @@ EnterSubDirYA >STYA ZPPtr2 save SUBDIR for StrCat
.9 rts
EnterSubDirYA.1 lda (pData),y
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>STYA ZPPtr1 save full path
@ -490,7 +490,7 @@ LeaveSubDir ldy #index
lda #0
sta (pData),y
pla
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.1 ldy #index
lda (pData),y
@ -503,7 +503,7 @@ LeaveSubDir ldy #index
lda #0
sta (pData),y
pla
>SYSCALL CloseDir.A
>SYSCALL CloseDir
ldy #index
lda (pData),y
@ -513,12 +513,12 @@ LeaveSubDir ldy #index
ldy #hSrcBasePath
lda (pData),y
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.DO X.COPY.TO.DEST=1
ldy #hDstBasePath
lda (pData),y
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.FIN
.9 sec
@ -537,7 +537,7 @@ BasePath.. .DO X.COPY.TO.DEST=1
ldy #hSrcBasePath
BasePath..1 lda (pData),y
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>STYA ZPPtr1 save full path

View File

@ -48,7 +48,7 @@ L.MSG.DONE .DA MSG.DONE
*--------------------------------------
CS.INIT
.1 >INC.G ArgCount
>SYSCALL GetArg.A
>SYSCALL GetArg
bcs .7
>STYA ZPPtr1
@ -117,7 +117,7 @@ CS.INIT.OPENINPUT
txa
>STA.G hInputBuf
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>STYA ZPInputBufPtr
>LDYA L.MSG.FILE.OK
@ -311,7 +311,7 @@ CS.DOEVENT sec
*--------------------------------------
CS.QUIT >LDA.G hBuf
beq .1
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.1 >LDA.G hOutputFile
beq .8

View File

@ -67,6 +67,9 @@ ZPBaseL1 .EQ ZPDRV
ZPBaseL2 .EQ ZPDRV+2
ZPTmpWord .EQ ZPDRV+4
ZPTmpBool .EQ ZPDRV+6
ZPBufPtr .EQ ZPDRV+8
ZPCount .EQ ZPDRV+10
ZPIOCTL .EQ ZPDRV+12
*--------------------------------------
DRV.CS.START cld
jmp (.1,x)
@ -120,7 +123,7 @@ OPEN sta A2osX.SCRNDEVS DEV.ID in A
stz OutCnt
jsr RESET
ldy #0
.1 lda TelnetOpt,y
@ -143,7 +146,9 @@ CLOSE stz A2osX.SCRNDEVS+1
clc
rts
*--------------------------------------
READ jsr Char.Out.Get
READ >STYA ZPIOCTL
jsr Char.Out.Get
bcc .8 IF cs,no char in output buffer...
lda A2osX.ASCREEN
@ -183,14 +188,69 @@ READ jsr Char.Out.Get
.6 jsr Char.Out.Get
.8 clc
.8 pha
ldy #S.IOCTL.BUFPTR
lda (ZPIOCTL),y
sta ZPBufPtr
iny
lda (ZPIOCTL),y
sta ZPBufPtr+1
pla
sta (ZPBufPtr)
lda #1
ldy #S.IOCTL.BYTECNT
sta (ZPIOCTL),y
iny
dec
sta (ZPIOCTL),y
clc
rts
.9 lda #0 Error = char
sec
rts
*--------------------------------------
WRITE bit bEscMode
WRITE >STYA ZPIOCTL
ldy #S.IOCTL.BUFPTR
lda (ZPIOCTL),y
sta ZPBufPtr
iny
lda (ZPIOCTL),y
sta ZPBufPtr+1
ldy #S.IOCTL.BYTECNT
lda (ZPIOCTL),y
eor #$ff
sta ZPCount
iny
lda (ZPIOCTL),y
eor #$ff
sta ZPCount+1
.2 inc ZPCount
bne .3
inc ZPCount+1
bne .3
clc
rts
.3 lda (ZPBufPtr)
inc ZPBufPtr
bne .4
inc ZPBufPtr+1
.4 jsr WRITE.COUT
.5 bra .2
*--------------------------------------
WRITE.COUT bit bEscMode
bmi COUT.EscMode
bit bIACMode
bpl .10

View File

@ -78,7 +78,7 @@ Dev.Detect >STYA Args
sec
ror USERMAC
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>STYA ZPTmpPTR
jsr DecodeMac
bcc .4

View File

@ -229,7 +229,7 @@ READ .DO SSCIRQ=1
and #SSC.STATUS.nDSR true when 0
beq .90
lda #26 EOF
lda #C.EOF
.90 plp
sec
@ -298,7 +298,7 @@ WRITE .DO SSCIRQ=1
clc
rts
.90 lda #26 EOF
.90 lda #C.EOF
.9 plp
sec
rts

View File

@ -51,7 +51,7 @@ L.MSG.DONE .DA MSG.DONE
*--------------------------------------
CS.INIT
.1 >INC.G Count
>SYSCALL GetArg.A
>SYSCALL GetArg
bcs .7
>STYA ZPPtr1
@ -119,7 +119,7 @@ CS.INIT.OPENINPUT
txa
>STA.G hInputBuf
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>STYA ZPInputBufPtr
>LDYA L.MSG.FILE.OK
@ -413,7 +413,7 @@ CS.RUN.DumpChar >LDA.G CharOutByteW
.1 pha
lda #'|'
>SYSCALL PutChar.A
>SYSCALL PutChar
>LDA.G CharOutPixW
>STA.G Count
@ -432,7 +432,7 @@ CS.RUN.DumpChar >LDA.G CharOutByteW
lda #'O'
.5 phx
>SYSCALL PutChar.A
>SYSCALL PutChar
plx
>DEC.G Count
@ -451,11 +451,11 @@ CS.RUN.DumpChar >LDA.G CharOutByteW
pla
lda #'|'
>SYSCALL PutChar.A
>SYSCALL PutChar
lda #13
>SYSCALL PutChar.A
>SYSCALL PutChar
lda #10
>SYSCALL PutChar.A
>SYSCALL PutChar
lda ZPPTR1
clc
@ -759,7 +759,7 @@ CS.RUN.WriteBMAndTbl
bcs .9
>LDA.G hTblBuf
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>PUSHYA
>LDA.G FON.Header+S.FON.Last
@ -785,7 +785,7 @@ CS.DOEVENT sec
*--------------------------------------
CS.QUIT >LDA.G hOutPutBuf
beq .1
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.1 >LDA.G hOutputFile
beq .2
@ -793,15 +793,15 @@ CS.QUIT >LDA.G hOutPutBuf
.2 >LDA.G hInputBuf
beq .3
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.3 >LDA.G hCharBuf
beq .4
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.4 >LDA.G hTblBuf
beq .8
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.8 clc
rts

View File

@ -3,6 +3,11 @@ PREFIX /A2OSX.BUILD
AUTO 4,1
*--------------------------------------
KVER .EQ $5C00 92.0
K.ENV.SIZE .EQ 256
K.FLT.MAX .EQ 4
K.EVT.MAX .EQ 4
K.DEV.MAX .EQ 32
K.PS.MAX .EQ 32
*--------------------------------------
ZPDRV .EQ $20 32 bytes
ZPLIB .EQ $40 32 bytes

View File

@ -3,14 +3,6 @@ PREFIX /A2OSX.BUILD
AUTO 4,1
.LIST OFF
*--------------------------------------
* KERNEL CONSTANTS DEFINITON
*--------------------------------------
K.ENV.SIZE .EQ 256
K.FLT.MAX .EQ 4
K.EVT.MAX .EQ 4
K.DEV.MAX .EQ 32
K.PS.MAX .EQ 32
*--------------------------------------
ZPKERNEL .EQ $0
ZPMEMMGR .EQ $10
*--------------------------------------

View File

@ -138,7 +138,7 @@ MD5 >STYA ZPDataPtr
jsr MD5Finalize.I
pla
>SYSCALL FreeMem.A Free MD5 Context
>SYSCALL FreeMem Free MD5 Context
clc
.9 rts
@ -188,7 +188,7 @@ MD5Init >LDYAI S.MD5
* `>LDA.G md5`
* **Out:**
*\--------------------------------------
MD5Update >SYSCALL GetMemPtr.A get MD5 Context
MD5Update >SYSCALL GetMemPtr get MD5 Context
>STYA ZPCtxPtr
>PULLW ZPDataPtr get DATA
>PULLW ZPDataLen get LEN
@ -277,14 +277,14 @@ MD5Update.I ldy #S.MD5.FINALIZED
MD5Finalize >PULLA
pha
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>STYA ZPCtxPtr get MD5 Context
>PULLW ZPHashPtr
jsr MD5Finalize.I
pla
>SYSCALL FreeMem.A
>SYSCALL FreeMem
rts
MD5Finalize.I ldy #S.MD5.FINALIZED

View File

@ -8,7 +8,7 @@ WND.Init >LDYA L.DEVNAME.GFX
stx hDevScreen
txa
>SYSCALL GetDevStatus.A
>SYSCALL GetDevStatus
bcs .9
>STYA ZPPtr1

View File

@ -142,7 +142,7 @@ ARP.IN ldy #S.ARP.TPA+3
beq ARP.IN.REP
ARP.IN.EXIT lda hFrameIn
>SYSCALL FreeMem.A
>SYSCALL FreeMem
clc
rts

View File

@ -34,7 +34,7 @@ SET.IPCFG >PULLW ZPTmpPtr1
bpl .3
lda IPCFG+S.IPCFG.HDEV
>SYSCALL GetDevStatus.A
>SYSCALL GetDevStatus
>STYA ZPTmpPtr2
ldy #S.DSTAT.NIC.FLAGS

View File

@ -196,7 +196,7 @@ DNS.FIND.BY.NAME
ldy #S.DNSCACHE.hNAME
lda (ZPCachePtr),y
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>PUSHYA
>PUSHW ZPPtrDNS
@ -352,7 +352,7 @@ DNS.FREE ldy #S.DNSCACHE.hNAME
lda (ZPCachePtr),y
beq .1
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.1 lda #0
sta (ZPCachePtr)
rts
@ -374,7 +374,7 @@ DNS.POLL lda hDNSSocket1
rts
*--------------------------------------
DNS.DecodeMsg sta hFrameIn
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>STYA ZPFrameInPtr
ldy #S.DNS.F+1
@ -482,7 +482,7 @@ DNS.DecodeMsg sta hFrameIn
jsr DNS.UPDATE.BY.ID
.9 lda hFrameIn
>SYSCALL FreeMem.A
>SYSCALL FreeMem
rts
*--------------------------------------
DNS.CSTR2DNS lda (ZPPtrDNS)

View File

@ -230,7 +230,7 @@ FRM.SendIP ldx #3 Copy SRC.IP even if IP offload
lda hFrameOut
beq .9
>SYSCALL FreeMem.A
>SYSCALL FreeMem
clc
.9 rts
@ -264,7 +264,7 @@ FRM.Retry ldx FRM.QUEUE.Tail
.10 cpx FRM.QUEUE.Head
beq .8 Queue is empty, exit....
lda FRM.QUEUE.hMem,x
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>STYA ZPFrameOutPtr
ldx FRM.QUEUE.Tail
@ -285,7 +285,7 @@ FRM.Retry ldx FRM.QUEUE.Tail
.3 ldx FRM.QUEUE.Tail Success,or max retry, discard entry
lda FRM.QUEUE.hMem,x
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.4 ldx FRM.QUEUE.Tail
inx

View File

@ -67,7 +67,7 @@ ICMP.IN.ECHOREQ ldy #S.IP.DST+3
jmp FRM.SendIP
ICMP.IN.EXIT lda hFrameIn
>SYSCALL FreeMem.A
>SYSCALL FreeMem
rts
*--------------------------------------
ICMP.IN.ECHOREP jsr IP.FillSKT.TemplateSrcDst
@ -83,7 +83,7 @@ ICMP.IN.ECHOREP jsr IP.FillSKT.TemplateSrcDst
sta SKT.Template+S.SOCKET.DST.PORT
lda hSocketTable
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>STYA ZPPtrSKT
ldx #0
@ -126,7 +126,7 @@ ICMP.IN.ECHOREP jsr IP.FillSKT.TemplateSrcDst
bne .3
.9 lda hFrameIn
>SYSCALL FreeMem.A
>SYSCALL FreeMem
rts
*--------------------------------------
ICMP.ComputeChecksum

View File

@ -19,7 +19,7 @@ IP.IN ldy #S.IP.PROTOCOL
jsr TCP.IN TCP will NOT discard FrameIn
.9 lda hFrameIn
>SYSCALL FreeMem.A
>SYSCALL FreeMem
rts
*--------------------------------------
* In:

View File

@ -30,7 +30,7 @@ SKT.New.Listen sec
sta (ZPTmpPtr1),y
.1 lda hSocketTable
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>STYA ZPTmpPtr2
lda #$ff
@ -156,7 +156,7 @@ SKT.CloseA jsr SKT.GetA.I get SKT in ZPPtrSKT, S.SOCKET.SOCK in A
txa
tay
lda (ZPPtrSKT),y
>SYSCALL FreeMem.A
>SYSCALL FreeMem
bra .1
.8 lda #0
@ -206,7 +206,7 @@ SKT.GetA.I and #$7f
pha
lda hSocketTable
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>STYA ZPPtrSKT
pla
@ -248,7 +248,7 @@ SKT.GetA.I and #$7f
* Y,A = pS.SOCKET
*\--------------------------------------
SKT.GetTable lda hSocketTable
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
clc
rts
*/--------------------------------------
@ -665,7 +665,7 @@ SKT.AddDataToSktIn
ldy #S.SOCKET.SQ.hInMem
lda (ZPPtrSKT),y
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>STYA ZPTmpPtr1 Make ZPTmpPtr1=buffer base
lda ZPTmpPtr1
@ -775,7 +775,7 @@ SKT.GetDataFromSktIn
.10 ldy #S.SOCKET.SQ.hInMem
lda (ZPPtrSKT),y
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>STYA ZPTmpPtr1 Make ZPTmpPtr1=buffer base
lda ZPTmpPtr1
@ -928,7 +928,7 @@ SKT.AddDataToSktOut
ldy #S.SOCKET.SQ.hOutMem
lda (ZPPtrSKT),y
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>STYA ZPTmpPtr1 Make ZPTmpPtr1=buffer base
lda ZPTmpPtr1
@ -1019,7 +1019,7 @@ SKT.GetDataFromSktOut
ldy #S.SOCKET.SQ.hOutMem
lda (ZPPtrSKT),y
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>STYA ZPTmpPtr1 Make ZPTmpPtr1=buffer base
lda ZPTmpPtr1
@ -1189,7 +1189,7 @@ SKT.NewTCB >LDYAI S.TCB
*--------------------------------------
SKT.GetTCB ldy #S.SOCKET.SQ.hTCB
lda (ZPPtrSKT),y
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
bcs *
>STYA .1+1
@ -1203,7 +1203,7 @@ SKT.GetTCB ldy #S.SOCKET.SQ.hTCB
*--------------------------------------
SKT.StoreTCB ldy #S.SOCKET.SQ.hTCB
lda (ZPPtrSKT),y
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
bcs *
>STYA .2+1
@ -1218,17 +1218,17 @@ SKT.StoreTCB ldy #S.SOCKET.SQ.hTCB
SKT.Destroy ldy #S.SOCKET.SQ.hOutMem
lda (ZPPtrSKT),y
beq .1
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.1 ldy #S.SOCKET.SQ.hInMem
lda (ZPPtrSKT),y
beq .2
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.2 ldy #S.SOCKET.SQ.hTCB
lda (ZPPtrSKT),y
beq .3
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.3 lda #0
sta (ZPPtrSKT)

View File

@ -20,7 +20,7 @@ TCP.IN jsr IP.FillSKT.TemplateSrcDst
sta SKT.Template+S.SOCKET.SRC.PORT
lda hSocketTable
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>STYA ZPPtrSKT
ldx #0

View File

@ -20,7 +20,7 @@ UDP.IN jsr IP.FillSKT.TemplateSrcDst
sta SKT.Template+S.SOCKET.SRC.PORT
lda hSocketTable
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>STYA ZPPtrSKT
ldx #0
@ -72,7 +72,7 @@ UDP.IN jsr IP.FillSKT.TemplateSrcDst
bne .3
.9 lda hFrameIn
>SYSCALL FreeMem.A
>SYSCALL FreeMem
rts
*--------------------------------------
UDP.ComputeChecksum

View File

@ -132,7 +132,7 @@ LIB.UNLOAD dec RefCount
lda hSocketTable
beq .8
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.8 clc
rts
@ -173,7 +173,7 @@ POLL >PUSHB IPCFG+S.IPCFG.HDEV
jmp IP.IN
.9 lda hFrameIn
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.99 rts
*--------------------------------------
* Expire = every sec

View File

@ -215,13 +215,13 @@ CS.RUN.SKT.RCVD ldy #hSocket
bcs .9
ldy #hFrame
sta (pData),y
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>STYA ZPFrameBase
.9 rts
*--------------------------------------
CS.RUN.DISCARD ldy #hFrame
lda (pData),y
>SYSCALL FreeMem.A
>SYSCALL FreeMem
rts
*--------------------------------------
CS.DOEVENT lda (pEvent)

View File

@ -84,7 +84,7 @@ CS.INIT ldy #S.PS.ARGC
.9 rts
*--------------------------------------
CS.RUN >SLEEP
>SYSCALL GetChar
bcs CS.RUN

View File

@ -236,7 +236,7 @@ CS.QUIT ldx #CONN.MAX
>LDA.G hLineBuf
beq .3
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.3 lda hLIBTCPIP
>SYSCALL UnloadLib.A

View File

@ -159,7 +159,7 @@ CS.RUN.Loop >SLEEP
*--------------------------------------
CS.RUN.Load >PUSHEA.G StatBuf
>LDA.G hFileName
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>PUSHYA
>SYSCALL Stat
bcs .99
@ -186,7 +186,7 @@ CS.RUN.Load >PUSHEA.G StatBuf
>PUSHBI SYS.FOpen.R
>LDA.G hFileName
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>PUSHYA
>SYSCALL LoadFile
@ -194,7 +194,7 @@ CS.RUN.Load >PUSHEA.G StatBuf
txa
>STA.G hFileBuf
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>STYA ZPCfgPtr
* clc
rts
@ -218,7 +218,7 @@ CS.RUN.Save >PUSHWI 0 AUXTYPE
>PUSHBI SYS.FOpen.W+SYS.FOpen.X
>LDA.G hFileName
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>PUSHYA
>SYSCALL FOpen
@ -326,12 +326,12 @@ CS.DOEVENT sec do not discard TIMER event
CS.QUIT ldy #hFileBuf
lda (pData),y
beq .1
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.1 ldy #hFileName
lda (pData),y
beq .8
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.8 clc
rts

View File

@ -86,25 +86,25 @@ CS.RUN lda #0
bcc .2
lda #13
>SYSCALL PutChar.A
>SYSCALL PutChar
bcs .9
lda #10
>SYSCALL PutChar.A
>SYSCALL PutChar
bcs .9
>LDYA L.SHELL
>SYSCALL ExpandStr.YA
>SYSCALL ExpandStr
bcs .9
phx
>SYSCALL ExecPS.YA
>SYSCALL ExecPS
plx
php
pha
txa
>SYSCALL FreeMem.A
>SYSCALL FreeMem
pla
plp
@ -160,7 +160,7 @@ INPUT.CHARIN tax save char...
lda (pData),y
bne .1
txa
.1 >SYSCALL PutChar.A
.1 >SYSCALL PutChar
rts
.2 cpx #13 CR

View File

@ -177,7 +177,8 @@ CS.RUN >LDA.G bReadMode READ Command ?
.1 >SLEEP
>SYSCALL GetChar
bcc .3
cmp #26 EOF
cmp #C.EOF
beq .9
bne .1 no char

View File

@ -160,7 +160,7 @@ CFG.Read.LoadFile
stx CFG.hCfgFile
>STYA CFG.FileLen
txa
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>STYA ZPIPCfgPtr
.9 rts
*--------------------------------------
@ -168,11 +168,11 @@ CFG.Read.CleanUp
pha
lda CFG.hCfgPath
beq .1
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.1 lda CFG.hCfgFile
beq .8
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.8 pla
rts

View File

@ -115,7 +115,7 @@ CS.INIT.DEV >LDYA L.DEVNAME
bcs .9
>LDA.G hDev
>SYSCALL GetDevStatus.A
>SYSCALL GetDevStatus
bcs .9
>STYA ZPDevStatusPtr

View File

@ -382,14 +382,14 @@ CORE.ScrSel and #$0F
tax
lda A2osX.SCRNDEVS-1,x
ldy A2osX.SCRNDEVS-1,x
beq .8 No device claimed this screen
tay
stx A2osX.ASCREEN
>PUSHBI 0
lda #IOCTL.CONTROL
>DEBUG
jsr K.IOCTL

View File

@ -7,7 +7,7 @@ AUTO 4,1
* A = DevID
* **Out:**
* CC = OK, CS = ERROR
* Y,A = DEVSLOT
* Y,A = FD
*\--------------------------------------
K.GetDevByID cmp DevMgr.DevCnt
bcs K.GetDev.NODEV
@ -72,17 +72,27 @@ K.GetDev.9 rts
*/--------------------------------------
* # GetDevStatus
* **In:**
* A = DevID
* >PUSHWI S.DSTAT
* lda DevID
* **Out:**
* Y,A = S.DSTAT
*\--------------------------------------
K.GetDevStatus ldx #IOCTL.STATUS
jsr K.GetDevByID
K.GetDevStatus jsr K.GetDevByID
bcs K.GetDev.9
>STYA pFD
jmp (pFD)
ldy #S.FD.DEV.DRVPTR
lda (pFD),y
sta .1+1
iny
lda (pFD),y
sta .1+2
>LDYAI K.S.IOCTL
ldx #IOCTL.STATUS
.1 jmp $ffff
*/--------------------------------------
* # MKDev
* **In:**

View File

@ -138,11 +138,11 @@ Kernel.Init3 sta SETALTZP
>LDYAI MSG.Prefix
>SYSCALL printf
lda KBD
bpl .1
sta KBDSTROBE
cmp #$84 CTRL-D for Maintenace mode
bne .1
* lda KBD
* bpl .1
* sta KBDSTROBE
* cmp #$84 CTRL-D for Maintenace mode
* bne .1
>LDYAI MSG.MMode
>SYSCALL printf
@ -984,7 +984,6 @@ Mouse.SIG .HS 38180120D6
TClock.SIG .HS 0878282c58ff700538b00118b8087848
.HS 8a489848adffcf201ac86868ba8df807
*--------------------------------------
SYSSCREEN.TOP .AZ "A2osX System Screen"
MSG.Init2 .AZ "A2osX[Stage2]:Init\nRelocating Kernel...\n"
MSG.HZ .AZ "Kernel SYS Timer Set For %d0 hz Machine.\n"
MSG.KCREAD .AZ "Reading Kernel Config File..."
@ -992,7 +991,8 @@ MSG.KCREAD.OK .AZ "OK\n"
MSG.KCREAD.KO .AZ "\nError While Reading Kernel Config File, Using Default.\n"
MSG.Init2.OK .AZ "A2osX[Stage2]:Complete.\n"
*--------------------------------------
MSG.Init3 .AZ "A2osX[Stage3]:Init\r\nPress Ctrl-D for Mantenance Mode."
SYSSCREEN.TOP .AZ "A2osX 0.92 System Screen"
MSG.Init3 .AZ "A2osX[Stage3]:Init\r\nPress Ctrl-D for Mantenance Mode.\r\n"
MSG.DEV .AZ "-Device Manager...\r\n"
MSG.BLKDEV .AZ " /DEV/%s\r\n"
MSG.IRQ .AZ "-Interrupt Manager..."

View File

@ -87,11 +87,56 @@ IO.CLOSE.CDEV
*--------------------------------------
IO.CLOSE.SSOCK
*--------------------------------------
IO.CLOSE.FIFO
IO.CLOSE.FIFO clc
rts
*/--------------------------------------
* # read
* ## C
* `int read(int fd, void *buf, size_t count);`
*\--------------------------------------
K.Read jsr IO.SELECT
bcs K.Read.9
>PULLW K.S.IOCTL+S.IOCTL.BUFPTR
>PULLW K.S.IOCTL+S.IOCTL.BYTECNT
K.Read.I lda (pFD) #S.FD.T
tax
jmp (.1,x)
.1 .DA IO.READ.REG
.DA STDIO.IOERR DIR
.DA IO.READ.CDEV
.DA STDIO.IOERR BDEV
.DA STDIO.IOERR LNK
.DA STDIO.IOERR DSOCK
.DA IO.READ.SSOCK
.DA IO.READ.FIFO
K.Read.9 >RET 4
*--------------------------------------
* int read(int fd, void *buf, size_t count);
IO.READ.REG
clc
rts
*--------------------------------------
K.Read
IO.READ.CDEV ldy #S.FD.DEV.DRVPTR
lda (pFD),y
sta .1+1
iny
lda (pFD),y
sta .1+2
>LDYAI K.S.IOCTL
ldx #IOCTL.READ
.1 jmp $ffff
*--------------------------------------
IO.READ.SSOCK
*--------------------------------------
IO.READ.FIFO
clc
rts
*--------------------------------------
* int write(int fd, const void *buf, size_t count);
*--------------------------------------
@ -113,6 +158,7 @@ K.Write.I lda (pFD) #S.FD.T
.DA STDIO.IOERR DSOCK
.DA IO.WRITE.SSOCK
.DA IO.WRITE.FIFO
K.Write.9 >RET 4
*--------------------------------------
IO.WRITE.REG >PUSHW K.S.IOCTL+S.IOCTL.BUFPTR

View File

@ -602,56 +602,17 @@ K.GetChar ldy #S.PS.hStdIn
* A = char
*\--------------------------------------
K.GetC jsr IO.SELECT
ldy #S.FD.T
lda (pFD),y
asl
tax
jmp (.1,x)
.1 .DA K.GetC.REG
.DA STDIO.IOERR DIR
.DA K.GetC.CDEV
.DA STDIO.IOERR BDEV
.DA STDIO.IOERR LNK
.DA STDIO.IOERR DSOCK
.DA K.GetC.SSOCK
.DA K.GetC.FIFO
*--------------------------------------
K.GetC.REG >PUSHWI K.IOBuf
>PUSHWI 1
ldy #S.FD.REG.REF
>PUSHB (pFD),y
jsr K.FRead
bcs .9
lda K.Buf256
.9 rts
*--------------------------------------
K.GetC.CDEV ldx #IOCTL.READ
ldy #S.FD.DEV.DRVPTR
lda (pFD),y
sta .1+1
iny
lda (pFD),y
sta .1+2
.1 jmp $ffff
*--------------------------------------
K.GetC.SSOCK lda (pFD) #S.FD.HANDLER
* jsr K.GetMemPtr
* >STYA .1+1
* ldy #S.FD.SSOCK.READ
* lda (pFD),y
* tax Function Offset for READ
* ldy #S.FD.SSOCK.HSKT
* lda (pFD),y
*.1 jmp $ffff
*--------------------------------------
K.GetC.FIFO
bra *
>LDYAI K.IOBuf
>STYA K.S.IOCTL+S.IOCTL.BUFPTR
lda #1
sta K.S.IOCTL+S.IOCTL.BYTECNT
stz K.S.IOCTL+S.IOCTL.BYTECNT+1
jsr K.READ.I
bcs .9
lda K.IOBuf
.9 rts
*--------------------------------------
*K.PrintF.PadL .BS 1
*K.PrintF.PadC .BS 1

View File

@ -77,8 +77,8 @@ CS.RUN.Pak >PUSHWI 0 Aux type
>PUSHBI SYS.FOpen.R
lda #1
>SYSCALL GetArg.A
>SYSCALL RealPath.YA
>SYSCALL GetArg
>SYSCALL RealPath
>PUSHYA
txa
>STA.G PAK.hFileName
@ -98,13 +98,13 @@ CS.RUN.Pak >PUSHWI 0 Aux type
>STA.G PAK.hOutBuf
>LDA.G PAK.hFileBuf
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>PUSHYA
>PUSHW.G PAK.FileSize
>LDA.G PAK.hOutBuf
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>STYA ZPPakHdrPtr
>PUSHYA
>PUSHEA.G PAK.Stat
@ -147,7 +147,7 @@ CS.RUN.Unpak lda ZPPakHdrPtr
sta UNPAK.Mask
>LDA.G PAK.hFileBuf
>SYSCALL GetMemPtr.A
>SYSCALL GetMemPtr
>STYA ZPPakSrcPtr
stz UNPAK.Ofs
@ -163,7 +163,7 @@ CS.RUN.Unpak lda ZPPakHdrPtr
rts
.2 lda #'>'
>SYSCALL PutChar.A
>SYSCALL PutChar
jsr CS.RUN.UnpakGetBitInC
bcs .3
@ -385,17 +385,17 @@ CS.DOEVENT sec
CS.QUIT >LDA.G PAK.hFileName
beq .1
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.1 >LDA.G PAK.hFileBuf
beq .2
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.2 >LDA.G PAK.hOutBuf
beq .8
>SYSCALL FreeMem.A
>SYSCALL FreeMem
.8 lda hLIBPAK
>SYSCALL UnloadLib.A