Kernel 0.9.2

This commit is contained in:
Rémy GIBERT 2018-09-07 16:12:42 +02:00
parent 3cd1365e90
commit 6cd8ff6c6f
12 changed files with 97 additions and 40 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -406,7 +406,7 @@ READ php
.4 lda #L91C96.2.MMUCR.REMREL .4 lda #L91C96.2.MMUCR.REMREL
sta L91C96.2.MMUCR,x sta L91C96.2.MMUCR,x
.8 ldx #$ff hMem .8 lda #$ff hMem
plp plp
clc clc

View File

@ -15,7 +15,11 @@ BUF.SIZE .EQ $40
BUF.MASK .EQ $3F BUF.MASK .EQ $3F
.FIN .FIN
*-------------------------------------- *--------------------------------------
ZPArgPtr .EQ ZPDRV ZPArgPtr .EQ ZPBIN
ZPParityPtr .EQ ZPBIN+2
ZPControlPtr .EQ ZPBIN+4
ZPhParity .EQ ZPBIN+6
ZPhControl .EQ ZPBIN+7
*-------------------------------------- *--------------------------------------
* File Header (16 Bytes) * File Header (16 Bytes)
*-------------------------------------- *--------------------------------------
@ -26,7 +30,8 @@ CS.START cld
.DA 0 .DA 0
.DA CS.END-CS.START Code Length .DA CS.END-CS.START Code Length
.DA 0 .DA 0
.DA 0 .DA #32 SS
.DA #8 ZP
.DA 0 .DA 0
*-------------------------------------- *--------------------------------------
* Relocation Table * Relocation Table
@ -37,6 +42,10 @@ L.MSG.DETECT.KO .DA MSG.DETECT.KO
L.DRV.CS.START .DA DRV.CS.START L.DRV.CS.START .DA DRV.CS.START
L.FD.DEV .DA FD.DEV L.FD.DEV .DA FD.DEV
L.FD.DEV.NAME .DA FD.DEV.NAME L.FD.DEV.NAME .DA FD.DEV.NAME
L.SSCANF.ARGS .DA SSCANF.ARGS
L.DCB.BAUD .DA DCB+S.DCB.COM.BAUD
L.DCB.DATA .DA DCB+S.DCB.COM.DATA
L.DCB.STOP .DA DCB+S.DCB.COM.STOP
.DA 0 End Of Reloc Table .DA 0 End Of Reloc Table
*-------------------------------------- *--------------------------------------
Dev.Detect >STYA ARGS Dev.Detect >STYA ARGS
@ -115,10 +124,47 @@ Dev.Detect >STYA ARGS
Dev.ParseArgs >LDYA ARGS Dev.ParseArgs >LDYA ARGS
>STYA ZPArgPTR >STYA ZPArgPTR
lda (ZPArgPTR) lda (ZPArgPTR)
beq .8 bne .1
clc
rts
.1 stz ZPhParity
stz ZPhControl
.8 clc >LDYAI 256
>SYSCALL getmem
bcs .2
>STYA ZPParityPtr
stx ZPhParity
>LDYAI 256
>SYSCALL getmem
.2 bcs .90
>STYA ZPControlPtr
stx ZPhControl
>PUSHW ZPControlPtr
>PUSHW ZPParityPtr
>PUSHW L.DCB.STOP
>PUSHW L.DCB.DATA
>PUSHW L.DCB.BAUD
>PUSHBI 10 5 x byte PTRs
>PUSHW L.SSCANF.ARGS
>LDYA ZPArgPtr
>SYSCALL sscanf
bcs .90
.90 lda ZPhControl
beq .91
>SYSCALL freemem
.91 lda ZPhParity
beq .92
>SYSCALL freemem
.92 lda #K.E.SYN
sec
rts rts
*-------------------------------------- *--------------------------------------
CS.END CS.END
@ -132,6 +178,7 @@ MSG.DETECT .DO SSCIRQ=1
.FIN .FIN
MSG.DETECT.OK .AZ "SSC Installed As Device : %s\r\n" MSG.DETECT.OK .AZ "SSC Installed As Device : %s\r\n"
MSG.DETECT.KO .AZ "No SSC Found." MSG.DETECT.KO .AZ "No SSC Found."
SSCANF.ARGS .AZ "%u,%d,%d,%s,%s"
ARGS .BS 2 ARGS .BS 2
*-------------------------------------- *--------------------------------------
FD.DEV .DA #S.FD.T.CDEV FD.DEV .DA #S.FD.T.CDEV
@ -569,7 +616,11 @@ DIB .DO SSCIRQ=1
*-------------------------------------- *--------------------------------------
DCB .DA #S.DCB.T.COM DCB .DA #S.DCB.T.COM
.DA #0 FLAGS .DA #0 FLAGS
.DO SSCIRQ=1
.DA >9600 BAUD (DWORD) .DA >9600 BAUD (DWORD)
.ELSE
.DA >115200
.FIN
.DA #8 DATA .DA #8 DATA
.DA #1 STOP .DA #1 STOP
.DA #S.DCB.COM.P.NONE PARITY .DA #S.DCB.COM.P.NONE PARITY

View File

@ -521,7 +521,7 @@ READ php
lda #W5100.AR.S0.CR.RCVD lda #W5100.AR.S0.CR.RCVD
sta W5100.DR,x sta W5100.DR,x
.8 ldx #$ff SELF MODIFIED hMem .8 lda #$ff SELF MODIFIED hMem
plp plp
clc clc

View File

@ -291,8 +291,8 @@ note : '$VAR' does NOT expand Variable
| Name | Status | Comment | K.Ver | | Name | Status | Comment | K.Ver |
| ---- | ------ | ------- | ----- | | ---- | ------ | ------- | ----- |
| Console.DRV | Working | ANSI support in Progress. | 0.92 | | Console.DRV | Working | ANSI support in Progress. | 0.92 |
| SSC.DRV | Working | Apple "Super Serial Card" Driver | 0.9.1 | | SSC.DRV | Working | Apple "Super Serial Card" Driver | 0.92 |
| SSC.I.DRV | Working | Apple "Super Serial Card" Driver (IRQ enabled) | 0.9.1 | | SSC.I.DRV | Working | Apple "Super Serial Card" Driver (IRQ enabled) | 0.92 |
| PIC.DRV | In Progress | Apple "Parallel Interface Card" Driver, renamed from PPIC.DRV | 0.9 | | PIC.DRV | In Progress | Apple "Parallel Interface Card" Driver, renamed from PPIC.DRV | 0.9 |
| Mouse.DRV | Working | Apple Mouse Card,//c Mouse Port | 0.9.1 | | Mouse.DRV | Working | Apple Mouse Card,//c Mouse Port | 0.9.1 |
| DHGR.DRV | Working | 560x192 Mono/16 colors Mixed-Mode support | 0.9.1 | | DHGR.DRV | Working | 560x192 Mono/16 colors Mixed-Mode support | 0.9.1 |
@ -348,7 +348,7 @@ note : '$VAR' does NOT expand Variable
| ARP | Working | dump ARP cache, setup a static ARP entry | 0.92 | | ARP | Working | dump ARP cache, setup a static ARP entry | 0.92 |
| DNSINFO | Working | dump DNS cache, setup a static DNS entry | 0.92 | | DNSINFO | Working | dump DNS cache, setup a static DNS entry | 0.92 |
| PING | Working | | 0.92 | | PING | Working | | 0.92 |
| TELNET | In Progress | | 0.92 | | TELNET | Working | | 0.92 |
## DEV tools: ## DEV tools:
| Name | Status | Comment | K.Ver | | Name | Status | Comment | K.Ver |

View File

@ -63,13 +63,6 @@ CS.INIT ldy #S.PS.ARGC
>SYSCALL GetArg >SYSCALL GetArg
bcs .9 bcs .9
>SYSCALL ExpandStr
bcs .9
txa
>STA.G hBinName
lda (pPs) lda (pPs)
ora #S.PS.F.EVENT Now accept events ora #S.PS.F.EVENT Now accept events
sta (pPs) sta (pPs)
@ -124,8 +117,8 @@ CS.RUN.LOOP
bcs .8 unable to send greetings...reset.. bcs .8 unable to send greetings...reset..
>LDA.G hBinName lda #2
>SYSCALL GetMemPtr >SYSCALL GetArg
>SYSCALL ExecPS >SYSCALL ExecPS
.9 rts .9 rts
@ -219,11 +212,7 @@ CS.DOEVENT lda (pEvent)
.9 sec do not discard TIMER event .9 sec do not discard TIMER event
rts rts
*-------------------------------------- *--------------------------------------
CS.QUIT >LDA.G hBinName CS.QUIT >LDA.G hDEV
beq .1
* >SYSCALL FreeMem
.1 >LDA.G hDEV
beq .8 beq .8
>SYSCALL close >SYSCALL close
@ -267,7 +256,6 @@ IAC.VERB .BS 1
IAC.OPT .BS 1 IAC.OPT .BS 1
IAC.SB .BS 1 IAC.SB .BS 1
hDEV .BS 1 hDEV .BS 1
hBinName .BS 1
TimeOut .BS 1 TimeOut .BS 1
DS.END .ED DS.END .ED
MAN MAN

View File

@ -85,13 +85,15 @@ K.GetDev.9 rts
*\-------------------------------------- *\--------------------------------------
K.GetDevStatus jsr K.GetMemPtr K.GetDevStatus jsr K.GetMemPtr
>STYA pFD >STYA pFD
>PULLW K.S.IOCTL+S.IOCTL.BUFPTR >PULLW K.S.IOCTL+S.IOCTL.BUFPTR
jsr K.IOCTL.GetPDrv
lda #S.IOCTL.STATCODE.GETDIB lda #S.IOCTL.STATCODE.GETDIB
K.GetDevStatus.I
sta K.S.IOCTL+S.IOCTL.STATCODE sta K.S.IOCTL+S.IOCTL.STATCODE
jsr K.IOCTL.GetPDrv
>LDYAI K.S.IOCTL >LDYAI K.S.IOCTL
ldx #IOCTL.STATUS ldx #IOCTL.STATUS
@ -113,7 +115,7 @@ K.MKDev >STYA .1+1
ldx #S.MEM.F.FD ldx #S.MEM.F.FD
jsr MEM.GetMem.YAX jsr MEM.GetMem.YAX
bcs .99 bcs .99
>STYA .2+1 >STYA pFD
phx phx
ldx DevMgr.DevCnt ldx DevMgr.DevCnt
@ -123,17 +125,26 @@ K.MKDev >STYA .1+1
pla pla
sta Dev.Table.hFD,x sta Dev.Table.hFD,x
lda #0 TODO Irq Flag ldy #S.FD.DEV-1
sta Dev.Table.F,x
ldx #S.FD.DEV-1 .1 lda $ffff,y SELF MODIFIED
.2 sta (pFD),y
.1 lda $ffff,x SELF MODIFIED dey
.2 sta $ffff,x SELF MODIFIED
dex
bpl .1 bpl .1
lda DevMgr.DevCnt >LDYAI K.IOBuf
>STYA K.S.IOCTL+S.IOCTL.BUFPTR
lda #S.IOCTL.STATCODE.STATUS
jsr K.GetDevStatus.I
bcs .99
lda K.IOBuf
ldx DevMgr.DevCnt
sta Dev.Table.F,x
txa
inc DevMgr.DevCnt inc DevMgr.DevCnt
rts rts

View File

@ -266,7 +266,7 @@ K.IOCTL jsr K.GetMemPtr
>STYA pFD >STYA pFD
jsr K.IOCTL.GetPDRV jsr K.IOCTL.GetPDrv
>PULLA >PULLA
tax request tax request

View File

@ -710,6 +710,10 @@ MEM.PullP1P2 clc
>PULLW ZPPtr3 >PULLW ZPPtr3
.9 rts .9 rts
*-------------------------------------- *--------------------------------------
MEM.SPtr1PPtr2 >STYA ZPPtr1
>PULLW ZPPtr2
rts
*--------------------------------------
MAN MAN
SAVE /A2OSX.SRC/SYS/KERNEL.S.MEM SAVE /A2OSX.SRC/SYS/KERNEL.S.MEM
LOAD /A2OSX.SRC/SYS/KERNEL.S LOAD /A2OSX.SRC/SYS/KERNEL.S

View File

@ -935,11 +935,14 @@ K.SScanF.GetVAL jsr K.SScanF.Fwd Y=char count parsed
K.SScanF.S ldy #$ff K.SScanF.S ldy #$ff
.1 iny .1 iny
lda (ZPPtr2),y lda (ZPPtr2),y Get char in string to scan
sta (ZPPtr3),y sta (ZPPtr3),y store in param ptr
beq K.SScanF.Fwd beq K.SScanF.Fwd end of string to scan ?
eor #' ' cmp (ZPPtr1) match format next char ?
beq .2
cmp #' ' is it a space ?
bne .1 bne .1
.2 lda #0 add \0 to param ptr
sta (ZPPtr3),y sta (ZPPtr3),y
K.SScanF.Fwd tya Y=char count parsed K.SScanF.Fwd tya Y=char count parsed