mirror of
https://github.com/A2osX/A2osX.git
synced 2025-03-13 14:31:28 +00:00
Kernel 0.9.1 : Shell enhancement, bug-fix, see README.md
This commit is contained in:
parent
d01afeeab1
commit
a894e55476
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
24
README.md
24
README.md
@ -1,16 +1,32 @@
|
|||||||
# A2osX (0.9.1) Multi-Tasking OS for Apple II
|
# A2osX (0.9.1) Multi-Tasking OS for Apple II
|
||||||
|
|
||||||
...preemtive ?
|
...preemtive ? soon !
|
||||||
|
|
||||||
## Latest News 2017-09-22
|
## Disk images :
|
||||||
|
|
||||||
**Disk images :**
|
|
||||||
|
|
||||||
+ **A2OSX.BOOT.po** : **(0.9.1)** 140k BOOT disk image with all binaries
|
+ **A2OSX.BOOT.po** : **(0.9.1)** 140k BOOT disk image with all binaries
|
||||||
+ **A2OSX.DEV.po** : **(0.9.1)** 140k disk image with ASM binaries, Debug Tools & INClude files
|
+ **A2OSX.DEV.po** : **(0.9.1)** 140k disk image with ASM binaries, Debug Tools & INClude files
|
||||||
+ **A2OSX.BUILD.po** : **(0.9.1)** 800k BOOT disk image with S-C MASM 2.0 and all binaries (BOOT+DEV)
|
+ **A2OSX.BUILD.po** : **(0.9.1)** 800k BOOT disk image with S-C MASM 2.0 and all binaries (BOOT+DEV)
|
||||||
+ **A2OSX.SRC.po** : **(0.9.1)** 800k disk image with all sources
|
+ **A2OSX.SRC.po** : **(0.9.1)** 800k disk image with all sources
|
||||||
|
|
||||||
|
## Latest News 2017-11-08
|
||||||
|
|
||||||
|
Kernel 0.9.1 stable enough to resume building.
|
||||||
|
|
||||||
|
+ KM.APPLETALK module not crashing anymore
|
||||||
|
(Undocummented AtInit function, had to go further in official ATINIT dissaembly)
|
||||||
|
|
||||||
|
+ Improved Command Line editing and history.
|
||||||
|
(SUPPR key is emulated with Ctrl-X using //e keyboard)
|
||||||
|
|
||||||
|
+ New DevMgr enumeration stratey, now including /RAM and other virtual Block Devices
|
||||||
|
|
||||||
|
+ Math API (Hacked from APLLESOFT ROM ;-)
|
||||||
|
|
||||||
|
+ CSH Script engine in progress within Shell (In progress)
|
||||||
|
|
||||||
|
## Latest News 2017-09-22
|
||||||
|
|
||||||
(once Kernel 0.9.1 stable enough, BOOT & DEV will be updated) __(done!)__
|
(once Kernel 0.9.1 stable enough, BOOT & DEV will be updated) __(done!)__
|
||||||
|
|
||||||
**0.9 has been archived, next Kernel Version is 0.9.1**
|
**0.9 has been archived, next Kernel Version is 0.9.1**
|
||||||
|
@ -5,8 +5,7 @@ INC 1
|
|||||||
AUTO 6
|
AUTO 6
|
||||||
.LIST OFF
|
.LIST OFF
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
*--------------------------------------
|
CL.PrintPrompt >LDYA L.ENV.PS1
|
||||||
PrintPrompt >LDYA L.ENV.PS1
|
|
||||||
>SYSCALL GetEnv.YA
|
>SYSCALL GetEnv.YA
|
||||||
>SYSCALL ExpandStr.YA
|
>SYSCALL ExpandStr.YA
|
||||||
phx
|
phx
|
||||||
@ -22,10 +21,46 @@ PrintPrompt >LDYA L.ENV.PS1
|
|||||||
plp
|
plp
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CmdLine.CLR ldy #0
|
CL.Insert >LDA.G CmdBuflen
|
||||||
|
cmp #CmdLine.MAX
|
||||||
|
beq .9 Buffer full, discard...
|
||||||
|
|
||||||
|
inc
|
||||||
|
sta (pData),y
|
||||||
|
|
||||||
|
pha
|
||||||
|
|
||||||
|
.1 ply
|
||||||
|
dey
|
||||||
|
lda (ZPCMDBuf),y Move from Ptr To end of buffer forward...
|
||||||
|
iny
|
||||||
|
sta (ZPCMDBuf),y
|
||||||
|
dey
|
||||||
|
phy
|
||||||
|
tya
|
||||||
|
>CMP.G CmdBufPtr
|
||||||
|
bne .1
|
||||||
|
|
||||||
|
ply Y=CmdBufPtr
|
||||||
|
|
||||||
|
* >LDA.G CmdBufPtr
|
||||||
|
|
||||||
|
txa
|
||||||
|
sta (ZPCMDBuf),y
|
||||||
|
|
||||||
|
>SYSCALL PutChar.A
|
||||||
|
|
||||||
|
>INC.G CmdBufPtr
|
||||||
|
|
||||||
|
jmp CL.PrintEOL
|
||||||
|
|
||||||
|
.9 clc
|
||||||
|
rts
|
||||||
|
*--------------------------------------
|
||||||
|
CL.CLR ldy #0
|
||||||
|
|
||||||
.1 lda (ZPCMDBuf),y
|
.1 lda (ZPCMDBuf),y
|
||||||
beq .9
|
beq CL.RESET
|
||||||
|
|
||||||
.2 lda #$7F
|
.2 lda #$7F
|
||||||
|
|
||||||
@ -34,13 +69,17 @@ CmdLine.CLR ldy #0
|
|||||||
lda (ZPCMDBuf),y
|
lda (ZPCMDBuf),y
|
||||||
bne .2
|
bne .2
|
||||||
|
|
||||||
jsr CmdLine.PRINT
|
jsr CL.PRINT
|
||||||
|
|
||||||
jmp CmdLine.RESET
|
|
||||||
|
|
||||||
.9 rts
|
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CmdLine.BS >LDA.G CmdBufPtr
|
CL.RESET lda #0
|
||||||
|
sta (ZPCMDBuf)
|
||||||
|
>STA.G bCmdBufexec
|
||||||
|
>STA.G CmdBufPtr
|
||||||
|
>STA.G CmdBuflen
|
||||||
|
>STA.G bSecureRead Clear password mode
|
||||||
|
rts
|
||||||
|
*--------------------------------------
|
||||||
|
CL.BS >LDA.G CmdBufPtr
|
||||||
beq .9
|
beq .9
|
||||||
|
|
||||||
dec
|
dec
|
||||||
@ -50,7 +89,7 @@ CmdLine.BS >LDA.G CmdBufPtr
|
|||||||
>SYSCALL PutChar.A
|
>SYSCALL PutChar.A
|
||||||
.9 rts
|
.9 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CmdLine.NAK >LDA.G CmdBufPtr
|
CL.NAK >LDA.G CmdBufPtr
|
||||||
>CMP.G CmdBuflen
|
>CMP.G CmdBuflen
|
||||||
beq .9
|
beq .9
|
||||||
|
|
||||||
@ -61,86 +100,84 @@ CmdLine.NAK >LDA.G CmdBufPtr
|
|||||||
>SYSCALL PutChar.A
|
>SYSCALL PutChar.A
|
||||||
.9 rts
|
.9 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CmdLine.DEL >LDA.G CmdBuflen
|
* Erase char UNDER cursor
|
||||||
beq .8
|
*--------------------------------------
|
||||||
sec
|
CL.SUPPR >LDA.G CmdBuflen
|
||||||
>SBC.G CmdBufPtr
|
beq CL.PrintEOL.8
|
||||||
tax Keep in x char count to \0
|
|
||||||
bne .1
|
|
||||||
|
|
||||||
>DEC.G CmdBuflen
|
>LDA.G CmdBufPtr
|
||||||
>STA.G CmdBufPtr
|
bra CL.DEL.1
|
||||||
|
*--------------------------------------
|
||||||
|
* Erase char BEFORE cursor
|
||||||
|
*--------------------------------------
|
||||||
|
CL.DEL >LDA.G CmdBuflen
|
||||||
|
beq CL.PrintEOL.8
|
||||||
|
|
||||||
tay
|
>LDA.G CmdBufPtr
|
||||||
lda #0
|
beq CL.PrintEOL.8
|
||||||
sta (ZPCMDBuf),y
|
|
||||||
|
|
||||||
lda #$7f
|
lda #8
|
||||||
>SYSCALL PutChar.A
|
>SYSCALL PutChar.A
|
||||||
rts
|
|
||||||
|
|
||||||
.8 clc
|
>DEC.G CmdBufPtr
|
||||||
rts
|
|
||||||
|
|
||||||
.1 >LDA.G CmdBufPtr
|
CL.DEL.1 pha
|
||||||
tay
|
|
||||||
|
|
||||||
.2 iny
|
.1 ply
|
||||||
|
iny
|
||||||
lda (ZPCMDBuf),y
|
lda (ZPCMDBuf),y
|
||||||
dey
|
dey
|
||||||
sta (ZPCMDBuf),y
|
sta (ZPCMDBuf),y
|
||||||
iny
|
iny
|
||||||
dex
|
phy
|
||||||
bne .2
|
tya
|
||||||
|
|
||||||
|
>CMP.G CmdBufLen
|
||||||
|
bne .1
|
||||||
|
|
||||||
|
pla
|
||||||
|
|
||||||
>DEC.G CmdBuflen
|
>DEC.G CmdBuflen
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CmdLine.PRINTPTR
|
CL.PrintEOL >LDA.G CmdBufPtr
|
||||||
>LDA.G CmdBufPtr
|
|
||||||
tay
|
|
||||||
|
|
||||||
.1 lda (ZPCMDBuf),y
|
.1 >CMP.G CmdBuflen
|
||||||
beq .2
|
beq .2
|
||||||
|
|
||||||
phy
|
pha
|
||||||
|
tay
|
||||||
|
lda (ZPCMDBuf),y
|
||||||
>SYSCALL PutChar.A
|
>SYSCALL PutChar.A
|
||||||
ply
|
pla
|
||||||
iny
|
inc
|
||||||
bra .1
|
bra .1
|
||||||
|
|
||||||
.2 lda #' '
|
.2 lda #' '
|
||||||
>SYSCALL PutChar.A
|
>SYSCALL PutChar.A
|
||||||
lda #8
|
|
||||||
>SYSCALL PutChar.A
|
|
||||||
|
|
||||||
>LDA.G CmdBufPtr
|
>LDA.G CmdBufPtr
|
||||||
tay
|
|
||||||
|
|
||||||
.3 lda (ZPCMDBuf),y
|
.3 >CMP.G CmdBuflen
|
||||||
beq .8
|
beq .4
|
||||||
|
|
||||||
|
pha
|
||||||
|
|
||||||
phy
|
|
||||||
lda #8
|
lda #8
|
||||||
>SYSCALL PutChar.A
|
>SYSCALL PutChar.A
|
||||||
ply
|
pla
|
||||||
iny
|
inc
|
||||||
bra .3
|
bra .3
|
||||||
|
|
||||||
.8 clc
|
.4 lda #8
|
||||||
|
>SYSCALL PutChar.A
|
||||||
|
|
||||||
|
CL.PrintEOL.8 clc
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CmdLine.PRINT >LDYA ZPCMDBuf
|
CL.PRINT >LDYA ZPCMDBuf
|
||||||
>SYSCALL PrintF.YA
|
>SYSCALL PrintF.YA
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CmdLine.RESET lda #0
|
|
||||||
sta (ZPCMDBuf)
|
|
||||||
>STA.G bCmdBufexec
|
|
||||||
>STA.G CmdBufPtr
|
|
||||||
>STA.G CmdBuflen
|
|
||||||
>STA.G bSecureRead Clear password mode
|
|
||||||
rts
|
|
||||||
*--------------------------------------
|
|
||||||
MAN
|
MAN
|
||||||
SAVE /A2OSX.SRC/SBIN/SHELL.S.CL
|
SAVE /A2OSX.SRC/SBIN/SHELL.S.CL
|
||||||
LOAD /A2OSX.SRC/SBIN/SHELL.S
|
LOAD /A2OSX.SRC/SBIN/SHELL.S
|
||||||
|
@ -55,8 +55,7 @@ CSH.Init lda #$FF
|
|||||||
* clc
|
* clc
|
||||||
.9 rts
|
.9 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CSH.Run lda #0
|
CSH.Run jsr CL.RESET
|
||||||
>STA.G CmdBuflen Reset Cmdline
|
|
||||||
jsr CSH.GetCharNB
|
jsr CSH.GetCharNB
|
||||||
bcs .9
|
bcs .9
|
||||||
|
|
||||||
@ -752,10 +751,26 @@ CSA.Compute tax
|
|||||||
jmp (J.CSH.BOPS,x)
|
jmp (J.CSH.BOPS,x)
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CSH.BOPS.ADD
|
CSH.BOPS.ADD
|
||||||
|
clc
|
||||||
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
CSH.BOPS.SUB >LDA.G CSH.ACCT
|
||||||
|
cmp #CSH.TYPE.FLOAT
|
||||||
|
beq .8
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CSH.BOPS.SUB
|
|
||||||
|
clc
|
||||||
|
rts
|
||||||
|
|
||||||
|
.8 >PUSHEA.G CSH.ACC
|
||||||
|
>PUSHEA.G CSH.ARG
|
||||||
|
>LEA.G CSH.ACC
|
||||||
|
>SYSCALL FSUB
|
||||||
|
|
||||||
|
rts
|
||||||
CSH.BOPS.MUL
|
CSH.BOPS.MUL
|
||||||
CSH.BOPS.DIV
|
CSH.BOPS.DIV
|
||||||
CSH.BOPS.MOD
|
CSH.BOPS.MOD
|
||||||
|
@ -121,7 +121,7 @@ HIS.GetNext >LDA.G HIS.hBuf
|
|||||||
bne .1
|
bne .1
|
||||||
lda #0
|
lda #0
|
||||||
>STA.G HIS.Index
|
>STA.G HIS.Index
|
||||||
jmp CmdLine.CLR
|
jmp CL.CLR
|
||||||
|
|
||||||
.1 >STA.G HIS.Index
|
.1 >STA.G HIS.Index
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
@ -134,7 +134,7 @@ HIS.SetA jsr HIS.GetA
|
|||||||
bcc .1
|
bcc .1
|
||||||
inc ZPPTR1+1
|
inc ZPPTR1+1
|
||||||
|
|
||||||
.1 jsr CmdLine.CLR
|
.1 jsr CL.CLR
|
||||||
|
|
||||||
ldy #$ff
|
ldy #$ff
|
||||||
|
|
||||||
@ -147,7 +147,7 @@ HIS.SetA jsr HIS.GetA
|
|||||||
>STA.G CmdBufPtr
|
>STA.G CmdBufPtr
|
||||||
>STA.G CmdBuflen
|
>STA.G CmdBuflen
|
||||||
|
|
||||||
jmp CmdLine.PRINT
|
jmp CL.PRINT
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
HIS.GetA ldy #0
|
HIS.GetA ldy #0
|
||||||
|
|
||||||
|
@ -65,10 +65,10 @@ L.ENV.PS1 .DA ENV.PS1
|
|||||||
L.ENV.HOME .DA ENV.HOME
|
L.ENV.HOME .DA ENV.HOME
|
||||||
L.FMT.DATE .DA FMT.DATE
|
L.FMT.DATE .DA FMT.DATE
|
||||||
L.FMT.TIME .DA FMT.TIME
|
L.FMT.TIME .DA FMT.TIME
|
||||||
J.ESC .DA CmdLine.BS left arrow
|
J.ESC .DA CL.BS left arrow
|
||||||
.DA HIS.GetNext
|
.DA HIS.GetNext
|
||||||
.DA HIS.GetPrev
|
.DA HIS.GetPrev
|
||||||
.DA CmdLine.NAK right arow
|
.DA CL.NAK right arow
|
||||||
L.INTCMDS .DA INTCMDS
|
L.INTCMDS .DA INTCMDS
|
||||||
J.INTCMDS .DA Cmd.Exec.CD
|
J.INTCMDS .DA Cmd.Exec.CD
|
||||||
.DA Cmd.Exec.DATE
|
.DA Cmd.Exec.DATE
|
||||||
@ -171,9 +171,9 @@ CS.RUN >LDA.G bReadMode READ Command ?
|
|||||||
|
|
||||||
jmp CS.RUN.BATCH
|
jmp CS.RUN.BATCH
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.10 jsr CmdLine.RESET reset CmdBuf
|
.10 jsr CL.RESET reset CmdBuf
|
||||||
|
|
||||||
.12 jsr PrintPrompt
|
.12 jsr CL.PrintPrompt
|
||||||
bcs CS.RUN.EXIT.RTS
|
bcs CS.RUN.EXIT.RTS
|
||||||
|
|
||||||
.1 >SYSCALL Sleep
|
.1 >SYSCALL Sleep
|
||||||
@ -313,7 +313,8 @@ CS.CHARIN tax Save Char
|
|||||||
|
|
||||||
lda #$80
|
lda #$80
|
||||||
>STA.G bPause
|
>STA.G bPause
|
||||||
clc
|
|
||||||
|
.8 clc
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
* interactive mode
|
* interactive mode
|
||||||
@ -321,7 +322,7 @@ CS.CHARIN tax Save Char
|
|||||||
beq .13
|
beq .13
|
||||||
|
|
||||||
cpx #'['
|
cpx #'['
|
||||||
beq .8
|
beq .9
|
||||||
|
|
||||||
lda #0
|
lda #0
|
||||||
sta (pData),y Y=bEscMode
|
sta (pData),y Y=bEscMode
|
||||||
@ -346,54 +347,14 @@ CS.CHARIN tax Save Char
|
|||||||
|
|
||||||
.1 cpx #$7f
|
.1 cpx #$7f
|
||||||
bne .2
|
bne .2
|
||||||
jmp CmdLine.DEL
|
jmp CL.DEL
|
||||||
|
|
||||||
.2 >LDA.G CmdBuflen
|
.2 jmp CL.Insert
|
||||||
cmp #CmdLine.MAX
|
|
||||||
beq .8 Buffer full, discard...
|
|
||||||
|
|
||||||
inc
|
.9 clc
|
||||||
sta (pData),y
|
|
||||||
|
|
||||||
clc Len-1-Ptr !!!!!
|
|
||||||
>SBC.G CmdBufPtr
|
|
||||||
beq .30
|
|
||||||
|
|
||||||
phx
|
|
||||||
tax
|
|
||||||
>LDA.G CmdBuflen
|
|
||||||
tay
|
|
||||||
|
|
||||||
.3 lda (ZPCMDBuf),y Move from Ptr To end of buffer forward...
|
|
||||||
iny
|
|
||||||
sta (ZPCMDBuf),y
|
|
||||||
dey
|
|
||||||
dey
|
|
||||||
dex
|
|
||||||
bne .3
|
|
||||||
plx
|
|
||||||
|
|
||||||
.30 >LDA.G CmdBufPtr Insert char at Ptr
|
|
||||||
tay
|
|
||||||
txa
|
|
||||||
sta (ZPCMDBuf),y
|
|
||||||
>SYSCALL PutChar.A
|
|
||||||
|
|
||||||
>INC.G CmdBufPtr
|
|
||||||
>CMP.G CmdBuflen
|
|
||||||
bne .8
|
|
||||||
|
|
||||||
tay
|
|
||||||
lda #0
|
|
||||||
sta (ZPCMDBuf),y
|
|
||||||
|
|
||||||
clc
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
.8 jmp CmdLine.PRINTPTR
|
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.CHARIN.CTRL
|
CS.CHARIN.CTRL cpx #13 CR
|
||||||
cpx #13 CR
|
|
||||||
bne .10
|
bne .10
|
||||||
|
|
||||||
txa
|
txa
|
||||||
@ -422,13 +383,16 @@ CS.CHARIN.CTRL
|
|||||||
rts
|
rts
|
||||||
|
|
||||||
.11 cpx #3 Ctrl-C
|
.11 cpx #3 Ctrl-C
|
||||||
bne .8
|
bne .12
|
||||||
|
|
||||||
jsr CmdLine.CLR
|
jmp CL.CLR
|
||||||
clc
|
|
||||||
rts
|
|
||||||
|
|
||||||
.8 clc
|
.12 cpx #24 Ctrl-X
|
||||||
|
bne .13
|
||||||
|
|
||||||
|
jmp CL.SUPPR
|
||||||
|
|
||||||
|
.13 clc
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.QUIT jsr HIS.Quit
|
CS.QUIT jsr HIS.Quit
|
||||||
|
Loading…
x
Reference in New Issue
Block a user