Kernel 0.92

This commit is contained in:
Rémy GIBERT 2018-12-03 14:56:52 +01:00
parent b0c3ebec01
commit 7a5f5668f8
10 changed files with 21 additions and 85 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -264,21 +264,16 @@ CL.PrintCmdBuf >LDYA ZPCLBuf
CL.GetLine >LDYA ZPFileBufPtr
>STYA.G CMD.FileBufPtr
lda #"a"
sta $815
lda (ZPFileBufPtr)
beq .9
inc $815
ldx #0 not in "
ldy #0
.1 lda (ZPFileBufPtr),y
beq .7
inc $815
cmp #C.CR
beq .6

View File

@ -166,48 +166,21 @@ J.CMD.Eval.TOKEN4 .DA M32.Add
L.M32.Printf .DA M32.Printf
L.ERR.Codes .DA ERR.Codes
L.ERR.Messages .DA ERR.Messages
L.MSG.DEBUG .DA MSG.DEBUG
.DO CSH=1
.INB USR/SRC/BIN/SHELL.R.CSH
.FIN
.DA 0
*--------------------------------------
CS.DEBUG >PUSHWI K.VER
>PUSHBI 2
>LDYA L.MSG.GREETINGS
>SYSCALL printf
lda #0
>SYSCALL ArgV
>PUSHYA
>PUSHBI 2
>LDYA L.MSG.DEBUG
>SYSCALL printf
lda #1
>SYSCALL ArgV
>PUSHYA
>PUSHBI 2
>LDYA L.MSG.DEBUG
>SYSCALL printf
rts
*--------------------------------------
CS.INIT clc
CS.INIT.RTS rts
*--------------------------------------
CS.RUN lda #"I"
sta $819
sta $817
jsr CMD.Init
CS.RUN jsr CMD.Init
bcs CS.INIT.RTS
ldy #S.PS.ARGC
lda (pPS),y
beq .1 no arg, continue starting interactive
jsr CS.DEBUG
lda #1
>SYSCALL ArgV
>SYSCALL LoadTxtFile
@ -386,9 +359,6 @@ CS.RUN.BATCH >SYSCALL GetChar
cmp #C.EOF
bne .3
lda #"\"
sta $819
lda #$ff
>STA.G bExit
inc
@ -398,8 +368,7 @@ CS.RUN.BATCH >SYSCALL GetChar
.3 sec
bra CS.RUN.LOOP.END
.7 inc $817
>LDA.G CL.bExec
.7 >LDA.G CL.bExec
bpl CS.RUN.LOOP.80
lda (ZPCLBuf)
@ -594,7 +563,6 @@ ENV.PATH .AZ "PATH"
ENV.PWD .AZ "PWD"
ENV.PS1 .AZ "PS1"
ENV.HOME .AZ "HOME"
MSG.DEBUG .AZ "{%s}\r\n"
*--------------------------------------
* https://www.tldp.org/LDP/abs/html/io-redirection.html
*--------------------------------------

View File

@ -149,12 +149,7 @@ STATUS >STYA ZPIOCTL
OPEN sta A2osX.SCRNDEVS DEV.ID in A
lda #S.DIB.S.OPENED
ora DIB+S.DIB.S
sta DIB+S.DIB.S
lda #"C"
sta $417
sta $817
tsb DIB+S.DIB.S
stz OutPtr
stz OutCnt
@ -168,9 +163,7 @@ CONTROL sta SETTEXT
sta CLRPAGE2
lda #1
sta A2osX.ASCREEN
lda #"c"
sta $417
sta $817
clc
rts
*--------------------------------------

View File

@ -244,9 +244,7 @@ DRV.SYS cld
DRV.SYS.STATUS >LDYAI DRV.SYS.DIB
jmp DRV.STATUS.YA
*--------------------------------------
DRV.SYS.Open lda #"S"
sta $423
lda #DEVID.SYS
DRV.SYS.Open lda #DEVID.SYS
sta A2osX.SCRNDEVS+1
jsr DRV.SYS.FF
*--------------------------------------

View File

@ -102,40 +102,34 @@ Kernel.Init3 sta SETALTZP
sta IRQ.InKernel
jsr SysScrInit
lda #"A"
sta $427
jsr MemMgrInit
>LDYAI FD.NULL
>SYSCALL MKDev
inc $427
>LDYAI FD.SYS
>SYSCALL MKDev
inc $427
jsr PS0.Init
bcc .10
lda #"D"
sta $427
bra *
.10 inc $427
bcs *
>LDYAI MSG.Init3
>SYSCALL puts
inc $427
jsr CPU.Init.6502
inc $427
jsr CPU.Init.Z80
inc $427
jsr DevMgrInit
inc $427
jsr IrqMgrInit
bcs *
inc $427
jsr EvtMgrInit
inc $427
jsr TskMgrInit
bcs *
inc $427
ldy #S.PS.hPREFIX
lda (pPs),y
@ -146,7 +140,6 @@ Kernel.Init3 sta SETALTZP
>PUSHBI 2
>LDYAI MSG.Prefix
>SYSCALL printf
inc $427
lda KBD
bpl .1

View File

@ -186,15 +186,11 @@ K.IO.OPEN.REG.E >LDYAI S.FD.REG
IO.OPEN.CDEV sta .1+1 A=DEVID
pha
jsr K.IOCTL.GetPDrv
lda #"C"
sta $425
ldx #IOCTL.OPEN
pla pass A=DEVID To Driver
jsr K.IOCTL.pDrvJmp
inc $425
bcs .9
inc $425
.1 ldx #$ff SELF MODIFIED
lda Dev.Table.hFD,x

View File

@ -989,21 +989,16 @@ K.SScanF.Fwd tya Y=char count parsed
* CC : A = hFILE
* CS : A = EC
*\--------------------------------------
K.FOpen pha
lda #"O"
sta $426
pla
jsr PFT.CheckPathYA
inc $426
K.FOpen jsr PFT.CheckPathYA
bcs .99
inc $426
>PULLB K.Open.FLAGS
>PULLB K.Open.TYPE
>PULLW K.Open.AUXTYPE
jsr IO.Open.I
bcs .9
inc $426
tax
stx .1+1 save hFD
@ -1011,9 +1006,7 @@ K.FOpen pha
>LDYAI K.Buf256
jsr STDIO.NewHFileYAX
inc $426
bcc .9
inc $426
pha save MLI error
.1 lda #$ff SELF MODIFIED