Kernel 0.9.1 : Code reorganization & move to CSTR : SHELL, bug fix, EDIT

This commit is contained in:
Rémy GIBERT 2017-09-22 08:38:22 +02:00
parent c85f3c62c4
commit d8bd97c7cb
11 changed files with 37 additions and 24 deletions

Binary file not shown.

Binary file not shown.

View File

@ -627,7 +627,7 @@ Prompt.Save cmp #3
>SYSCALL FreeMem.A >SYSCALL FreeMem.A
.11 >LDYA pData .11 >LDYA pData
>SYSCALL NewPStrYA >SYSCALL NewStr.YA
txa txa
ldy #hFileName ldy #hFileName

View File

@ -30,9 +30,10 @@ CS.START cld
.DA #$61 6502,Level 1 (65c02) .DA #$61 6502,Level 1 (65c02)
.DA #1 BIN Layout Version 1 .DA #1 BIN Layout Version 1
.DA 0 .DA 0
.DA CS.END-CS.START Code Length To Relocate .DA CS.END-CS.START CS
.DA DS.END-DS.START Data Segment to Allocate .DA DS.END-DS.START DS
.DA 0 .DA #16 SS
.DA #10 ZP
.DA 0 .DA 0
*-------------------------------------- *--------------------------------------
* Relocation Table * Relocation Table

View File

@ -11,8 +11,6 @@ AUTO 6
.INB /A2OSX.BUILD/INC/MACROS.I .INB /A2OSX.BUILD/INC/MACROS.I
.INB /A2OSX.BUILD/INC/A2OSX.I .INB /A2OSX.BUILD/INC/A2OSX.I
*-------------------------------------- *--------------------------------------
ZPPTR1 .EQ ZPBIN
*--------------------------------------
* File Header (16 Bytes) * File Header (16 Bytes)
*-------------------------------------- *--------------------------------------
CS.START cld CS.START cld
@ -20,9 +18,10 @@ CS.START cld
.DA #$61 6502,Level 1 (65c02) .DA #$61 6502,Level 1 (65c02)
.DA #1 BIN Layout Version 1 .DA #1 BIN Layout Version 1
.DA 0 .DA 0
.DA CS.END-CS.START Code Length To Relocate .DA CS.END-CS.START CS
.DA 0 .DA DS.END-DS.START DS
.DA 0 .DA #16 SS
.DA 0 ZP
.DA 0 .DA 0
*-------------------------------------- *--------------------------------------
* Relocation Table * Relocation Table
@ -45,7 +44,8 @@ CS.RUN >SYSCALL GetArgC
>SYSCALL GetFullPath.YA >SYSCALL GetFullPath.YA
bcs .9 bcs .9
stx hFullPath txa
>STA.G hFullPath
>SYSCALL MKDir.YA >SYSCALL MKDir.YA
bcs .9 bcs .9
@ -60,7 +60,7 @@ CS.RUN >SYSCALL GetArgC
CS.DOEVENT sec CS.DOEVENT sec
rts rts
*-------------------------------------- *--------------------------------------
CS.QUIT lda hFullPath CS.QUIT >LDA.G hFullPath
beq .8 beq .8
>SYSCALL FreeMem.A >SYSCALL FreeMem.A
@ -68,7 +68,13 @@ CS.QUIT lda hFullPath
rts rts
*-------------------------------------- *--------------------------------------
CS.END CS.END
*--------------------------------------
.DUMMY
.OR 0
DS.START
hFullPath .BS 1 hFullPath .BS 1
DS.END
.ED
*-------------------------------------- *--------------------------------------
MAN MAN
SAVE /A2OSX.SRC/BIN/MD.S SAVE /A2OSX.SRC/BIN/MD.S

View File

@ -24,9 +24,10 @@ CS.START cld
.DA #$61 6502,Level 1 (65c02) .DA #$61 6502,Level 1 (65c02)
.DA #1 BIN Layout Version 1 .DA #1 BIN Layout Version 1
.DA 0 .DA 0
.DA CS.END-CS.START Code Length To Relocate .DA CS.END-CS.START CS
.DA DS.END-DS.START Data Segment to Allocate .DA DS.END-DS.START DS
.DA 0 .DA #16 SS
.DA #4 ZP
.DA 0 .DA 0
*-------------------------------------- *--------------------------------------
* Relocation Table * Relocation Table

View File

@ -24,9 +24,10 @@ CS.START cld
.DA #$61 6502,Level 1 (65c02) .DA #$61 6502,Level 1 (65c02)
.DA #1 BIN Layout Version 1 .DA #1 BIN Layout Version 1
.DA 0 .DA 0
.DA CS.END-CS.START Code Length To Relocate .DA CS.END-CS.START CS
.DA DS.END-DS.START Data Segment to Allocate .DA DS.END-DS.START DS
.DA 0 .DA #16 SS
.DA #4 ZP
.DA 0 .DA 0
*-------------------------------------- *--------------------------------------
* Relocation Table * Relocation Table

View File

@ -164,7 +164,7 @@ note : '$VAR' does NOT expand Variable
| MEM | Working | Old dump behavior is now MEMDUMP. New MEM command displays MEMSTAT (Main, Aux & Kernel Memory) | 0.9.1 | | MEM | Working | Old dump behavior is now MEMDUMP. New MEM command displays MEMSTAT (Main, Aux & Kernel Memory) | 0.9.1 |
| LSDEV | Working | | 0.9.1 | | LSDEV | Working | | 0.9.1 |
| PS | Working | | 0.9.1 | | PS | Working | | 0.9.1 |
| MD | Working | | 0.9 | | MD | Working | | 0.9.1 |
| LS | Working | -A : Do Not Print . & .. | 0.9 | | LS | Working | -A : Do Not Print . & .. | 0.9 |
| | | -L : long listing with size/date... | | | | | -L : long listing with size/date... | |
| | | -R : Recurse subdirectories | | | | | -R : Recurse subdirectories | |

View File

@ -179,8 +179,8 @@ CS.RUN.ToggleSlotA
rts rts
*-------------------------------------- *--------------------------------------
CS.RUN.Load >LEA.G StatBuf CS.RUN.Load >LEA.G StatBuf
ldy #hFileName >PUSHYA
lda (pData),y >LDA.G hFileName
>SYSCALL GetMemPtr.A >SYSCALL GetMemPtr.A
>PUSHYA >PUSHYA
>SYSCALL Stat >SYSCALL Stat
@ -346,7 +346,7 @@ MSG.TOPBAR.OK >CSTR "KCONFIG File Successfully Loaded. \e[0m"
MSG.TOPBAR.KO >CSTR "Invalid/missing KCONFIG File. \e[0m" MSG.TOPBAR.KO >CSTR "Invalid/missing KCONFIG File. \e[0m"
MSG.STATUSBAR >CSTR "\e[7m\e[24;1HCtrl-Q:Quit,Ctrl-S:Save,Ctrl-T:Toggle Time,Ctrl-C:Toggle CHRoot,1-7:En/Dis Slot \e[0m" MSG.STATUSBAR >CSTR "\e[7m\e[24;1HCtrl-Q:Quit,Ctrl-S:Save,Ctrl-T:Toggle Time,Ctrl-C:Toggle CHRoot,1-7:En/Dis Slot \e[0m"
MSG.KCONF >CSTR "\e[2;1H------ Actual Kernel Configuration ------\r\n" MSG.KCONF >CSTR "\e[2;1H------ Actual Kernel Configuration ------\r\n"
MSG.FCONF >CSTR "\e[13;1H------ KCONFIG File Configuration ------\r\n" MSG.FCONF >CSTR "\e[13;1H------ KCONFIG File Configuration -------\r\n"
MSG.HZ >CSTR " Machine Timing : %d0 Hz\r\n" MSG.HZ >CSTR " Machine Timing : %d0 Hz\r\n"
MSG.CHROOT >CSTR " CHRoot to /RAMx : %s\r\n" MSG.CHROOT >CSTR " CHRoot to /RAMx : %s\r\n"
MSG.ENABLED >CSTR "Enabled " MSG.ENABLED >CSTR "Enabled "

View File

@ -13,6 +13,11 @@ CMD.Init >LDYAI CmdLine.MAX+1
>STA.G hCmdBuf >STA.G hCmdBuf
.9 rts .9 rts
*-------------------------------------- *--------------------------------------
CMD.Quit >LDA.G hCmdBuf
beq .9
>SYSCALL FreeMem.A
.9 rts
*--------------------------------------
* ZPCMDBuf : Remove extra SPACE & comment * ZPCMDBuf : Remove extra SPACE & comment
*-------------------------------------- *--------------------------------------
Cmd.Parse >LDYA ZPCMDBuf Cmd.Parse >LDYA ZPCMDBuf

View File

@ -425,9 +425,8 @@ CS.CHARIN.CTRL cpx #13 CR
rts rts
*-------------------------------------- *--------------------------------------
CS.QUIT jsr HIS.Quit CS.QUIT jsr HIS.Quit
jsr CSH.Quit jsr CSH.Quit
jsr CMD.Quit
clc clc
rts rts
*-------------------------------------- *--------------------------------------
@ -489,7 +488,7 @@ CmdLine.DEL >LDA.G CmdBuflen
tay tay
lda #0 lda #0
sta (pData),y sta (ZPCMDBuf),y
lda #8 lda #8
>SYSCALL PutChar.A >SYSCALL PutChar.A