Kernel 0.92

This commit is contained in:
Rémy GIBERT 2018-11-21 14:08:11 +01:00
parent c96fec6dec
commit e4eb8ed828
12 changed files with 96 additions and 87 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -34,6 +34,7 @@ CS.START cld
.DA CS.EVENT
.DA CS.QUIT
L.LIBTCPIP .DA LIBTCPIP
L.MSG.IPKO .DA MSG.IPKO
L.SSCANF.IP .DA SSCANF.IP
L.MSG0 .DA MSG0
L.MSG1 .DA MSG1
@ -48,7 +49,19 @@ CS.INIT >LDYA L.LIBTCPIP
.9 rts
*--------------------------------------
CS.RUN ldy #S.PS.ARGC
CS.RUN >LIBCALL hLIBTCPIP,LIBTCPIP.GET.IPCFG is TCPIP loaded ?
>STYA ZPPTR1
lda (ZPPTR1) Configured ?
bmi CS.RUN.IPOK
>LDYA L.MSG.IPKO
>SYSCALL puts
lda #E.SYN
sec
rts
CS.RUN.IPOK ldy #S.PS.ARGC
lda (pPs),y
cmp #1
bne .1
@ -162,6 +175,7 @@ CS.QUIT lda hLIBTCPIP
CS.END
LIBTCPIP .AZ "libtcpip"
hLIBTCPIP .BS 1
MSG.IPKO .AZ "TCP/IP Not Loaded/Configured."
SSCANF.IP .AZ "%d.%d.%d.%d"
MSG0 .AZ "STS TR.ID Hostname IP Address TTL"
MSG1 .AZ "$%h $%H %32s %03d.%03d.%03d.%03d %u\r\n"
@ -174,5 +188,5 @@ EntryCount .BS 1
DS.END
*--------------------------------------
MAN
SAVE USR/SRC/BIN/BIN/DNSINFO.S
SAVE USR/SRC/BIN/DNSINFO.S
ASM

View File

@ -23,7 +23,7 @@ CS.START cld
.DA CS.END-CS.START CS
.DA DS.END-DS.START DS
.DA #16 SS
.DA #0 ZP
.DA #2 ZP
.DA 0
*--------------------------------------
* Relocation Table
@ -82,11 +82,11 @@ CS.RUN.SET lda #1
>SYSCALL ArgV
>STYA ZPPtr1
lda (ZPPtr1)
cmp #17
>SYSCALL strlen
cpy #17
bne .9
ldy #1
ldy #0
stz DS1216E.DATA+7
@ -113,7 +113,7 @@ CS.RUN.SET lda #1
sta DS1216E.DATA
lda (ZPPtr1),y
cmp #' '
cmp #','
bne .9
iny
@ -376,11 +376,11 @@ MSG.READ.OK2.12 .AZ "am/pm"
MSG.READ.OK2.24 .AZ "24h"
MSG.READ.OK3 .AZ "\r\nDate:"
MSG.READ.OK4 .AZ "\r\nTime:"
MSG.USAGE .AZ "\r\n\r\nTo Reset the chip and set clock, type:\r\nNSCUTIL DD/MM/YY hh:mm:ss\r\n"
TmpByte .BS 1
MSG.USAGE .AZ "\r\n\r\nTo Reset the chip and set clock, type:\r\nNSCUTIL DD/MM/YY,hh:mm:ss\r\n"
DS1216E.PATTERN .HS 5CA33AC55CA33AC5 Reverted 7->0
DS1216E.DETECT .BS 8
DS1216E.DATA .BS 8 Reverted YY MM DD Day HH mm SS CS
TmpByte .BS 1
*--------------------------------------
DS.START
DS.END

View File

@ -200,7 +200,7 @@ CS.RUN.LOOP >SLEEP
.3 >STYA ZPBufLen
lda (ZPBufPtr)
cmp #3 Ctrl-C
cmp #$14 Ctrl-T
beq CS.RUN.USER
.4 >PUSHW ZPBufLen
@ -294,7 +294,7 @@ MSG.USAGE .AZ "Usage : TELNET <ip|host> [port]"
MSG.UNKNOWN .AZ "%s: Unknown host\r\n"
MSG.HOSTOK .AZ "Connecting to %d.%d.%d.%d:%D (%s)..."
MSG.SKTKO .AZ "Failed to Open Socket."
MSG.SKTOK .AZ "Connected."
MSG.SKTOK .AZ "Connected, Exit key is Ctrl-T"
MSG.SKTERR .AZ "Socket Error : $%h\r\n"
MSG.IOERR .AZ "I/O Error : $%h\r\n"
MSG.USER .AZ "User interrupt."

View File

@ -251,12 +251,7 @@ GetNextEntry jsr GetEntry
adc #0
sta ZPFileStat+1
ldy #index
lda (pData),y
asl
clc
adc #oDIRENTs-1
tay
jsr GetoDIRENT
pla Get back previous file len
@ -309,12 +304,7 @@ GetNextEntry jsr GetEntry
.99 sec
rts
*--------------------------------------
GetEntry ldy #index
lda (pData),y
clc
adc #hDIRENTs-1
tay
lda (pData),y
GetEntry jsr GethDIRENT
bne .1 we have a buffer to scan
jsr GetEntry.ReadDir First run, get first block
@ -331,12 +321,7 @@ GetEntry ldy #index
.1 >SYSCALL GetMemPtr
>STYA ZPFileName
ldy #index
lda (pData),y
asl
clc
adc #oDIRENTs-1
tay
jsr GetoDIRENT
lda ZPFileName
clc
@ -365,25 +350,16 @@ GetEntry ldy #index
.9 rts
*--------------------------------------
GetEntry.ReadDir
ldy #index
lda (pData),y
clc
adc #hDIRENTs-1
tay
lda (pData),y
jsr GethDIRENT
beq .1
pha
lda #0
sta (pData),y reset hDIRENT
pla
>SYSCALL FreeMem discard previous hDIRENT
.1 ldy #index
lda (pData),y
clc
adc #hDIRs-1
tay
lda (pData),y
.1 jsr GethDIR
>SYSCALL ReadDir
bcs .9
@ -397,13 +373,9 @@ GetEntry.ReadDir
txa get hDIRENT in A
sta (pData),y
ldy #index
lda (pData),y
asl
clc
adc #oDIRENTs-1 and reset offset for this buffer
tay
lda #0
jsr GetoDIRENT
lda #0 and reset offset for this buffer
sta (pData),y
iny
sta (pData),y
@ -418,7 +390,7 @@ EnterSubDirYA >STYA ZPPtr2 save SUBDIR for StrCat
beq .9
ldy #hSrcBasePath
jsr EnterSubDirYA.1
jsr EnterSubDirY
>LDYA ZPPtr1
>SYSCALL OpenDir
@ -426,10 +398,7 @@ EnterSubDirYA >STYA ZPPtr2 save SUBDIR for StrCat
bcs .9
pha
ldy #index
lda (pData),y
inc
sta (pData),y
>INC.G index
tax
* clc from BCS
adc #hDIRs-1
@ -445,45 +414,45 @@ EnterSubDirYA >STYA ZPPtr2 save SUBDIR for StrCat
.DO X.COPY.TO.DEST=1
ldy #hDstBasePath
jsr EnterSubDirYA.1
jsr EnterSubDirY
.FIN
clc
.9 rts
EnterSubDirYA.1 lda (pData),y
EnterSubDirY lda (pData),y
>SYSCALL GetMemPtr
>STYA ZPPtr1 save full path
jsr .1 Make sure ending with /
>PUSHW ZPPtr2
>LDYA ZPPtr1
>SYSCALL StrCat
ldy #0
.1 ldy #0
.1 iny
.2 iny
lda (ZPPtr1),y
bne .1
bne .2
dey
lda #'/'
cmp (ZPPtr1),y
beq .8
iny
sta (ZPPtr1),y
iny
lda #0
sta (ZPPtr1),y
rts
.8 rts
*--------------------------------------
LeaveSubDir ldy #index
lda (pData),y
LeaveSubDir >LDA.G index
beq .9
ldy #index
lda (pData),y
clc
adc #hDIRENTs-1
tay
lda (pData),y
jsr GethDIRENT.A
beq .1
pha
@ -492,12 +461,7 @@ LeaveSubDir ldy #index
pla
>SYSCALL FreeMem
.1 ldy #index
lda (pData),y
clc
adc #hDIRs-1
tay
lda (pData),y
.1 jsr GethDIR
pha
lda #0
@ -505,10 +469,7 @@ LeaveSubDir ldy #index
pla
>SYSCALL CloseDir
ldy #index
lda (pData),y
dec
sta (pData),y
>DEC.G index
bne .8
ldy #hSrcBasePath
@ -561,6 +522,30 @@ BasePath..1 lda (pData),y
rts
*--------------------------------------
GethDIR ldy #index
lda (pData),y
clc
adc #hDIRs-1
tay
lda (pData),y
rts
*--------------------------------------
GethDIRENT ldy #index
lda (pData),y
GethDIRENT.A clc
adc #hDIRENTs-1
tay
lda (pData),y
rts
*--------------------------------------
GetoDIRENT ldy #index
lda (pData),y
asl
clc
adc #oDIRENTs-1
tay
rts
*--------------------------------------
MAN
SAVE USR/SRC/BIN/X.FILEENUM.S
LOAD USR/SRC/BIN/LS.S

View File

@ -263,7 +263,7 @@ OApple+1,OApple+2,OApple+3 to switch between screens : Kernel Log, text, DHGR.
| Name | Status | Comment |
| ---- | ------ | ------- |
| CD | Working | Improved syntax : now, 'CD ../BIN' works |
| REN | Working | Rename a file, directorey or volume |
| REN | Working | Rename a file, directory or volume |
| MD | Working | Create a directory |
| RD | Working | Delete an empty directory |
| PWD | Working | Print Working Directory |
@ -320,7 +320,7 @@ note : '$VAR' does NOT expand Variable
| 1>> | Working | |
| 1> | Working | |
| 2>> | Working | StdErr redirection |
| 2>> | Working | |
| 2> | Working | |
## DRV,Drivers:
@ -375,7 +375,7 @@ note : '$VAR' does NOT expand Variable
| | | -R : Recurse subdirectories | |
| CHGRP | In Progress | -C : Continue On Error | 0.9 |
| | | -R : Recurse subdirectories | |
| NSCUTIL | Working | Tool for setting time in NSC/DL1216E | 0.9 |
| NSCUTIL | Working | Tool for setting time in NSC/DL1216E | 0.92 |
## Network (TCPIP) tools:
| Name | Status | Comment | K.Ver |

View File

@ -156,14 +156,13 @@ L.ERR.Messages .DA ERR.Messages
CS.INIT clc
CS.INIT.RTS rts
*--------------------------------------
CS.RUN jsr Cmd.INT.CD.HOME
jsr CMD.Init
CS.RUN jsr CMD.Init
bcs CS.INIT.RTS
lda #1
>SYSCALL ArgV
bcs .1 no arg, continue starting interactive
>SYSCALL LoadTxtFile
bcs CS.INIT.RTS
@ -172,6 +171,8 @@ CS.RUN jsr Cmd.INT.CD.HOME
>SYSCALL GetMemPtr
>STYA ZPFileBufPtr
jsr SetPWD
lda #0
jsr ShiftA Remove $0=/bin/shell
@ -180,7 +181,9 @@ CS.RUN jsr Cmd.INT.CD.HOME
.FIN
bra CS.RUN.LOOP
.1 jsr HIS.Init
.1 jsr Cmd.INT.CD.HOME
jsr HIS.Init
bcs CS.INIT.RTS
>PUSHWI K.VER

View File

@ -55,6 +55,9 @@ K.StrCat sec
* Y,A = destination
*\--------------------------------------
K.StrCpy clc
pha
phy
jsr MEM.SPtr1PPtr2
bcc .2
@ -78,7 +81,9 @@ K.StrCpy clc
inc ZPPtr1+1
bra .3
.8 rts
.8 ply
pla
rts
*/--------------------------------------
* # StrUpr/StrLwr
* Convert string to UPPERCASE/lowercase

View File

@ -162,5 +162,5 @@ MLIGETPREFIX.PARAMS
.DA BUF.PREFIX
*--------------------------------------
MAN
SAVE USR/SRC/SYS/KM.APPLETALK.S
SAVE USR/SRC/SYS/ATK/KM.APPLETALK.S
ASM

View File

@ -28,6 +28,7 @@ ERR.Codes .DA #MLI.E.IO
.DA #E.ENVF
.DA #E.IBIN
.DA #E.FTB
.DA #3 Ctrl-C
*--------------------------------------
ERR.Count .EQ *-ERR.Codes
*--------------------------------------
@ -56,8 +57,9 @@ ERR.Messages >PSTR "I/O Error"
>PSTR "Env Is Full"
>PSTR "Invalid BIN format"
>PSTR "File Too Big"
>PSTR "User Interrupt"
*--------------------------------------
>PSTR "Unknown Error"
*--------------------------------------
MAN
SAVE USR/SRC/BIN/X.ERRORS.S
SAVE USR/SRC/X.ERRORS.S