Kernel version 0.8

This commit is contained in:
Rémy GIBERT 2016-10-07 22:48:49 +02:00
parent d56ed1fc88
commit 278312cddb
16 changed files with 839 additions and 38 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -6,6 +6,7 @@ AUTO 6
ECHO *** A2osX Startup file ***
echo Working Directory:
CD
SET PATH=${PATH};/A2OSX.DEV/BIN
echo Env:
SET
# Main Screen
@ -28,9 +29,9 @@ STARTPROC DHCPCLNT
#CIFSMOUNT 192.168.1.5:/MSSHARE /MNT/MSSHARE
# End Network Section
# GUI Section
#INSDRV DHGR.DRV
#INSDRV MOUSE.DRV
#STARTPROC DESKTOP
INSDRV DHGR.DRV
INSDRV MOUSE.DRV
STARTPROC DESKTOP
# End GUI Section
ECHO *** End A2osX Startup file ***
MAN

View File

@ -53,10 +53,12 @@ CS.INIT >LDYA L.LIBSTR
>SYSCALL SYS.LoadLibYA
sta hLIBTCPIP
ldy #S.PS.hARGS
lda (pPs),y
>SYSCALL SYS.GetArgC
cmp #1
beq CS.INIT.DUMP
lda #1
>SYSCALL SYS.GetArgA
pha
>PUSHW L.DST.IP
>PUSHW L.SSCANF.IP

122
BIN/DEVDUMP.S.txt Normal file
View File

@ -0,0 +1,122 @@
PR#3
PREFIX /A2OSX.SRC
NEW
INC 1
AUTO 6
.LIST OFF
.OP 65C02
.OR $2000
.TF /A2OSX.DEV/BIN/DEVDUMP
*--------------------------------------
.INB INC/MACROS.I
.INB INC/A2OSX.I
*--------------------------------------
ZPPTR1 .EQ ZPBIN
*--------------------------------------
INPUT.BufPtr.SIZE .EQ 16
*--------------------------------------
* File Header (16 Bytes)
*--------------------------------------
CS.START cld
jmp (.1,x)
.DA #$61 6502,Level 1 (65c02)
.DA #1 BIN Layout Version 1
.DA 0
.DA CS.END-CS.START Code Length To Relocate
.DA DS.END-DS.START Data Segment to Allocate
.DA 0
.DA 0
*--------------------------------------
* Relocation Table
*--------------------------------------
.1 .DA CS.INIT
.DA CS.RUN
.DA CS.DOEVENT
.DA CS.QUIT
.DA 0
*--------------------------------------
CS.INIT >SYSCALL SYS.GetArgC
cmp #1
beq .9
lda #1
>SYSCALL SYS.GetArgA
>SYSCALL SYS.GetDevByNameYA
bcs .9
>STYA pDev
txa
ldy #S.PS.hINDEV
sta (pPs),y
* ldy #S.PS.hOUTDEV
* sta (pPs),y
* ldy #S.PS.hERRDEV
* sta (pPs),y
ldx #DEVMGR.OPEN
jsr pDevJmp
bcs .9
lda (pPs)
ora #S.PS.F.EVENT Now accept events
sta (pPs)
rts
.9 lda #$ff
sec
rts
*--------------------------------------
CS.RUN clc
rts
.9 sec
rts
*--------------------------------------
CS.DOEVENT ldy #S.EVT.hDEV
lda (pEvent),y
ldy #S.PS.hINDEV
cmp (pPs),y
bne .99
lda (pEvent)
and #S.EVT.F.KEY
beq .99
ldy #S.EVT.DATAHI
lda (pEvent),y
bne .99
ldy #S.EVT.DATALO
lda (pEvent),y
pha
>SYSCALL SYS.HexOutA
lda #'('
>SYSCALL SYS.COutA
pla
cmp #$20
bcc .1
>SYSCALL SYS.COutA
.1 lda #')'
>SYSCALL SYS.COutA
clc
rts
.99 sec
rts
*--------------------------------------
CS.QUIT ldx #DEVMGR.CLOSE
jsr pDevJmp
clc
rts
*--------------------------------------
CS.END
.DUMMY
.OR 0
DS.START
DS.END
.ED
*--------------------------------------
MAN
SAVE SBIN/DEVDUMP.S
ASM

328
BIN/MEMDUMP.S.txt Normal file
View File

@ -0,0 +1,328 @@
PR#3
PREFIX /A2OSX.SRC
NEW
INC 1
AUTO 6
.LIST OFF
.OP 65C02
.OR $2000
.TF /A2OSX.DEV/BIN/MEMDUMP
*--------------------------------------
.INB INC/MACROS.I
.INB INC/A2OSX.I
.INB INC/LIBSTR.I
*--------------------------------------
PAGELEN .EQ 22
FOOTERLEN .EQ 8
*--------------------------------------
ZPPTR1 .EQ ZPBIN
ZPPTR2 .EQ ZPBIN+2
*--------------------------------------
* File Header (16 Bytes)
*--------------------------------------
CS.START cld
jmp (.1,x)
.DA #$61 6502,Level 1 (65c02)
.DA #1 BIN Layout Version 1
.DA 0
.DA CS.END-CS.START Code Length To Relocate
.DA DS.END-DS.START Data Segment to Allocate
.DA 0
.DA 0
*--------------------------------------
* Relocation Table
*--------------------------------------
.1 .DA CS.INIT
.DA CS.RUN
.DA CS.DOEVENT
.DA CS.QUIT
L.LIBSTR .DA LIBSTR
L.MSG0 .DA MSG0
L.MSG1 .DA MSG1
L.MSG2 .DA MSG2
L.MSG3 .DA MSG3
L.MSG4 .DA MSG4
L.MSG5 .DA MSG5
L.MSG6 .DA MSG6
.DA 0
*--------------------------------------
CS.INIT >LDYA L.LIBSTR
>SYSCALL SYS.LoadLibYA
bcs .9
sta hLIBSTR
lda #0
ldy #DS.END-DS.START-1
.1 sta (pData),y
dey
bpl .1
ldy #MEM.COUNT Skip SLOT0
lda (pData),y
inc
sta (pData),y
lda (pPs)
ora #S.PS.F.EVENT Now accept events
sta (pPs)
clc
.9 rts
*--------------------------------------
CS.RUN ldy #bCANCEL
lda (pData),y
bne .9
ldy #bSTOP
lda (pData),y
bne .8
ldy #MEM.COUNT
lda (pData),y
cmp MemMgr.LastSlot
beq .10
ldy #LINE.COUNT
lda (pData),y
bne .1
>PUSHW L.MSG0
>LIBCALL hLIBSTR,LIBSTR.PRINTF
.1 ldy #MEM.COUNT
lda (pData),y
>SYSCALL SYS.GetMemByIDA
>STYA ZPPTR1
lda (ZPPTR1)
bpl .2
ldy #USED.COUNT
lda (pData),y
inc
sta (pData),y
.2 jsr CS.RUN.PRINTMEM
ldy #MEM.COUNT
lda (pData),y
inc
sta (pData),y
.8 clc
rts
.9 sec
rts
.10 ldy #LINE.COUNT
lda (pData),y
clc
adc #FOOTERLEN
cmp #PAGELEN
bcc .11
lda #$FF
ldy #bSTOP
sta (pData),y
lda #0
ldy #LINE.COUNT
sta (pData),y
clc
rts
.11 ldy #MEM.COUNT
>PUSHB (pData),y
ldy #USED.COUNT
>PUSHB (pData),y
>PUSHW L.MSG2
>LIBCALL hLIBSTR,LIBSTR.PRINTF
>PUSHW MemMgr.HiMem
>PUSHW L.MSG3
>LIBCALL hLIBSTR,LIBSTR.PRINTF
>PUSHW MemMgr.Free
>PUSHW L.MSG4
>LIBCALL hLIBSTR,LIBSTR.PRINTF
>PUSHW MemMgr.LoMem
>PUSHW L.MSG5
>LIBCALL hLIBSTR,LIBSTR.PRINTF
lda MemMgr.Free
sec
sbc MemMgr.LoMem
tay
lda MemMgr.Free+1
sbc MemMgr.LoMem+1
>PUSHYA
>PUSHW L.MSG6
>LIBCALL hLIBSTR,LIBSTR.PRINTF
sec
rts
*--------------------------------------
CS.RUN.PRINTMEM ldy #S.MEM.LEN
lda (ZPPTR1),y
pha
iny
lda (ZPPTR1),y
ply
>PUSHYA
ldy #S.MEM.PTR
lda (ZPPTR1),y
pha
iny
lda (ZPPTR1),y
ply
>PUSHYA
ldy #S.MEM.REFCNT
lda (ZPPTR1),y
>PUSHA
ldy #S.MEM.OWNERPID
lda (ZPPTR1),y
>PUSHA
lda (ZPPTR1)
>PUSHA
ldy #MEM.COUNT
lda (pData),y
>PUSHA
>PUSHW L.MSG1
>LIBCALL hLIBSTR,LIBSTR.PRINTF
ldy #S.MEM.BIN
lda (ZPPTR1),y
bne .3
ldy #S.MEM.PTR
lda (ZPPTR1),y
sta ZPPTR2
iny
lda (ZPPTR1),y
sta ZPPTR2+1
lda #"{"
>SYSCALL SYS.COutA
lda (ZPPTR2)
>SYSCALL SYS.HexOutA
lda #"|"
>SYSCALL SYS.COutA
ldy #1
.1 lda (ZPPTR2),y
cmp #$20
bcs .2
ora #$20
.2 >SYSCALL SYS.COutA
iny
cpy #40
bne .1
lda #"}"
>SYSCALL SYS.COutA
bra .4
.3 >SYSCALL SYS.GetMemPtrA
>PUSHYA
>LIBCALL hLIBSTR,LIBSTR.PRINTP
.4 lda #13
>SYSCALL SYS.COutA
ldy #LINE.COUNT
lda (pData),y
inc
sta (pData),y
cmp #PAGELEN
bne .5
lda #$FF
ldy #bSTOP
sta (pData),y
ldy #LINE.COUNT
lda #0
sta (pData),y
.5 rts
*--------------------------------------
CS.DOEVENT ldy #S.EVT.hDEV is Event from active IN device?
lda (pEvent),y
ldy #S.PS.hINDEV
cmp (pPs),y
bne .9
lda (pEvent)
and #S.EVT.F.KEY is it a KEY event?
beq .9
ldy #S.EVT.DATAHI is it an O or SAPPLE key ?
lda (pEvent),y
bne .9
ldy #S.EVT.DATALO
lda (pEvent),y
cmp #$03 Ctrl-C
bne .1
lda #$FF
ldy #bCANCEL
sta (pData),y
bra .8
.1 cmp #$13 Ctrl-S
bne .2
ldy #bSTOP
lda (pData),y
eor #$FF
sta (pData),y
bra .8
.2 ldy #bSTOP
lda #0
sta (pData),y
.8 clc
rts
.9 sec
rts
*--------------------------------------
CS.QUIT lda hLIBSTR
>SYSCALL SYS.UnloadLibA
clc
rts
*--------------------------------------
CS.END
LIBSTR >PSTRING "libstr.o"
MSG0 >CSTRING "hMem Flags PID REF PTR LEN BINPATH/DATA\n"
MSG1 >CSTRING " %03d %b %03d %03d $%H %05D "
MSG2 >CSTRING "\nAllocated hMem:%d, Total:%d\n"
MSG3 >CSTRING "High Memory: $%H\n"
MSG4 >CSTRING "Free ULimit: $%H\n"
MSG5 >CSTRING "Low Memory: $%H\n"
MSG6 >CSTRING "\nFree Memory: %D Bytes.\n"
hLIBSTR .BS 1
*--------------------------------------
.DUMMY
.OR 0
DS.START
LINE.COUNT .BS 1
MEM.COUNT .BS 1
USED.COUNT .BS 1
bSTOP .BS 1
bCANCEL .BS 1
DS.END
.ED
*--------------------------------------
MAN
SAVE BIN/MEMDUMP.S
ASM

View File

@ -42,8 +42,8 @@ L.MSG.READ.OK4 .DA MSG.READ.OK4
L.MSG.USAGE .DA MSG.USAGE
.DA 0
*--------------------------------------
CS.INIT ldy #S.PS.hARGS
lda (pPs),y
CS.INIT >SYSCALL SYS.GetArgC
cmp #1
bne CS.INIT.SET
CS.INIT.READ jsr NSC.Init
@ -73,7 +73,8 @@ CS.INIT.READ jsr NSC.Init
sec we do not want to stay in memory
rts
CS.INIT.SET >SYSCALL SYS.GetMemPtrA
CS.INIT.SET lda #1
>SYSCALL SYS.GetArgA
>STYA ZPPtr1
lda (ZPPtr1)

View File

@ -6,7 +6,7 @@ AUTO 6
.LIST OFF
.OP 65C02
.OR $2000
.TF /A2OSX.BOOT/BIN/RPCDUMP
.TF /A2OSX.DEV/BIN/RPCDUMP
*--------------------------------------
.INB INC/MACROS.I
.INB INC/A2OSX.I

View File

@ -166,10 +166,11 @@ OPEN ldy #S.DEV.ID
lda (pDev),y
sta A2osX.SCRNDEVS+2
jsr SELECT
lda #3
sta A2osX.ASCREEN
jsr SELECT
lda L.DIV7.0+1
sta DIV7.hi
inc

View File

@ -4,8 +4,14 @@ Multi-Tasking OS for Apple II
Enhanced IIe (65c02 cpu) with 128k, //c, IIgs
## General Information:
Kernel 0.8 is out.
It is confined in Aux LC Bank 1 & 2 to leave enough room at $EOOO for Drivers.
Now, Network drivers, Mouse, DHGR.DRV can load and fit in Aux LC.
Now it's time to make all external BINs use new API, then GUI development will resume.
**A2OSX.BOOT.po** : 140k A2osX boot disk with all binaries
**A2OSX.DEV.po** : 140k A2osX disk with ASM binaries & INClude files
**A2OSX.DEV.po** : 140k A2osX disk with ASM binaries, Debug Tools & INClude files
**A2OSX.SRC.po** : 800k S-C MASM boot disk with all sources
OApple+1,OApple+2,OApple+3 to switch between screens : Kernel Log, text, DHGR.
@ -16,8 +22,8 @@ OApple+1,OApple+2,OApple+3 to switch between screens : Kernel Log, text, DHGR.
!!! Help on writing this code should be greatly appreciated !!!
...
In Progress : Document API...
In Progress : moving TCPIP to socket API
In Progress : moving KERNEL to AuxLC Bnk1 & 2 (16k, more space for drivers)
...
## SYS/KM* Supported Hardware At Kernel Level (ProDOS):
@ -29,31 +35,30 @@ In Progress : moving KERNEL to AuxLC Bnk1 & 2 (16k, more space for drivers)
## SBIN,Daemons/Commands:
| Name | Status | Comment | K.Ver |
| ---- | ------ | ------- | ----- |
| INSDRV | Working | |
| GETTY | Working | |
| LOGIN | In Progress | no auth using /etc/passd yet |
| TCPIP | In Progress | New Socket API. ARP,IP,ICMP,UDP ok, TCP in progress |
| DHCPCLNT | Working | rewritten to use new Socket API |
| SHELL | Working | (See Internal Shell commands) |
| INSDRV | Working | | 0.8 |
| GETTY | Working | | 0.8 |
| LOGIN | In Progress | no auth using /etc/passd yet | 0.8 |
| TCPIP | In Progress | New Socket API. ARP,IP,ICMP,UDP ok, TCP in progress | 0.8 |
| DHCPCLNT | Working | rewritten to use new Socket API | 0.8 |
| SHELL | Working | (See Internal Shell commands) | 0.8 |
## DRV,Drivers:
| Name | Status | Comment | K.Ver |
| ---- | ------ | ------- | ----- |
| Console.DRV | Working | ANSI support in Progress. |
| Console.DRV | Working | ANSI support in Progress. | 0.8 |
| PIC.DRV | In Progress | Apple "Parallel Interface Card" Driver, renamed from PPIC.DRV|
| SSC.DRV | In Progress | |
| SSC.I.DRV | In Progress | |
| Mouse.DRV | Working | |
| Uthernet.DRV | Working | |
| Mouse.DRV | Working | | 0.8 |
| Uthernet.DRV | Working | | 0.8 |
| Uthernet2.DRV | Working | |
| Uther2.AI.DRV | In Progress | With ARP/IP Offloading |
| LanCeGS.DRV | Working | |
| Mouse.DRV | Working | |
| DHGR.DRV | In Progress | except bitblt... |
| DHGR.DRV | In Progress | except bitblt... | 0.8 |
## Internal Shell commands:
| Name | Status | Comment | K.Ver |
| ---- | ------ | ------- | ----- |
| Name | Status | Comment |
| ---- | ------ | ------- |
| CD | Working | |
| DATE | Working | |
| ECHO | Working | |
@ -70,21 +75,27 @@ In Progress : moving KERNEL to AuxLC Bnk1 & 2 (16k, more space for drivers)
| Name | Status | Comment | K.Ver |
| ---- | ------ | ------- | ----- |
| MEM | Working | | |
| LSDEV | Working | | |
| LSDEV | Working | | 0.8 |
| PS | Working | | |
| MD | Working | | |
| RM | Working | switches not yet implemented, new ArgC/Arg[] coming... | |
| RM | Working | switches not yet implemented | |
| LS | Working | BUG: `ls dir` does not list dir content (`ls dir/` works) | |
| CP | Working| switches not yet implemented, new ArgC/Arg[] coming... | |
| CP | Working| switches not yet implemented | |
| ARP | Working | dump ARP cache, setup a static ARP entry | |
| PING | Working | | |
| DNSINFO | Working | dump DNS cache, setup a static DNS entry | |
| IPCONFIG | Working | renamed from NETINFO | |
| NETSTAT | Working | | |
| RPCDUMP | Working | tool based on UDP socket API, renamed from RPCINFO | |
| NETSTAT | Working | | 0.8 |
| EDIT | Working | still missing : find/replace | |
| NSCUTIL | Working | Tool for setting time in NSC/DL1216E | |
## BIN,External DEV Shell commands:
| Name | Status | Comment | K.Ver |
| ---- | ------ | ------- | ----- |
| ASM | In Progress | S-C MASM based multi CPU assembler | |
| DEVDUMP | | | |
| MEMDUMP | Working | | |
| RPCDUMP | Working | tool based on UDP socket API, renamed from RPCINFO | |
## Misc
### S-C MASM color scheme for Notepad++

333
SBIN/TCPIP.S.CFG.txt Normal file
View File

@ -0,0 +1,333 @@
PR#3
PREFIX /A2OSX.SRC
NEW
INC 1
AUTO 6
.LIST OFF
*--------------------------------------
CFG.Read >PUSHW L.HOSTNAME
>LDYA L.MSG.CFG
>SYSCALL SYS.PStrOutYA
jsr CFG.Read.HOSTNAME
bcc .1
>PUSHA
>LDYA L.MSG.CFG.KO
>SYSCALL SYS.PStrOutYA
bra .2
.1 >LDYA L.MSG.CFG.OK
>SYSCALL SYS.PStrOutYA
.2 >PUSHW L.TCPIP.CONF
>LDYA L.MSG.CFG
>SYSCALL SYS.PStrOutYA
jsr CFG.Read.TCPIP.CONF
bcc .3
>PUSHA
>LDYA L.MSG.CFG.KO
>SYSCALL SYS.PStrOutYA
bra .4
.3 >LDYA L.MSG.CFG.OK
>SYSCALL SYS.PStrOutYA
.4 >PUSHW L.HOSTS
>LDYA L.MSG.CFG
>SYSCALL SYS.PStrOutYA
jsr CFG.Read.HOSTS
bcc .5
>PUSHA
>LDYA L.MSG.CFG.KO
>SYSCALL SYS.PStrOutYA
bra .6
.5 >LDYA L.MSG.CFG.OK
>SYSCALL SYS.PStrOutYA
.6 rts
*--------------------------------------
CFG.Read.HOSTNAME
>PUSHWI 0 Aux type
>PUSHBI 4 S.FILEINFO.TYPE.TXT
>PUSHBI SYS.FOPEN.R
>PUSHW L.HOSTNAME
>SYSCALL SYS.LoadFile
bcs .99
stx CFG.hCfgFile
>STYA CFG.FileLen
txa
>SYSCALL SYS.GetMemPtrA
>STYA ZPIPCfgPtr
lda CFG.FileLen+1
bne .2
ldy CFG.FileLen
beq .2
cpy #15
bcs .2
sta IPCFG+S.IPCFG.HOSTNAME,y
.1 dey
bmi .89
lda (ZPIPCfgPtr),y
sta IPCFG+S.IPCFG.HOSTNAME,y
bra .1
.2 jsr .89
sec
rts
.89 lda CFG.hCfgFile
>SYSCALL SYS.FreeMemA
clc
.99 rts
*--------------------------------------
CFG.Read.TCPIP.CONF
>PUSHWI 0 Aux type
>PUSHBI 4 S.FILEINFO.TYPE.TXT
>PUSHBI SYS.FOPEN.R
>PUSHW L.TCPIP.CONF
>SYSCALL SYS.LoadFile
bcs .99
stx CFG.hCfgFile
>STYA CFG.FileLen
txa
>SYSCALL SYS.GetMemPtrA
>STYA ZPIPCfgPtr
.1 jsr CFG.GetLine
bcs .89
jsr CFG.GetKeyword
bcs .1
lda CFG.Keyword
bne .3
ldy UsrBuf256
lda UsrBuf256+1,y
cmp #35 DOMAIN too long!!!
bcs .1
sta IPCFG+S.IPCFG.DOMAIN
ldx #0
.2 lda UsrBuf256+2,y
sta IPCFG+S.IPCFG.DOMAIN,x
beq .1
inx
iny
bne .2
bra .1
.3 jsr CFG.ScanIP
bcs .1
ldy CFG.Keyword
lda CFG.Keyword.Map,y
tax
ldy #0
.4 lda CFG.IP+1,y
sta IPCFG,x
inx
iny
cpy #4
bne .4
lda CFG.Keyword
cmp #1
bne .1
lda #S.IPCFG.STATUS.OK
sta IPCFG
bra .1
.89 lda CFG.hCfgFile
>SYSCALL SYS.FreeMemA
clc
.99 rts
*--------------------------------------
CFG.Read.HOSTS >PUSHWI 0 Aux type
>PUSHBI 4 S.FILEINFO.TYPE.TXT
>PUSHBI SYS.FOPEN.R
>PUSHW L.HOSTS
>SYSCALL SYS.LoadFile
bcs .99
stx CFG.hCfgFile
>STYA CFG.FileLen
txa
>SYSCALL SYS.GetMemPtrA
>STYA ZPIPCfgPtr
.89 lda CFG.hCfgFile
>SYSCALL SYS.FreeMemA
clc
.99 rts
*--------------------------------------
CFG.GetLine stz UsrBuf256
ldx #0
ldy #0
.1 jsr CFG.GetChar
bne .2 end of file?
txa
bne .8
sec
rts
.2 cmp #$0D
beq .8 end of line
inx
sta UsrBuf256,x
cmp #'='
bne .3
txa
dec
tay
.3 cpx #64 line too long ?
bne .1
sec
rts
.8 tya = found ?
beq .9
sta UsrBuf256
txa
sec
sbc UsrBuf256
sta UsrBuf256+1,y
stz UsrBuf256+1,x End with 0 for ScanIP
clc
rts
.9 sec
rts
*--------------------------------------
CFG.GetChar lda CFG.FileLen
bne .1
lda CFG.FileLen+1
beq .9
dec CFG.FileLen+1
.1 dec CFG.FileLen
lda (ZPIPCfgPtr)
inc ZPIPCfgPtr
bne .9
inc ZPIPCfgPtr+1 NZ
.9 rts
*--------------------------------------
CFG.GetKeyword stz CFG.Keyword
ldx #0
.1 phx
ldy #0
.2 lda CFG.Keywords,x
cmp UsrBuf256,y
bne .3
cpy UsrBuf256
beq .4
inx
iny
bne .2
plx
sec
rts
.3 inc CFG.Keyword
plx
txa
sec
adc CFG.Keywords,x
tax
lda CFG.Keywords,x
bne .1
sec
rts
.4 plx
clc
rts
*--------------------------------------
CFG.ScanIP stz CFG.IP
ldx UsrBuf256
.1 ldy #0
.11 lda UsrBuf256+2,x
beq .3
cmp #'0'
bcc .2
cmp #'9'+1
bcs .2
cpy #3
beq .9
iny
sta CFG.StrBuf,y
inx
bra .11
.2 cmp #'.'
bne .9
.3 sty CFG.StrBuf
lda CFG.IP
cmp #4
beq .9
jsr CFG.Dec2Hex
bcs .9
lda CFG.HexByte
inc CFG.IP
ldy CFG.IP
sta CFG.IP,y
inx
lda UsrBuf256+1,x
bne .1
clc
rts
.9 sec
rts
*--------------------------------------
CFG.Dec2Hex sec
ldy CFG.StrBuf
beq .9
lda CFG.StrBuf+1
and #$0f
sta CFG.HexByte
ldy #1
.1 cpy CFG.StrBuf
beq .8
iny
lda CFG.HexByte
asl CFG.HexByte
bcs .9
asl CFG.HexByte
bcs .9
adc CFG.HexByte
bcs .9
asl
bcs .9
sta CFG.HexByte
lda CFG.StrBuf,y
and #$0f
adc CFG.HexByte
sta CFG.HexByte
bcc .1
.9 rts
.8 clc
rts
*--------------------------------------
MAN
SAVE SBIN/TCPIP.S.CFG
LOAD SBIN/TCPIP.S
ASM

View File

@ -173,7 +173,7 @@ BIN.InstallDRV ldy #H.BIN.DRV.CODE.O
.10 sta DevMgr.LastDevID
jsr K.GetDevByIDA
>SYSCALL SYS.GetDevByIDA
>STYA ZPQuickPtr2 setup Ptr2 to dest HEADER
ldy #H.BIN.DRV.HEADER.O

View File

@ -50,15 +50,17 @@ K.GetDevByNameYA
ldx #0
.1 ldy #0
.1 lda (ZPQuickPtr1)
cmp (ZPQuickPtr2)
bne .3
tay
.2 lda (ZPQuickPtr1),y
cmp (ZPQuickPtr2),y
bne .3
tya
iny
cmp (ZPQuickPtr1)
dey
bne .2
lda ZPQuickPtr2