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

View File

@ -1,6 +1,6 @@
PR#3 PR#3
PREFIX /A2OSX.BUILD PREFIX /A2OSX.BUILD
NEW LOMEM $A00
INC 1 INC 1
AUTO 6 AUTO 6
.LIST OFF .LIST OFF
@ -38,15 +38,21 @@ L.MSG.DETECT.KO .DA MSG.DETECT.KO
L.DEV.HEADER.NAME .DA DEV.HEADER.NAME L.DEV.HEADER.NAME .DA DEV.HEADER.NAME
.DA 0 End Of Reloc Table .DA 0 End Of Reloc Table
*-------------------------------------- *--------------------------------------
Dev.Detect sta hArgs Dev.Detect >STYA ARGS
>LDYA L.MSG.DETECT >LDYA L.MSG.DETECT
>SYSCALL CPrintFYA >SYSCALL PPrintFYA
stz ZPTmpPtr1 stz ZPTmpPtr1
lda #$C1 lda #$C1
sta ZPTmpPtr1+1 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 .2 ldy DEVSIG.Offset,x
lda (ZPTmpPtr1),y lda (ZPTmpPtr1),y
@ -62,7 +68,7 @@ Dev.Detect sta hArgs
bne .1 bne .1
>LDYA L.MSG.DETECT.KO >LDYA L.MSG.DETECT.KO
>SYSCALL CPrintFYA >SYSCALL PPrintFYA
lda #MLI.ERR.NODEV Not Found in any slot, exiting lda #MLI.ERR.NODEV Not Found in any slot, exiting
sec sec
@ -70,6 +76,11 @@ Dev.Detect sta hArgs
.4 lda ZPTmpPtr1+1 .4 lda ZPTmpPtr1+1
and #$0F and #$0F
pha
tay
lda #A2osX.SLOTS.COM
sta A2osX.SLOTS,y
pla
ora #$30 ora #$30
sta DEV.HEADER.NAME+4 sta DEV.HEADER.NAME+4
asl asl
@ -80,7 +91,7 @@ Dev.Detect sta hArgs
>PUSHW L.DEV.HEADER.NAME >PUSHW L.DEV.HEADER.NAME
>LDYA L.MSG.DETECT.OK >LDYA L.MSG.DETECT.OK
>SYSCALL CPrintFYA >SYSCALL PPrintFYA
clc clc
rts rts
*-------------------------------------- *--------------------------------------
@ -88,10 +99,10 @@ CS.END
DEVSIG.Offset .HS 05070B0C DEVSIG.Offset .HS 05070B0C
DEVSIG.Value .HS 38180131 DEVSIG.Value .HS 38180131
DEVSIG.Length .EQ DEVSIG.Value-DEVSIG.Offset 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 >PSTR "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.OK >PSTR "SSC Installed As Device : %S\r\n"
MSG.DETECT.KO >CSTR "No SSC Found.\r\n" MSG.DETECT.KO >PSTR "No SSC Found.\r\n"
hArgs .BS 1 ARGS .BS 2
*-------------------------------------- *--------------------------------------
* Device Header (16 Bytes) * Device Header (16 Bytes)
*-------------------------------------- *--------------------------------------
@ -319,5 +330,5 @@ STAT .DA #S.DEVSTAT.S.WRITE+S.DEVSTAT.S.READ+S.DEV.S.IRQ
.DA $0900 .DA $0900
*-------------------------------------- *--------------------------------------
MAN MAN
SAVE /A2OSX.SRC/DRV/SSC.DRV.I.S SAVE /A2OSX.SRC/DRV/SSC.I.DRV.S
ASM 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....) + 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. + Z80 support : Kernel could pass control to any Z80 detected on the system.
+ TCPIP stack : TCP still missing! + TCP/IP stack
+ AppleTalk Support + AppleTalk Support
+ GUI & Printing + GUI & Printing
+ Archive, Disk Image transfer tools (ADT client!)... + 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 | | INSDRV | Working | | 0.9 |
| GETTY | Working | | 0.9 | | GETTY | Working | | 0.9 |
| LOGIN | In Progress | no auth using /etc/passd yet | 0.9 | | LOGIN | In Progress | no auth using /etc/passd yet | 0.9 |
| SHELL | Working | (See Internal Shell commands) | 0.9 | | SHELL | Working | Kernel Configuration Utility | 0.9 |
| TCPIP | In Progress | New Socket API. ARP,IP,ICMP,UDP ok, TCP in progress | 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 | | DHCPCLNT| Working | rewritten to use new Socket API | 0.9 |
| TELNETD | | | | | TELNETD | In Progress | | 0.9 |
| HTTPD | | | | | HTTPD | In Progress | | 0.9 |
## Internal Shell commands: ## Internal Shell commands:

View File

@ -353,7 +353,7 @@ MSG.CHROOT >PSTR " CHRoot to /RAMx : %S\r\n"
MSG.ENABLED >PSTR "Enabled " MSG.ENABLED >PSTR "Enabled "
MSG.DISABLED >PSTR "Disabled" MSG.DISABLED >PSTR "Disabled"
MSG.SLOT >PSTR " Slot #%d : %S\r\n" 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.Z80 >PSTR "Z80 CPU Board"
MSG.SLOT.VSD >PSTR "SSC Shared Driver for VSDRIVE" MSG.SLOT.VSD >PSTR "SSC Shared Driver for VSDRIVE"
MSG.SLOT.ATK >PSTR "AppleTalk Board" MSG.SLOT.ATK >PSTR "AppleTalk Board"

View File

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

View File

@ -237,13 +237,12 @@ K.FFlushA jsr PFT.CheckNodeA
K.FSeek jsr PFT.CheckNodeSTK K.FSeek jsr PFT.CheckNodeSTK
>PULLA >PULLA
jsr FILE.SetupPrt1A jsr FILE.SetupPrt1A
>PULLB K.FSeek.FROM >PULLA FROM
tax
>PULLW K.FSeek.OFFSET >PULLW K.FSeek.OFFSET
>PULLW K.FSeek.OFFSET+2 >PULLW K.FSeek.OFFSET+2
lda K.FSeek.FROM cpx #SYS.FSeek.SET
* cmp #SYS.FSeek.SET =0
bne .1 bne .1
stz K.MLI.PARAMS+2 stz K.MLI.PARAMS+2
@ -251,26 +250,30 @@ K.FSeek jsr PFT.CheckNodeSTK
stz K.MLI.PARAMS+4 stz K.MLI.PARAMS+4
bra .8 bra .8
.1 cmp #SYS.FSeek.CUR .1 cpx #SYS.FSeek.CUR
bne .2 bne .2
>MLICALL MLIGETMARK >MLICALL MLIGETMARK
bcc .8 bcc .8
rts rts
.2 cmp #SYS.FSeek.END .2 cpx #SYS.FSeek.END
bne .98 bne .98
>MLICALL MLIGETEOF >MLICALL MLIGETEOF
bcs .9 bcs .9
.8 lda K.MLI.PARAMS+2 .8 ldx #0
adc K.FSeek.OFFSET ldy #3
sta K.MLI.PARAMS+2
lda K.MLI.PARAMS+3 clc
adc K.FSeek.OFFSET+1
sta K.MLI.PARAMS+3 .81 lda K.MLI.PARAMS+2,x
lda K.MLI.PARAMS+4 adc K.FSeek.OFFSET,x
adc K.FSeek.OFFSET+2 sta K.MLI.PARAMS+2,x
sta K.MLI.PARAMS+4
inx
dey
bne .81
bcs .99 Offset out of range! bcs .99 Offset out of range!
>MLICALL MLISETMARK >MLICALL MLISETMARK
@ -283,7 +286,6 @@ K.FSeek jsr PFT.CheckNodeSTK
sec sec
rts rts
*-------------------------------------- *--------------------------------------
K.FSeek.FROM .BS 1
K.FSeek.OFFSET .BS 4 K.FSeek.OFFSET .BS 4
*/-------------------------------------- */--------------------------------------
* # FTellA * # 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 jsr K.FileSearch find libname in $LIB
bcs .99 bcs .99
stx K.LoadLib.hFullName stx .9+1
jsr K.LoadExeYA Y,A=filename full path jsr K.LoadExeYA Y,A=filename full path
bcs .98 bcs .98
stx K.LoadLib.hMem stx .8+1
>STYA LIB.Jump+1 >STYA LIB.Jump+1
txa Pass hLib to LibLoad txa Pass hLib to LibLoad
@ -38,17 +38,17 @@ K.LoadLibYA >STYA K.LoadLib.Name SAVE LIBname for K.FileSearch
jsr .98 Cleanup... jsr .98 Cleanup...
lda K.LoadLib.hMem .8 lda #$ff hLib
clc clc
rts rts
.97 pha .97 pha
lda K.LoadLib.hMem lda .8+1
jsr K.FreeMemA jsr K.FreeMemA
pla pla
.98 pha .98 pha
lda K.LoadLib.hFullName .9 lda #$ff
jsr K.FreeMemA jsr K.FreeMemA
pla pla
@ -56,8 +56,6 @@ K.LoadLibYA >STYA K.LoadLib.Name SAVE LIBname for K.FileSearch
.99 rts .99 rts
*-------------------------------------- *--------------------------------------
K.LoadLib.Name .BS 2 K.LoadLib.Name .BS 2
K.LoadLib.hFullName .BS 1
K.LoadLib.hMem .BS 1
*-------------------------------------- *--------------------------------------
* K.UnloadLibA * K.UnloadLibA
* in : * in :