mirror of
https://github.com/A2osX/A2osX.git
synced 2025-03-12 23:29:48 +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
|
||||
|
||||
...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.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.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!)__
|
||||
|
||||
**0.9 has been archived, next Kernel Version is 0.9.1**
|
||||
|
@ -5,8 +5,7 @@ INC 1
|
||||
AUTO 6
|
||||
.LIST OFF
|
||||
*--------------------------------------
|
||||
*--------------------------------------
|
||||
PrintPrompt >LDYA L.ENV.PS1
|
||||
CL.PrintPrompt >LDYA L.ENV.PS1
|
||||
>SYSCALL GetEnv.YA
|
||||
>SYSCALL ExpandStr.YA
|
||||
phx
|
||||
@ -22,10 +21,46 @@ PrintPrompt >LDYA L.ENV.PS1
|
||||
plp
|
||||
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
|
||||
beq .9
|
||||
beq CL.RESET
|
||||
|
||||
.2 lda #$7F
|
||||
|
||||
@ -34,13 +69,17 @@ CmdLine.CLR ldy #0
|
||||
lda (ZPCMDBuf),y
|
||||
bne .2
|
||||
|
||||
jsr CmdLine.PRINT
|
||||
|
||||
jmp CmdLine.RESET
|
||||
|
||||
.9 rts
|
||||
jsr CL.PRINT
|
||||
*--------------------------------------
|
||||
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
|
||||
|
||||
dec
|
||||
@ -50,7 +89,7 @@ CmdLine.BS >LDA.G CmdBufPtr
|
||||
>SYSCALL PutChar.A
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CmdLine.NAK >LDA.G CmdBufPtr
|
||||
CL.NAK >LDA.G CmdBufPtr
|
||||
>CMP.G CmdBuflen
|
||||
beq .9
|
||||
|
||||
@ -61,86 +100,84 @@ CmdLine.NAK >LDA.G CmdBufPtr
|
||||
>SYSCALL PutChar.A
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CmdLine.DEL >LDA.G CmdBuflen
|
||||
beq .8
|
||||
sec
|
||||
>SBC.G CmdBufPtr
|
||||
tax Keep in x char count to \0
|
||||
bne .1
|
||||
* Erase char UNDER cursor
|
||||
*--------------------------------------
|
||||
CL.SUPPR >LDA.G CmdBuflen
|
||||
beq CL.PrintEOL.8
|
||||
|
||||
>DEC.G CmdBuflen
|
||||
>STA.G CmdBufPtr
|
||||
>LDA.G CmdBufPtr
|
||||
bra CL.DEL.1
|
||||
*--------------------------------------
|
||||
* Erase char BEFORE cursor
|
||||
*--------------------------------------
|
||||
CL.DEL >LDA.G CmdBuflen
|
||||
beq CL.PrintEOL.8
|
||||
|
||||
tay
|
||||
lda #0
|
||||
sta (ZPCMDBuf),y
|
||||
>LDA.G CmdBufPtr
|
||||
beq CL.PrintEOL.8
|
||||
|
||||
lda #$7f
|
||||
lda #8
|
||||
>SYSCALL PutChar.A
|
||||
rts
|
||||
|
||||
.8 clc
|
||||
rts
|
||||
>DEC.G CmdBufPtr
|
||||
|
||||
.1 >LDA.G CmdBufPtr
|
||||
tay
|
||||
CL.DEL.1 pha
|
||||
|
||||
.2 iny
|
||||
.1 ply
|
||||
iny
|
||||
lda (ZPCMDBuf),y
|
||||
dey
|
||||
sta (ZPCMDBuf),y
|
||||
iny
|
||||
dex
|
||||
bne .2
|
||||
phy
|
||||
tya
|
||||
|
||||
>CMP.G CmdBufLen
|
||||
bne .1
|
||||
|
||||
pla
|
||||
|
||||
>DEC.G CmdBuflen
|
||||
*--------------------------------------
|
||||
CmdLine.PRINTPTR
|
||||
>LDA.G CmdBufPtr
|
||||
tay
|
||||
CL.PrintEOL >LDA.G CmdBufPtr
|
||||
|
||||
.1 lda (ZPCMDBuf),y
|
||||
.1 >CMP.G CmdBuflen
|
||||
beq .2
|
||||
|
||||
phy
|
||||
pha
|
||||
tay
|
||||
lda (ZPCMDBuf),y
|
||||
>SYSCALL PutChar.A
|
||||
ply
|
||||
iny
|
||||
pla
|
||||
inc
|
||||
bra .1
|
||||
|
||||
.2 lda #' '
|
||||
>SYSCALL PutChar.A
|
||||
lda #8
|
||||
>SYSCALL PutChar.A
|
||||
|
||||
>LDA.G CmdBufPtr
|
||||
tay
|
||||
|
||||
.3 lda (ZPCMDBuf),y
|
||||
beq .8
|
||||
.3 >CMP.G CmdBuflen
|
||||
beq .4
|
||||
|
||||
pha
|
||||
|
||||
phy
|
||||
lda #8
|
||||
>SYSCALL PutChar.A
|
||||
ply
|
||||
iny
|
||||
pla
|
||||
inc
|
||||
bra .3
|
||||
|
||||
.8 clc
|
||||
.4 lda #8
|
||||
>SYSCALL PutChar.A
|
||||
|
||||
CL.PrintEOL.8 clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
CmdLine.PRINT >LDYA ZPCMDBuf
|
||||
CL.PRINT >LDYA ZPCMDBuf
|
||||
>SYSCALL PrintF.YA
|
||||
rts
|
||||
*--------------------------------------
|
||||
CmdLine.RESET lda #0
|
||||
sta (ZPCMDBuf)
|
||||
>STA.G bCmdBufexec
|
||||
>STA.G CmdBufPtr
|
||||
>STA.G CmdBuflen
|
||||
>STA.G bSecureRead Clear password mode
|
||||
rts
|
||||
*--------------------------------------
|
||||
MAN
|
||||
SAVE /A2OSX.SRC/SBIN/SHELL.S.CL
|
||||
LOAD /A2OSX.SRC/SBIN/SHELL.S
|
||||
|
@ -55,8 +55,7 @@ CSH.Init lda #$FF
|
||||
* clc
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CSH.Run lda #0
|
||||
>STA.G CmdBuflen Reset Cmdline
|
||||
CSH.Run jsr CL.RESET
|
||||
jsr CSH.GetCharNB
|
||||
bcs .9
|
||||
|
||||
@ -752,10 +751,26 @@ CSA.Compute tax
|
||||
jmp (J.CSH.BOPS,x)
|
||||
*--------------------------------------
|
||||
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.DIV
|
||||
CSH.BOPS.MOD
|
||||
|
@ -121,7 +121,7 @@ HIS.GetNext >LDA.G HIS.hBuf
|
||||
bne .1
|
||||
lda #0
|
||||
>STA.G HIS.Index
|
||||
jmp CmdLine.CLR
|
||||
jmp CL.CLR
|
||||
|
||||
.1 >STA.G HIS.Index
|
||||
*--------------------------------------
|
||||
@ -134,7 +134,7 @@ HIS.SetA jsr HIS.GetA
|
||||
bcc .1
|
||||
inc ZPPTR1+1
|
||||
|
||||
.1 jsr CmdLine.CLR
|
||||
.1 jsr CL.CLR
|
||||
|
||||
ldy #$ff
|
||||
|
||||
@ -147,7 +147,7 @@ HIS.SetA jsr HIS.GetA
|
||||
>STA.G CmdBufPtr
|
||||
>STA.G CmdBuflen
|
||||
|
||||
jmp CmdLine.PRINT
|
||||
jmp CL.PRINT
|
||||
*--------------------------------------
|
||||
HIS.GetA ldy #0
|
||||
|
||||
|
@ -65,10 +65,10 @@ L.ENV.PS1 .DA ENV.PS1
|
||||
L.ENV.HOME .DA ENV.HOME
|
||||
L.FMT.DATE .DA FMT.DATE
|
||||
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.GetPrev
|
||||
.DA CmdLine.NAK right arow
|
||||
.DA CL.NAK right arow
|
||||
L.INTCMDS .DA INTCMDS
|
||||
J.INTCMDS .DA Cmd.Exec.CD
|
||||
.DA Cmd.Exec.DATE
|
||||
@ -171,9 +171,9 @@ CS.RUN >LDA.G bReadMode READ Command ?
|
||||
|
||||
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
|
||||
|
||||
.1 >SYSCALL Sleep
|
||||
@ -313,7 +313,8 @@ CS.CHARIN tax Save Char
|
||||
|
||||
lda #$80
|
||||
>STA.G bPause
|
||||
clc
|
||||
|
||||
.8 clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
* interactive mode
|
||||
@ -321,7 +322,7 @@ CS.CHARIN tax Save Char
|
||||
beq .13
|
||||
|
||||
cpx #'['
|
||||
beq .8
|
||||
beq .9
|
||||
|
||||
lda #0
|
||||
sta (pData),y Y=bEscMode
|
||||
@ -346,54 +347,14 @@ CS.CHARIN tax Save Char
|
||||
|
||||
.1 cpx #$7f
|
||||
bne .2
|
||||
jmp CmdLine.DEL
|
||||
jmp CL.DEL
|
||||
|
||||
.2 >LDA.G CmdBuflen
|
||||
cmp #CmdLine.MAX
|
||||
beq .8 Buffer full, discard...
|
||||
.2 jmp CL.Insert
|
||||
|
||||
inc
|
||||
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
|
||||
.9 clc
|
||||
rts
|
||||
|
||||
.8 jmp CmdLine.PRINTPTR
|
||||
*--------------------------------------
|
||||
CS.CHARIN.CTRL
|
||||
cpx #13 CR
|
||||
CS.CHARIN.CTRL cpx #13 CR
|
||||
bne .10
|
||||
|
||||
txa
|
||||
@ -422,13 +383,16 @@ CS.CHARIN.CTRL
|
||||
rts
|
||||
|
||||
.11 cpx #3 Ctrl-C
|
||||
bne .8
|
||||
bne .12
|
||||
|
||||
jsr CmdLine.CLR
|
||||
clc
|
||||
rts
|
||||
jmp CL.CLR
|
||||
|
||||
.8 clc
|
||||
.12 cpx #24 Ctrl-X
|
||||
bne .13
|
||||
|
||||
jmp CL.SUPPR
|
||||
|
||||
.13 clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.QUIT jsr HIS.Quit
|
||||
|
Loading…
x
Reference in New Issue
Block a user