0.9 : Started migrating external commands (including CAT ;-)

This commit is contained in:
Rémy GIBERT 2017-01-15 21:51:20 +01:00
parent 9e96142032
commit 21b3789b99
9 changed files with 91 additions and 123 deletions

Binary file not shown.

Binary file not shown.

View File

@ -93,14 +93,25 @@ CS.INIT >SYSCALL GetArgC
clc
rts
*--------------------------------------
CS.RUN ldy #bCANCEL
lda (pData),y
bmi .99
CS.RUN >SYSCALL GetC
bcs .10 no char
ldy #bSTOP
lda (pData),y
bmi .8
cmp #$03 Ctrl-C
beq .99 Abort....
cmp #$13 Ctrl-S
bne .10
ldy #bPause
lda (pData),y
eor #$ff
sta (pData),y
bne .8
.10 ldy #bPause
lda (pData),y
bne .8 Pause...
ldy #hFILE
lda (pData),y
bne .2
@ -136,18 +147,13 @@ CS.RUN ldy #bCANCEL
pla
>PUSHA
>SYSCALL FRead
bcc CS.RUN.PRINT
cmp #MLI.ERR.EOF
bne .9
ldy #hFILE
lda (pData),y
pha
lda #0
sta (pData),y
pla
>SYSCALL FCloseA
jsr CS.RUN.CLOSE
.8 clc
rts
@ -297,42 +303,20 @@ CS.RUN.OPEN >SYSCALL GetFullPathYA
.9 sec
rts
*--------------------------------------
CS.DOEVENT ldy #S.EVT.hDEV is Event from active IN device?
lda (pEvent),y
ldy #S.PS.hStdIn
cmp (pPs),y
bne .9
lda (pEvent)
and #S.EVT.F.KEY is it a KEY event?
beq .9
ldy #S.EVT.DATAHI is it an O or SAPPLE key ?
lda (pEvent),y
bne .9
ldy #S.EVT.DATALO
lda (pEvent),y
cmp #$03 Ctrl-C
bne .1
lda #$FF
ldy #bCANCEL
sta (pData),y
bra .8
.1 cmp #$13 Ctrl-S
bne .8
ldy #bSTOP
CS.RUN.CLOSE ldy #hFILE
lda (pData),y
eor #$FF
beq .8
pha
lda #0
sta (pData),y
pla
>SYSCALL FCloseA
.8 clc
rts
.9 sec
*--------------------------------------
CS.DOEVENT sec
rts
*--------------------------------------
CS.QUIT ldy #hFILE
@ -395,8 +379,7 @@ ByteIndex .BS 1
.DUMMY
.OR 0
DS.START
bCANCEL .BS 1
bSTOP .BS 1
bPause .BS 1
bPrintAll .BS 1
bLineNum .BS 1
bSuppress .BS 1

View File

@ -112,14 +112,25 @@ CS.INIT >SYSCALL GetArgC
clc
.9 rts
*--------------------------------------
CS.RUN ldy #bCANCEL
lda (pData),y
bmi .92
CS.RUN >SYSCALL GetC
bcs .10 no char
ldy #bSTOP
lda (pData),y
bmi .8
cmp #$03 Ctrl-C
beq .92 Abort....
cmp #$13 Ctrl-S
bne .10
ldy #bPause
lda (pData),y
eor #$ff
sta (pData),y
bne .8
.10 ldy #bPause
lda (pData),y
bne .8 Pause...
jsr GetNextEntry
bcs .9
@ -392,42 +403,7 @@ CS.RUN.ENTER.MSG
>SYSCALL CPrintFYA
rts
*--------------------------------------
CS.DOEVENT ldy #S.EVT.hDEV is Event from active IN device?
lda (pEvent),y
ldy #S.PS.hStdIn
cmp (pPs),y
bne .9
lda (pEvent)
and #S.EVT.F.KEY is it a KEY event?
beq .9
ldy #S.EVT.DATAHI is it an O or SAPPLE key ?
lda (pEvent),y
bne .9
ldy #S.EVT.DATALO
lda (pEvent),y
cmp #$03 Ctrl-C
bne .1
lda #$FF
ldy #bCANCEL
sta (pData),y
bra .8
.1 cmp #$13 Ctrl-S
bne .8
ldy #bSTOP
lda (pData),y
eor #$FF
sta (pData),y
.8 clc
rts
.9 sec
CS.DOEVENT sec
rts
*--------------------------------------
CS.QUIT jsr LeaveSubDir
@ -514,8 +490,7 @@ hDIRENTs .BS X.MAX.RECURSE
oDIRENTs .BS X.MAX.RECURSE*2
hSrcBasePath .BS 1
hFilter .BS 1
bSTOP .BS 1
bCANCEL .BS 1
bPause .BS 1
bAllmostAll .BS 1
bLong .BS 1
bRecurse .BS 1

View File

@ -100,7 +100,9 @@ CS.RUN >LDYA L.MSG0
.9 sec we do not want to stay in memory
rts
*--------------------------------------
CS.EVENT
CS.EVENT sec
rts
*--------------------------------------
CS.QUIT clc
rts
*--------------------------------------

View File

@ -33,33 +33,38 @@ CS.START cld
.DA CS.QUIT
.DA 0
*--------------------------------------
CS.INIT >SYSCALL GetArgC
CS.INIT clc
rts
*--------------------------------------
CS.RUN >SYSCALL GetArgC
cmp #1
beq .99
lda #1
>SYSCALL GetArgA
>SYSCALL GetFullPathYA
bcs .9
stx hFullPath
>SYSCALL MKDirYA
bcs .9
pha save error code
jsr .98
pla
lda #0
sec
rts
.98 lda hFullPath
>SYSCALL FreeMemA
.9 rts
.99 lda #SYSMGR.ERRSYN
sec
rts
*--------------------------------------
CS.RUN
CS.DOEVENT sec
rts
*--------------------------------------
CS.QUIT clc
CS.QUIT lda hFullPath
beq .8
>SYSCALL FreeMemA
.8 clc
rts
*--------------------------------------
CS.END

View File

@ -43,7 +43,10 @@ L.MSG.End .DA MSG.End
L.MemStat .DA MemStat
.DA 0
*--------------------------------------
CS.INIT >LDYA L.MemStat
CS.INIT clc
rts
*--------------------------------------
CS.RUN >LDYA L.MemStat
>SYSCALL GetMemStatYA
>LDYA L.MSG.Main
@ -106,8 +109,9 @@ CS.INIT >LDYA L.MemStat
sec
rts
*--------------------------------------
CS.RUN
CS.DOEVENT
CS.DOEVENT sec
rts
*--------------------------------------
CS.QUIT clc
rts
*--------------------------------------

View File

@ -37,7 +37,10 @@ L.MSG0 .DA MSG0
L.MSG1 .DA MSG1
.DA 0
*--------------------------------------
CS.INIT >LDYAI TSKMGR.TABLE+S.PS
CS.INIT clc
rts
*--------------------------------------
CS.RUN >LDYAI TSKMGR.TABLE+S.PS
>STYA ZPPTR1
stz PS.COUNT
@ -81,8 +84,9 @@ CS.INIT >LDYAI TSKMGR.TABLE+S.PS
sec we do not want to stay in memory
rts
*--------------------------------------
CS.RUN
CS.DOEVENT
CS.DOEVENT sec
rts
*--------------------------------------
CS.QUIT clc
rts
*--------------------------------------

View File

@ -53,11 +53,6 @@ Now it's time to make all external BINs use new API, then GUI development will r
OApple+1,OApple+2,OApple+3 to switch between screens : Kernel Log, text, DHGR.
(OApple+shift+1,OApple+shift+2,OApple+shift+3 on FR keyboard)
### **** Documentation WANTED ****
Is there anybody who could provide "appletalk programmer's guide for the apple II" ?
(Needed for KM.ATLK and AT commands development)
### **** Developers WANTED ****
!!! Help on writing this code should be greatly appreciated !!!
@ -76,9 +71,9 @@ In Progress : moving TCPIP to socket API
## SBIN,Daemons/Commands:
| Name | Status | Comment | K.Ver |
| ---- | ------ | ------- | ----- |
| INSDRV | Working | | 0.8 |
| GETTY | Working | | 0.8 |
| LOGIN | In Progress | no auth using /etc/passd yet | 0.8 |
| INSDRV | Working | | 0.9 |
| GETTY | Working | | 0.9 |
| LOGIN | In Progress | no auth using /etc/passd yet | 0.9 |
| TCPIP | In Progress | New Socket API. ARP,IP,ICMP,UDP ok, TCP in progress | 0.8 |
| DHCPCLNT | Working | rewritten to use new Socket API | 0.8 |
| SHELL | Working | (See Internal Shell commands) | 0.8 |
@ -89,7 +84,7 @@ In Progress : moving TCPIP to socket API
| CD/PWD | Working | Improved syntax : now, 'CD ../BIN' works |
| DATE | Working | |
| ECHO | Working | \b,\e,\f,\n,\\ and \% supported |
| EXIT | Working | |
| EXIT | Working | |
| IF | | |
| PAUSE | Working | |
| READ | | |
@ -128,11 +123,11 @@ note : '$VAR' does NOT expand Variable
## BIN,External Shell commands:
| Name | Status | Comment | K.Ver |
| ---- | ------ | ------- | ----- |
| MEM | Working | Old dump behavior is now MEMDUMP. New MEM command displays MEMSTAT (Main, Aux & Kernel Memory) | 0.8 |
| LSDEV | Working | | 0.8 |
| PS | Working | | 0.8 |
| MD | Working | | 0.8 |
| LS | Working | -A : Do Not Print . & .. | 0.8 |
| MEM | Working | Old dump behavior is now MEMDUMP. New MEM command displays MEMSTAT (Main, Aux & Kernel Memory) | 0.9 |
| LSDEV | Working | | 0.9 |
| PS | Working | | 0.9 |
| MD | Working | | 0.9 |
| LS | Working | -A : Do Not Print . & .. | 0.9 |
| | | -L : long listing with size/date... | |
| | | -R : Recurse subdirectories | |
| RM | Working | -C : Continue On Error | 0.8 |
@ -143,7 +138,7 @@ note : '$VAR' does NOT expand Variable
| MV | In Progress | -C : Continue On Error | 0.8 |
| | | -R : Recurse subdirectories | |
| | | -Y : Dont't Prompt For Override | |
| CAT | Working | -A : Show All non printable caracters | 0.8 |
| CAT | Working | -A : Show All non printable caracters | 0.9 |
| | | -N : Number all output lines | |
| | | -S : Suppress repeated empty output lines | |
| ARP | Working | dump ARP cache, setup a static ARP entry | 0.8 |