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
sta L91C96.2.MMUCR,x
.8 ldx #$ff hMem
.8 lda #$ff hMem
plp
clc

View File

@ -15,7 +15,11 @@ BUF.SIZE .EQ $40
BUF.MASK .EQ $3F
.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)
*--------------------------------------
@ -26,7 +30,8 @@ CS.START cld
.DA 0
.DA CS.END-CS.START Code Length
.DA 0
.DA 0
.DA #32 SS
.DA #8 ZP
.DA 0
*--------------------------------------
* Relocation Table
@ -37,6 +42,10 @@ L.MSG.DETECT.KO .DA MSG.DETECT.KO
L.DRV.CS.START .DA DRV.CS.START
L.FD.DEV .DA FD.DEV
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
*--------------------------------------
Dev.Detect >STYA ARGS
@ -115,10 +124,47 @@ Dev.Detect >STYA ARGS
Dev.ParseArgs >LDYA ARGS
>STYA 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
*--------------------------------------
CS.END
@ -132,6 +178,7 @@ MSG.DETECT .DO SSCIRQ=1
.FIN
MSG.DETECT.OK .AZ "SSC Installed As Device : %s\r\n"
MSG.DETECT.KO .AZ "No SSC Found."
SSCANF.ARGS .AZ "%u,%d,%d,%s,%s"
ARGS .BS 2
*--------------------------------------
FD.DEV .DA #S.FD.T.CDEV
@ -569,7 +616,11 @@ DIB .DO SSCIRQ=1
*--------------------------------------
DCB .DA #S.DCB.T.COM
.DA #0 FLAGS
.DO SSCIRQ=1
.DA >9600 BAUD (DWORD)
.ELSE
.DA >115200
.FIN
.DA #8 DATA
.DA #1 STOP
.DA #S.DCB.COM.P.NONE PARITY

View File

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

View File

@ -291,8 +291,8 @@ note : '$VAR' does NOT expand Variable
| Name | Status | Comment | K.Ver |
| ---- | ------ | ------- | ----- |
| Console.DRV | Working | ANSI support in Progress. | 0.92 |
| SSC.DRV | Working | Apple "Super Serial Card" Driver | 0.9.1 |
| SSC.I.DRV | Working | Apple "Super Serial Card" Driver (IRQ enabled) | 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.92 |
| 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 |
| 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 |
| DNSINFO | Working | dump DNS cache, setup a static DNS entry | 0.92 |
| PING | Working | | 0.92 |
| TELNET | In Progress | | 0.92 |
| TELNET | Working | | 0.92 |
## DEV tools:
| Name | Status | Comment | K.Ver |

View File

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

View File

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

View File

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

View File

@ -710,6 +710,10 @@ MEM.PullP1P2 clc
>PULLW ZPPtr3
.9 rts
*--------------------------------------
MEM.SPtr1PPtr2 >STYA ZPPtr1
>PULLW ZPPtr2
rts
*--------------------------------------
MAN
SAVE /A2OSX.SRC/SYS/KERNEL.S.MEM
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
.1 iny
lda (ZPPtr2),y
sta (ZPPtr3),y
beq K.SScanF.Fwd
eor #' '
lda (ZPPtr2),y Get char in string to scan
sta (ZPPtr3),y store in param ptr
beq K.SScanF.Fwd end of string to scan ?
cmp (ZPPtr1) match format next char ?
beq .2
cmp #' ' is it a space ?
bne .1
.2 lda #0 add \0 to param ptr
sta (ZPPtr3),y
K.SScanF.Fwd tya Y=char count parsed