Kernel version 0.9 : Few bytes saved in Kernel, SSC Drivers now updating KCONFIG Block

This commit is contained in:
Rémy GIBERT 2017-04-13 22:59:25 +02:00
parent 61615d2be9
commit 3e44afae7c
10 changed files with 86 additions and 67 deletions

View File

@ -35,15 +35,20 @@ L.MSG.DETECT.KO .DA MSG.DETECT.KO
L.DEV.HEADER.NAME .DA DEV.HEADER.NAME
.DA 0 End Of Reloc Table
*--------------------------------------
Dev.Detect sta hArgs
Dev.Detect >STYA ARGS
>LDYA L.MSG.DETECT
>SYSCALL CPrintFYA
>SYSCALL PPrintFYA
stz ZPTmpPtr1
lda #$C1
sta ZPTmpPtr1+1
.1 ldx #DEVSIG.Length-1
.1 and #$0f
tay
lda A2osX.SLOTS,y
bne .3
ldx #DEVSIG.Length-1
.2 ldy DEVSIG.Offset,x
lda (ZPTmpPtr1),y
@ -59,7 +64,7 @@ Dev.Detect sta hArgs
bne .1
>LDYA L.MSG.DETECT.KO
>SYSCALL CPrintFYA
>SYSCALL PPrintFYA
lda #MLI.ERR.NODEV Not Found in any slot, exiting
sec
@ -67,6 +72,11 @@ Dev.Detect sta hArgs
.4 lda ZPTmpPtr1+1
and #$0F
pha
tay
lda #A2osX.SLOTS.COM
sta A2osX.SLOTS,y
pla
ora #$30
sta DEV.HEADER.NAME+4
asl
@ -77,7 +87,7 @@ Dev.Detect sta hArgs
>PUSHW L.DEV.HEADER.NAME
>LDYA L.MSG.DETECT.OK
>SYSCALL CPrintFYA
>SYSCALL PPrintFYA
clc
rts
*--------------------------------------
@ -85,10 +95,10 @@ CS.END
DEVSIG.Offset .HS 05070B0C
DEVSIG.Value .HS 38180131
DEVSIG.Length .EQ DEVSIG.Value-DEVSIG.Offset
MSG.DETECT >CSTR "Apple SSC (Super Serial Card,//c Serial Port) Driver.\r\n"
MSG.DETECT.OK >CSTR "SSC Installed As Device : %S\r\n"
MSG.DETECT.KO >CSTR "No SSC Found.\r\n"
hArgs .BS 1
MSG.DETECT >PSTR "Apple SSC (Super Serial Card,//c Serial Port) Driver.\r\n"
MSG.DETECT.OK >PSTR "SSC Installed As Device : %S\r\n"
MSG.DETECT.KO >PSTR "No SSC Found.\r\n"
ARGS .BS 2
*--------------------------------------
* Device Header (16 Bytes)
*--------------------------------------

View File

@ -1,6 +1,6 @@
PR#3
PREFIX /A2OSX.BUILD
NEW
LOMEM $A00
INC 1
AUTO 6
.LIST OFF
@ -38,15 +38,21 @@ L.MSG.DETECT.KO .DA MSG.DETECT.KO
L.DEV.HEADER.NAME .DA DEV.HEADER.NAME
.DA 0 End Of Reloc Table
*--------------------------------------
Dev.Detect sta hArgs
Dev.Detect >STYA ARGS
>LDYA L.MSG.DETECT
>SYSCALL CPrintFYA
>SYSCALL PPrintFYA
stz ZPTmpPtr1
lda #$C1
sta ZPTmpPtr1+1
.1 ldx #DEVSIG.Length-1
.1 and #$0f
tay
lda A2osX.SLOTS,y
bne .3
ldx #DEVSIG.Length-1
.2 ldy DEVSIG.Offset,x
lda (ZPTmpPtr1),y
@ -62,7 +68,7 @@ Dev.Detect sta hArgs
bne .1
>LDYA L.MSG.DETECT.KO
>SYSCALL CPrintFYA
>SYSCALL PPrintFYA
lda #MLI.ERR.NODEV Not Found in any slot, exiting
sec
@ -70,6 +76,11 @@ Dev.Detect sta hArgs
.4 lda ZPTmpPtr1+1
and #$0F
pha
tay
lda #A2osX.SLOTS.COM
sta A2osX.SLOTS,y
pla
ora #$30
sta DEV.HEADER.NAME+4
asl
@ -80,7 +91,7 @@ Dev.Detect sta hArgs
>PUSHW L.DEV.HEADER.NAME
>LDYA L.MSG.DETECT.OK
>SYSCALL CPrintFYA
>SYSCALL PPrintFYA
clc
rts
*--------------------------------------
@ -88,10 +99,10 @@ CS.END
DEVSIG.Offset .HS 05070B0C
DEVSIG.Value .HS 38180131
DEVSIG.Length .EQ DEVSIG.Value-DEVSIG.Offset
MSG.DETECT >CSTR "Apple SSC (Super Serial Card,//c Serial Port) Driver (IRQ Enabled).\r\n"
MSG.DETECT.OK >CSTR "SSC Installed As Device : %S\r\n"
MSG.DETECT.KO >CSTR "No SSC Found.\r\n"
hArgs .BS 1
MSG.DETECT >PSTR "Apple SSC (Super Serial Card,//c Serial Port) Driver (IRQ Enabled).\r\n"
MSG.DETECT.OK >PSTR "SSC Installed As Device : %S\r\n"
MSG.DETECT.KO >PSTR "No SSC Found.\r\n"
ARGS .BS 2
*--------------------------------------
* Device Header (16 Bytes)
*--------------------------------------
@ -319,5 +330,5 @@ STAT .DA #S.DEVSTAT.S.WRITE+S.DEVSTAT.S.READ+S.DEV.S.IRQ
.DA $0900
*--------------------------------------
MAN
SAVE /A2OSX.SRC/DRV/SSC.DRV.I.S
SAVE /A2OSX.SRC/DRV/SSC.I.DRV.S
ASM

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -27,7 +27,7 @@ Several subprojects are now indentified :
+ Hardware Support : adding drivers to support more & more hardware (RAM cards, storage....)
+ Z80 support : Kernel could pass control to any Z80 detected on the system.
+ TCPIP stack : TCP still missing!
+ TCP/IP stack
+ AppleTalk Support
+ GUI & Printing
+ Archive, Disk Image transfer tools (ADT client!)...
@ -79,11 +79,13 @@ OApple+1,OApple+2,OApple+3 to switch between screens : Kernel Log, text, DHGR.
| INSDRV | Working | | 0.9 |
| GETTY | Working | | 0.9 |
| LOGIN | In Progress | no auth using /etc/passd yet | 0.9 |
| SHELL | Working | (See Internal Shell commands) | 0.9 |
| TCPIP | In Progress | New Socket API. ARP,IP,ICMP,UDP ok, TCP in progress | 0.9 |
| SHELL | Working | Kernel Configuration Utility | 0.9 |
| KCONFIG | Working | (See Internal Shell commands) | 0.9 |
| ---- | ------ | ------- | -----:|
| TCPIP | Working | Socket API.ARP,IP,ICMP,UDP & TCP ok | 0.9 |
| DHCPCLNT| Working | rewritten to use new Socket API | 0.9 |
| TELNETD | | | |
| HTTPD | | | |
| TELNETD | In Progress | | 0.9 |
| HTTPD | In Progress | | 0.9 |
## Internal Shell commands:

View File

@ -350,10 +350,10 @@ MSG.KCONF >PSTR "\e[2;1H------ Actual Kernel Configuration ------\r\n"
MSG.FCONF >PSTR "\e[13;1H------ KCONFIG File Configuration ------\r\n"
MSG.HZ >PSTR " Machine Timing : %d0 Hz\r\n"
MSG.CHROOT >PSTR " CHRoot to /RAMx : %S\r\n"
MSG.ENABLED >PSTR "Enabled"
MSG.ENABLED >PSTR "Enabled "
MSG.DISABLED >PSTR "Disabled"
MSG.SLOT >PSTR " Slot #%d : %S\r\n"
MSG.SLOT.NODEV >PSTR "<NO DEVICE>"
MSG.SLOT.NODEV >PSTR "<ENABLED> "
MSG.SLOT.Z80 >PSTR "Z80 CPU Board"
MSG.SLOT.VSD >PSTR "SSC Shared Driver for VSDRIVE"
MSG.SLOT.ATK >PSTR "AppleTalk Board"

View File

@ -14,21 +14,21 @@ K.LoadDrvYA >STYA K.LoadDrv.CmdArray
>LDYAI ENV.DRV push ENVNAME=DRV
>SYSCALL GetEnvYA get value for ENV=DRV
bcs .99
bcs .9
>PUSHYA Push $DRV value
>PUSHW K.LoadDrv.CmdArray (ARG[0] = DRVNAME)
jsr K.FileSearch find libname in $DRV
bcs .99
stx K.LoadDrv.hFullName
jsr K.FileSearch find Driver in $DRV
bcs .9
stx .99+1
jsr K.LoadExeYA Y,A =filename full path
bcs .98
>STYA pDrv
stx K.LoadDrv.hMem
stx .97+1
>LDYA K.LoadDrv.CmdArray Advance to ARG[1]
>STYA ZPPtr1
@ -43,34 +43,30 @@ K.LoadDrvYA >STYA K.LoadDrv.CmdArray
.1 >LDYA ZPPtr1
jsr pDrvJmp call Dev.Detect
bcs .97
bcs .96
jsr BIN.InstallDRV
bcs .97
bcs .96
jsr .97 Cleanup...
jsr .96 Cleanup...
lda #0 Make sure RC = 0 if success
clc
.99 rts
.9 rts
.97 pha
lda K.LoadDrv.hMem
.96 pha
.97 lda #$ff
jsr K.FreeMemA
pla
.98 pha
lda K.LoadDrv.hFullName
.99 lda #$ff
jsr K.FreeMemA
pla
sec
rts
*--------------------------------------
K.LoadDrv.CmdArray .BS 2
K.LoadDrv.hFullName .BS 1
K.LoadDrv.hMem .BS 1
*--------------------------------------
MAN
SAVE /A2OSX.SRC/SYS/KERNEL.S.DRV

View File

@ -237,13 +237,12 @@ K.FFlushA jsr PFT.CheckNodeA
K.FSeek jsr PFT.CheckNodeSTK
>PULLA
jsr FILE.SetupPrt1A
>PULLB K.FSeek.FROM
>PULLA FROM
tax
>PULLW K.FSeek.OFFSET
>PULLW K.FSeek.OFFSET+2
lda K.FSeek.FROM
* cmp #SYS.FSeek.SET =0
cpx #SYS.FSeek.SET
bne .1
stz K.MLI.PARAMS+2
@ -251,26 +250,30 @@ K.FSeek jsr PFT.CheckNodeSTK
stz K.MLI.PARAMS+4
bra .8
.1 cmp #SYS.FSeek.CUR
.1 cpx #SYS.FSeek.CUR
bne .2
>MLICALL MLIGETMARK
bcc .8
rts
.2 cmp #SYS.FSeek.END
.2 cpx #SYS.FSeek.END
bne .98
>MLICALL MLIGETEOF
bcs .9
.8 lda K.MLI.PARAMS+2
adc K.FSeek.OFFSET
sta K.MLI.PARAMS+2
lda K.MLI.PARAMS+3
adc K.FSeek.OFFSET+1
sta K.MLI.PARAMS+3
lda K.MLI.PARAMS+4
adc K.FSeek.OFFSET+2
sta K.MLI.PARAMS+4
.8 ldx #0
ldy #3
clc
.81 lda K.MLI.PARAMS+2,x
adc K.FSeek.OFFSET,x
sta K.MLI.PARAMS+2,x
inx
dey
bne .81
bcs .99 Offset out of range!
>MLICALL MLISETMARK
@ -283,7 +286,6 @@ K.FSeek jsr PFT.CheckNodeSTK
sec
rts
*--------------------------------------
K.FSeek.FROM .BS 1
K.FSeek.OFFSET .BS 4
*/--------------------------------------
* # FTellA

View File

@ -22,12 +22,12 @@ K.LoadLibYA >STYA K.LoadLib.Name SAVE LIBname for K.FileSearch
jsr K.FileSearch find libname in $LIB
bcs .99
stx K.LoadLib.hFullName
stx .9+1
jsr K.LoadExeYA Y,A=filename full path
bcs .98
stx K.LoadLib.hMem
stx .8+1
>STYA LIB.Jump+1
txa Pass hLib to LibLoad
@ -38,17 +38,17 @@ K.LoadLibYA >STYA K.LoadLib.Name SAVE LIBname for K.FileSearch
jsr .98 Cleanup...
lda K.LoadLib.hMem
.8 lda #$ff hLib
clc
rts
.97 pha
lda K.LoadLib.hMem
lda .8+1
jsr K.FreeMemA
pla
.98 pha
lda K.LoadLib.hFullName
.9 lda #$ff
jsr K.FreeMemA
pla
@ -56,8 +56,6 @@ K.LoadLibYA >STYA K.LoadLib.Name SAVE LIBname for K.FileSearch
.99 rts
*--------------------------------------
K.LoadLib.Name .BS 2
K.LoadLib.hFullName .BS 1
K.LoadLib.hMem .BS 1
*--------------------------------------
* K.UnloadLibA
* in :