Kernel version 0.8 : Migrating CMDs to new CIO/DIR/TIME API

This commit is contained in:
Rémy GIBERT 2016-10-17 17:47:50 +02:00
parent b12a39c915
commit be591b2569
37 changed files with 638 additions and 791 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -30,7 +30,7 @@ STARTPROC DHCPCLNT
# End Network Section
# GUI Section
#INSDRV DHGR.DRV
#INSDRV MOUSE.DRV
INSDRV MOUSE.DRV
#STARTPROC DESKTOP
# End GUI Section
ECHO *** End A2osX Startup file ***

View File

@ -46,28 +46,23 @@ Ctrl.A ldy #PromptMode
>LDYA L.MSG.HELP
>STYA ZPPTR1
.1 >LDYA ZPPTR1
>SYSCALL SYS.PStrOutYA
bcs .9
>LDYA L.SEQ.CEOL
>SYSCALL SYS.PStrOutYA
.1 lda (ZPPTR1)
beq .8
>PUSHW L.SEQ.CEOL
>PUSHW ZPPTR1
>LDYA L.MSG.HELPLINE
>SYSCALL SYS.PrintFYA
bcs .9
sec
lda (ZPPTR1)
adc ZPPTR1
sta ZPPTR1
bcc .2
bcc .1
inc ZPPTR1+1
.2 lda (ZPPTR1)
beq .8
lda #13
>SYSCALL SYS.COutA
bcs .9
bra .1
.8 jsr SCRN.UpdateStatusBar
bcs .9
rts

View File

@ -10,7 +10,7 @@ SCRN.Init ldy #ScreenH
dec
>PUSHA
>LDYA L.SEQ.INIT
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
bcs .9
lda #12
>SYSCALL SYS.COutA
@ -53,7 +53,7 @@ SCRN.UpdateTopBar
.2 >PUSHYA
>LDYA L.MSG.TOPBAR
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
bcs .9
@ -99,7 +99,7 @@ SCRN.UpdateMain ldy #ScreenY
bcs .9
>LDYA L.SEQ.CEOL
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
bcs .9
inc TmpByte
@ -176,7 +176,7 @@ SCRN.UpdateLineAtALenY
bcs .9
>LDYA L.SEQ.CEOL
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
bcs .9
rts
.9 jmp Ctrl.Q
@ -189,7 +189,7 @@ SCRN.UpdateAttrC
bpl .8
>LDYA L.SEQ.NORM
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
bcs .9
stz bSelected
rts
@ -198,7 +198,7 @@ SCRN.UpdateAttrC
bmi .8
>LDYA L.SEQ.INV
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
bcs .9
lda #$ff
sta bSelected
@ -237,7 +237,7 @@ SCRN.UpdateStatusBar
lda (pData),y
>PUSHA
>LDYA L.MSG.STATUSBAR
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
bcs .9
jmp SCRN.GotoCurXCurY
@ -248,7 +248,7 @@ SCRN.UpdateStatusBar
lda (pData),y
>PUSHA
>LDYA L.MSG.STATUSBAR,x
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
bcs .9
rts
.9 jmp Ctrl.Q
@ -259,7 +259,7 @@ SCRN.UpdateStatusBarErrA
lda (pData),y
>PUSHA
>LDYA L.MSG.STATUSBAR.E
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
bcs .9
rts
.9 jmp Ctrl.Q
@ -281,7 +281,7 @@ GotoXY txa
>PUSHA
>LDYA L.MSG.GOTOXY
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
bcs .9
rts
.9 jmp Ctrl.Q

View File

@ -56,6 +56,7 @@ L.MSG.STATUSBAR.S .DA MSG.STATUSBAR.S
L.MSG.STATUSBAR.E .DA MSG.STATUSBAR.E
L.MSG.NEWFILE .DA MSG.NEWFILE
L.MSG.GOTOXY .DA MSG.GOTOXY
L.MSG.HELPLINE .DA MSG.HELPLINE
L.MSG.HELP .DA MSG.HELP
J.PROMPT .DA Prompt.Editor
.DA Prompt.Help
@ -139,7 +140,7 @@ CS.RUN ldy #bCancel
bne .8
>LDYA L.SEQ.DETECT
>SYSCALL SYS.PStrOutYA Send Query for term W & H
>SYSCALL SYS.PrintFYA Send Query for term W & H
bcs .9
.1 ldy #bCancel
@ -332,7 +333,7 @@ CS.QUIT ldy #hBuffer
>SYSCALL SYS.FreeMemA
.8 >LDYA L.SEQ.RESET
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
bcs .9
lda #12
>SYSCALL SYS.COutA
@ -441,21 +442,21 @@ DecTmpCount lda TmpCount
.INB BIN/EDIT.S.SCRN
*--------------------------------------
CS.END
SEQ.DETECT >PSTRING "Querying terminal capabilities...\e[999;999H\e[6n"
SEQ.INIT >PSTRING "\ec\e[2;%dr"
SEQ.RESET >PSTRING "\ec"
SEQ.INV >PSTRING "\e[7m"
SEQ.NORM >PSTRING "\e[0m"
SEQ.CEOL >PSTRING "\e[K"
MSG.TOPBAR >PSTRING "\e[1;1H\e[7mA2osX Edit:%S\e[K\e[0m"
MSG.STATUSBAR >PSTRING "\e[%d;1H\e[7mPress Ctrl-A For Help Length:%D Col:%d Line:%D\e[K\e[0m"
MSG.STATUSBAR.H >PSTRING "\e[%d;1H\e[7mPress any key to exit this screen:\e[K\e[0m"
MSG.STATUSBAR.F >PSTRING "\e[%d;1H\e[7mFind:%S\e[K\e[0m"
MSG.STATUSBAR.R >PSTRING "\e[%d;1H\e[7mReplace:%S\e[K\e[0m"
MSG.STATUSBAR.S >PSTRING "\e[%d;1H\e[7mSave:%S\e[K\e[0m"
MSG.STATUSBAR.E >PSTRING "\e[%d;1H\e[7mError:%h\e[K\e[0m"
MSG.NEWFILE >PSTRING "(new file)"
MSG.GOTOXY >PSTRING "\e[%d;%dH"
SEQ.DETECT >CSTRING "Querying terminal capabilities...\e[999;999H\e[6n"
SEQ.INIT >CSTRING "\ec\e[2;%dr"
SEQ.RESET >CSTRING "\ec"
SEQ.INV >CSTRING "\e[7m"
SEQ.NORM >CSTRING "\e[0m"
SEQ.CEOL >CSTRING "\e[K"
MSG.TOPBAR >CSTRING "\e[1;1H\e[7mA2osX Edit:%S\e[K\e[0m"
MSG.STATUSBAR >CSTRING "\e[%d;1H\e[7mPress Ctrl-A For Help Length:%D Col:%d Line:%D\e[K\e[0m"
MSG.STATUSBAR.H >CSTRING "\e[%d;1H\e[7mPress any key to exit this screen:\e[K\e[0m"
MSG.STATUSBAR.F >CSTRING "\e[%d;1H\e[7mFind:%S\e[K\e[0m"
MSG.STATUSBAR.R >CSTRING "\e[%d;1H\e[7mReplace:%S\e[K\e[0m"
MSG.STATUSBAR.S >CSTRING "\e[%d;1H\e[7mSave:%S\e[K\e[0m"
MSG.STATUSBAR.E >CSTRING "\e[%d;1H\e[7mError:%h\e[K\e[0m"
MSG.GOTOXY >CSTRING "\e[%d;%dH"
MSG.HELPLINE >CSTRING "%S%s\n"
MSG.HELP >PSTRING "All commands: (* = Not yet implemented)"
>PSTRING "------------"
>PSTRING " Ctrl-A : This help screen"
@ -479,6 +480,8 @@ MSG.HELP >PSTRING "All commands: (* = Not yet implemented)"
>PSTRING " Ctrl-Y : * Go to bottom of file"
>PSTRING " Ctrl-Z : * Undo previous change"
.HS 00
*--------------------------------------
MSG.NEWFILE >PSTRING "(new file)"
EscChars >PSTRING "DBAC"
EscAscii .HS 04080A0B15
hMem .BS 1

View File

@ -37,6 +37,9 @@ CS.START cld
.DA CS.QUIT
L.MSG0 .DA MSG0
L.MSG1 .DA MSG1
L.MSG1.BIN .DA MSG1.BIN
L.MSG1.STR .DA MSG1.STR
L.MSG1.HEX .DA MSG1.HEX
L.MSG2 .DA MSG2
L.MSG3 .DA MSG3
L.MSG4 .DA MSG4
@ -186,59 +189,52 @@ CS.RUN.PRINTMEM ldy #S.MEM.LEN
ldy #S.MEM.BIN
lda (ZPPTR1),y
bne .3
bne .7
****** DATA
ldy #S.MEM.PTR
lda (ZPPTR1),y
sta ZPPTR2
iny
lda (ZPPTR1),y
sta ZPPTR2+1
lda #"{"
>SYSCALL SYS.COutA
lda (ZPPTR2)
lsr
lsr
lsr
lsr
ora #$30
>SYSCALL SYS.COutA
lda (ZPPTR2)
and #$0F
ora #$30
>SYSCALL SYS.COutA
tay
lda #"|"
>SYSCALL SYS.COutA
ldy #1
.1 lda (ZPPTR2),y
.1 lda (ZPPTR2),y Check if it looks like a printable string
cmp #$20
bcs .2
ora #$20
.2 >SYSCALL SYS.COutA
iny
cpy #40
bcc .2 not printable....->hex
dey
bne .1
>PUSHW ZPPTR2 String
>PUSHB (ZPPTR2) Len
>LDYA L.MSG1.STR
>SYSCALL SYS.PrintFYA
bra .8
.2 ldy #15
.3 >PUSHB (ZPPTR2),y
dey
bpl .3
lda #"}"
>SYSCALL SYS.COutA
bra .4
>LDYA L.MSG1.HEX
>SYSCALL SYS.PrintFYA
.3 >SYSCALL SYS.GetMemPtrA
>SYSCALL SYS.PStrOutYA
bra .8
****** BIN
.7 >SYSCALL SYS.GetMemPtrA
>PUSHYA
>LDYA L.MSG1.BIN
>SYSCALL SYS.PrintFYA
.4 lda #13
>SYSCALL SYS.COutA
ldy #LINE.COUNT
.8 ldy #LINE.COUNT
lda (pData),y
inc
sta (pData),y
cmp #PAGELEN
bne .5
bne .9
lda #$FF
ldy #bSTOP
@ -248,7 +244,7 @@ CS.RUN.PRINTMEM ldy #S.MEM.LEN
lda #0
sta (pData),y
.5 rts
.9 rts
*--------------------------------------
CS.DOEVENT ldy #S.EVT.hDEV is Event from active IN device?
lda (pEvent),y
@ -299,6 +295,9 @@ CS.QUIT clc
CS.END
MSG0 >CSTRING "hMem Flags PID REF PTR LEN BINPATH/DATA\n"
MSG1 >CSTRING " %03d %b %03d %03d $%H %05D "
MSG1.BIN >CSTRING "!BIN:%40S\n"
MSG1.STR >CSTRING "#STR:[%03d]:%32S\n"
MSG1.HEX >CSTRING "?HEX:%h%h%h%h.%h%h%h%h.%h%h%h%h.%h%h%h%h\n"
MSG2 >CSTRING "\nAllocated hMem:%d, Total:%d\n"
MSG3 >CSTRING "High Memory: $%H\n"
MSG4 >CSTRING "Free ULimit: $%H\n"

View File

@ -37,8 +37,9 @@ L.LIBTCPIP .DA LIBTCPIP
L.MSG.USAGE .DA MSG.USAGE
.DA 0
*--------------------------------------
CS.INIT ldy #S.PS.hARGS
lda (pPs),y
CS.INIT >SYSCALL SYS.GetArgC
cmp #1
beq .99
>LIBCALL hLIBTCPIP,LIBTCPIP.GET.IPCFG is TCPIP loaded ?
@ -63,11 +64,10 @@ CS.INIT ldy #S.PS.hARGS
rts
.99 >LDYA L.MSG.USAGE
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
lda #SYSMGR.ERRSYN
sec
rts
*--------------------------------------
CS.RUN
CS.RUN.ERROR sec
@ -86,7 +86,7 @@ CS.QUIT lda hLIBTCPIP
rts
*--------------------------------------
CS.END
MSG.USAGE >PSTRING "Usage : NFSMOUNT [HOST | IP]/export /mountvol\n"
MSG.USAGE >CSTRING "Usage : NFSMOUNT [HOST | IP]/export /mountvol\n"
LIBTCPIP >PSTRING "libtcpip.o"
hLIBTCPIP .BS 1
Socket .DA #S.SOCKET.SOCK.DGRAM

View File

@ -227,7 +227,7 @@ DumpRPCFrame lda #S.UDP+24
sta ZPFrameBase+1
>LDYA L.MSG.DUMP0
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
.1 ldy #3
lda (ZPFrameBase),y Value follows?

View File

@ -37,12 +37,12 @@ L.MSG.DETECT .DA MSG.DETECT
.DA 0 End Of Reloc Table
*--------------------------------------
Dev.Detect >LDYA L.MSG.DETECT
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
clc
rts
CS.END
MSG.DETECT >PSTRING "Apple IIe/IIc 80 Col Driver.\n"
MSG.DETECT >CSTRING "Apple IIe/IIc 80 Col Driver.\n"
*--------------------------------------
* Device Header (16 Bytes)
*--------------------------------------

View File

@ -36,7 +36,7 @@ L.MSG.DETECT .DA MSG.DETECT
.DA 0 End Of Reloc Table
*--------------------------------------
Dev.Detect >LDYA L.MSG.DETECT
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
ldx #0
.1 txa
@ -123,7 +123,7 @@ Dev.Detect >LDYA L.MSG.DETECT
clc
rts
CS.END
MSG.DETECT >PSTRING "\nApple IIe/IIc DHGR Driver.\n"
MSG.DETECT >CSTRING "\nApple IIe/IIc DHGR Driver.\n"
*--------------------------------------
* Device Header (16 Bytes)
*--------------------------------------

View File

@ -1,6 +1,6 @@
PR#3
PREFIX /A2OSX.SRC
LOMEM $C00
NEW
INC 1
AUTO 6
.LIST OFF
@ -14,62 +14,7 @@ AUTO 6
*--------------------------------------
ZPTmpPTR .EQ ZPDRV
*--------------------------------------
DEVID .EQ $33
*--------------------------------------
* SMSC L91C96 IO Registers
*--------------------------------------
L91C96.0.TCR .EQ $C080
L91C96.0.TCR.FDSE .EQ %10000000.00000000
L91C96.0.TCR.FUDPLX .EQ %00001000.00000000
L91C96.0.TCR.PADEN .EQ %00000000.10000000
L91C96.0.TCR.TXENA .EQ %00000000.00000001
L91C96.0.EPHSR .EQ $C082
L91C96.0.EPHSR.LINK .EQ %01000000.00000000
L91C96.0.RCR .EQ $C084
L91C96.0.RCR.RESET .EQ %10000000.00000000
L91C96.0.RCR.NOCRC .EQ %00000010.00000000
L91C96.0.RCR.RXENA .EQ %00000001.00000000
L91C96.0.RCR.ALLMUL .EQ %00000000.00000100
L91C96.0.RCR.PRMS .EQ %00000000.00000010
L91C96.0.RCR.RXABRT .EQ %00000000.00000001
L91C96.0.ECR .EQ $C086
L91C96.0.MIR .EQ $C088
L91C96.0.MCR .EQ $C08A
L91C96.1.CR .EQ $C080
L91C96.1.CR.NOWAIT .EQ %00010000.00000000
L91C96.1.BAR .EQ $C082
L91C96.1.IAR .EQ $C084
L91C96.1.GPR .EQ $C08A
L91C96.1.CTR .EQ $C08C
L91C96.1.CTR.DEFAULT .EQ %00000000.00000001
L91C96.1.CTR.AUTOREL .EQ %00000000.00001000
L91C96.2.MMUCR .EQ $C080
L91C96.2.MMUCR.ALLOC .EQ %00100000
L91C96.2.MMUCR.RESET .EQ %01000000
L91C96.2.MMUCR.REMREL .EQ %10000000
L91C96.2.MMUCR.NQPKT .EQ %11000000
L91C96.2.PNR .EQ $C082
L91C96.2.AAR .EQ $C083
L91C96.2.FIFO .EQ $C084
L91C96.2.PTR .EQ $C086
L91C96.2.PTR.RCVD .EQ %10000000.00000000
L91C96.2.PTR.AUTOI .EQ %01000000.00000000
L91C96.2.PTR.READ .EQ %00100000.00000000
L91C96.2.DATA .EQ $C088
L91C96.2.IST .EQ $C08C
L91C96.2.IST.ALLOC .EQ %00001000
L91C96.2.IST.RCV .EQ %00000001
L91C96.2.ACK .EQ $C08C
L91C96.2.MSK .EQ $C08D
L91C96.3.MT .EQ $C080
L91C96.3.MGMT .EQ $C088
L91C96.3.REV .EQ $C08A
L91C96.3.RCV .EQ $C08C
L91C96.BSR .EQ $C08E
.INB DRV/X.NET.91C96.S
*--------------------------------------
* File Header (16 Bytes)
*--------------------------------------
@ -91,9 +36,9 @@ 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 SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
ldx #$10
.1 lda L91C96.BSR+1,x
@ -108,7 +53,7 @@ Dev.Detect sta hArgs
bpl .1 not yat at $80
>LDYA L.MSG.DETECT.KO
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
lda #DEVMGR.ERRNOHW Not Found in any slot, exiting
sec
@ -116,8 +61,11 @@ Dev.Detect sta hArgs
.3 stx DEVSLOTx0
lda hARGS
>LDYA ARGS
>STYA ZPTmpPTR
lda (ZPTmpPTR)
beq .4
sec
ror USERMAC
>SYSCALL SYS.GetMemPtrA
@ -128,22 +76,19 @@ Dev.Detect sta hArgs
sec
rts
.4 >LDYA L.MSG.DETECT.OK
>SYSCALL SYS.PStrOutYA
>LDYA L.DEV.HEADER.NAME
>SYSCALL SYS.PStrOutYA
lda #13
>SYSCALL SYS.COutA
.4 >PUSHW L.DEV.HEADER.NAME
>LDYA L.MSG.DETECT.OK
>SYSCALL SYS.PrintFYA
clc
rts
*--------------------------------------
.INB DRV/X.NET.DRV.S
*--------------------------------------
CS.END
MSG.DETECT >PSTRING "LanCeGS/SMSC91C96 Driver.\n"
MSG.DETECT.OK >PSTRING "LanCeGS/SMSC91C96 Installed As Device : "
MSG.DETECT.KO >PSTRING "Hardware Not Found.\n"
hArgs .BS 1
MSG.DETECT >CSTRING "LanCeGS/SMSC91C96 Driver.\n"
MSG.DETECT.OK >CSTRING "LanCeGS/SMSC91C96 Installed As Device : %S\n"
MSG.DETECT.KO >CSTRING "Hardware Not Found.\n"
Args .BS 2
*--------------------------------------
* Device Header (16 Bytes)
*--------------------------------------

View File

@ -64,7 +64,7 @@ L.DEV.HEADER.NAME .DA DEV.HEADER.NAME
.DA 0 End Of Reloc Table
*--------------------------------------
Dev.Detect >LDYA L.MSG.DETECT
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
stz ZPTmpPtr1
lda #$C1
@ -86,7 +86,7 @@ Dev.Detect >LDYA L.MSG.DETECT
bne .1
>LDYA L.MSG.DETECT.KO
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
lda #DEVMGR.ERRNOHW Not Found in any slot, exiting
sec
@ -104,19 +104,16 @@ Dev.Detect >LDYA L.MSG.DETECT
asl
sta DEVSLOTn0
>PUSHW L.DEV.HEADER.NAME
>LDYA L.MSG.DETECT.OK
>SYSCALL SYS.PStrOutYA
>LDYA L.DEV.HEADER.NAME
>SYSCALL SYS.PStrOutYA
lda #13
>SYSCALL SYS.COutA
>SYSCALL SYS.PrintFYA
clc
rts
*--------------------------------------
CS.END
MSG.DETECT >PSTRING "Apple Mouse Card/IIc Mouse Driver.\n"
MSG.DETECT.OK >PSTRING "Mouse Installed As Device : "
MSG.DETECT.KO >PSTRING "No Mouse Found.\n"
MSG.DETECT >CSTRING "Apple Mouse Card/IIc Mouse Driver.\n"
MSG.DETECT.OK >CSTRING "Mouse Installed As Device : %S\n"
MSG.DETECT.KO >CSTRING "No Mouse Found.\n"
DEVSIG.Offset .HS 05070B0CFB
DEVSIG.Value .HS 38180120D6
DEVSIG.Length .EQ DEVSIG.Value-DEVSIG.Offset

View File

@ -36,7 +36,10 @@ L.MSG.DETECT.KO .DA MSG.DETECT.KO
L.DEV.HEADER.NAME .DA DEV.HEADER.NAME
.DA 0 End Of Reloc Table
*--------------------------------------
Dev.Detect stz ZPTmpPtr1
Dev.Detect >LDYA L.MSG.DETECT
>SYSCALL SYS.PrintFYA
stz ZPTmpPtr1
lda #$C1
sta ZPTmpPtr1+1
.1 ldy #5
@ -55,7 +58,7 @@ Dev.Detect stz ZPTmpPtr1
bne .1
>LDYA L.MSG.DETECT.KO
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
lda #DEVMGR.ERRNOHW Not Found in any slot, exiting
sec
@ -73,20 +76,16 @@ Dev.Detect stz ZPTmpPtr1
asl
sta DEVSLOTn0
>PUSHW L.DEV.HEADER.NAME
>LDYA L.MSG.DETECT.OK
>SYSCALL SYS.PStrOutYA
>LDYA L.DEV.HEADER.NAME
>SYSCALL SYS.PStrOutYA
lda #13
>SYSCALL SYS.COutA
>SYSCALL SYS.PrintFYA
clc
rts
*--------------------------------------
CS.END
MSG.DETECT >PSTRING "Apple Parallel Interface Card.\n"
MSG.DETECT.OK >PSTRING "PIC Installed As Device : "
MSG.DETECT.KO >PSTRING "No PIC Found.\n"
MSG.DETECT >CSTRING "Apple PIC (Parallel Interface Card).\n"
MSG.DETECT.OK >CSTRING "PIC Installed As Device : %S\n"
MSG.DETECT.KO >CSTRING "No PIC Found.\n"
*--------------------------------------
* Device Header (16 Bytes)
*--------------------------------------

View File

@ -63,7 +63,7 @@ L.DEV.HEADER.NAME .DA DEV.HEADER.NAME
*--------------------------------------
Dev.Detect sta hArgs
>LDYA L.MSG.DETECT
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
stz ZPTmpPtr1
lda #$C1
@ -85,7 +85,7 @@ Dev.Detect sta hArgs
bne .1
>LDYA L.MSG.DETECT.KO
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
lda #DEVMGR.ERRNOHW Not Found in any slot, exiting
sec
@ -103,13 +103,9 @@ Dev.Detect sta hArgs
asl
sta DEVSLOTn0
>PUSHW L.DEV.HEADER.NAME
>LDYA L.MSG.DETECT.OK
>SYSCALL SYS.PStrOutYA
>LDYA L.DEV.HEADER.NAME
>SYSCALL SYS.PStrOutYA
lda #13
>SYSCALL SYS.COutA
>SYSCALL SYS.PrintFYA
clc
rts
*--------------------------------------
@ -117,9 +113,9 @@ CS.END
DEVSIG.Offset .HS 05070B0C
DEVSIG.Value .HS 38180131
DEVSIG.Length .EQ DEVSIG.Value-DEVSIG.Offset
MSG.DETECT >PSTRING "Apple SSC (Super Serial Card,//c Serial Port) Driver.\n"
MSG.DETECT.OK >PSTRING "SSC Installed As Device : "
MSG.DETECT.KO >PSTRING "No SSC Found.\n"
MSG.DETECT >CSTRING "Apple SSC (Super Serial Card,//c Serial Port) Driver.\n"
MSG.DETECT.OK >CSTRING "SSC Installed As Device : %S\n"
MSG.DETECT.KO >CSTRING "No SSC Found.\n"
hArgs .BS 1
*--------------------------------------
* Device Header (16 Bytes)

View File

@ -95,7 +95,7 @@ L.DEV.HEADER.NAME .DA DEV.HEADER.NAME
*--------------------------------------
Dev.Detect sta hArgs
>LDYA L.MSG.DETECT
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
stz ZPTmpPtr1
lda #$C1
@ -117,7 +117,7 @@ Dev.Detect sta hArgs
bne .1
>LDYA L.MSG.DETECT.KO
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
lda #DEVMGR.ERRNOHW Not Found in any slot, exiting
sec
@ -137,13 +137,10 @@ Dev.Detect sta hArgs
clc
adc #SSC.REG.DATA+1
sta DEV.DATA.BFFF
>LDYA L.MSG.DETECT.OK
>SYSCALL SYS.PStrOutYA
>LDYA L.DEV.HEADER.NAME
>SYSCALL SYS.PStrOutYA
lda #13
>SYSCALL SYS.COutA
>PUSHW L.DEV.HEADER.NAME
>LDYA L.MSG.DETECT.OK
>SYSCALL SYS.PrintFYA
clc
rts
*--------------------------------------
@ -151,9 +148,9 @@ CS.END
DEVSIG.Offset .HS 05070B0C
DEVSIG.Value .HS 38180131
DEVSIG.Length .EQ DEVSIG.Value-DEVSIG.Offset
MSG.DETECT >PSTRING "Apple SSC (Super Serial Card,//c Serial Port) Driver (IRQ Enabled).\n"
MSG.DETECT.OK >PSTRING "SSC Installed As Device : "
MSG.DETECT.KO >PSTRING "No SSC Found.\n"
MSG.DETECT >CSTRING "Apple SSC (Super Serial Card,//c Serial Port) Driver (IRQ Enabled).\n"
MSG.DETECT.OK >CSTRING "SSC Installed As Device : %S\n"
MSG.DETECT.KO >CSTRING "No SSC Found.\n"
hArgs .BS 1
*--------------------------------------
* Device Header (16 Bytes)

View File

@ -1,6 +1,6 @@
PR#3
PREFIX /A2OSX.SRC
LOMEM $C00
NEW
INC 1
AUTO 6
.LIST OFF
@ -14,67 +14,7 @@ AUTO 6
*--------------------------------------
ZPTmpPTR .EQ ZPDRV
*--------------------------------------
.MA AR.SELECT
lda /W5100.AR.]1
sta W5100.AR,x
lda #W5100.AR.]1
sta W5100.AR+1,x
.EM
*--------------------------------------
* WIZnet W5100 IO Registers
*--------------------------------------
W5100.MR .EQ $C084-$88 Mode Register
W5100.MR.RST .EQ %10000000
W5100.MR.PB .EQ %00010000
W5100.MR.PPPOE .EQ %00001000
W5100.MR.AI .EQ %00000010
W5100.MR.IND .EQ %00000001
W5100.AR .EQ $C085-$88 Memory Pointer
W5100.AR.GAR .EQ $0001
W5100.AR.SUBR .EQ $0005
W5100.AR.SHAR .EQ $0009
W5100.AR.SIPR .EQ $000F
W5100.AR.IR .EQ $0015
W5100.AR.IMR .EQ $0016
W5100.AR.RTR .EQ $0017
W5100.AR.RCR .EQ $0019
W5100.AR.RMSR .EQ $001A
W5100.AR.TMSR .EQ $001B
W5100.AR.PATR .EQ $001C
*W5100.AR.PTIMER .EQ $0028
*W5100.AR.PMAGIC .EQ $0029
*W5100.AR.UIPR .EQ $002A
*W5100.AR.UPORT .EQ $002E
W5100.AR.S0.MR .EQ $0400
W5100.AR.S0.MR.MULTI .EQ $80
W5100.AR.S0.MR.MF .EQ $40
W5100.AR.S0.MR.NDMC .EQ $20
W5100.AR.S0.MR.TCP .EQ $01
W5100.AR.S0.MR.UDP .EQ $02
W5100.AR.S0.MR.IPRAW .EQ $03
W5100.AR.S0.MR.MACRAW .EQ $04
W5100.AR.S0.MR.PPPOE .EQ $05
W5100.AR.S0.CR .EQ $0401
W5100.AR.S0.IR .EQ $0402
W5100.AR.S0.SR .EQ $0403
W5100.AR.S0.PORT .EQ $0404
W5100.AR.S0.DHAR .EQ $0406
W5100.AR.S0.DIPR .EQ $040C
W5100.AR.S0.DPORT .EQ $0410
W5100.AR.S0.MSSR .EQ $0412
W5100.AR.S0.PROTO .EQ $0414
W5100.AR.S0.TOS .EQ $0415
W5100.AR.S0.TTL .EQ $0416
W5100.AR.S0.TX.FSR .EQ $0420
W5100.AR.S0.TX.RD .EQ $0422
W5100.AR.S0.TX.WR .EQ $0424
W5100.AR.S0.RX.RSR .EQ $0426
W5100.AR.S0.RX.RD .EQ $0428
W5100.DR .EQ $C087-$88
*--------------------------------------
TX.BASE .EQ $4000
RX.BASE .EQ $6000
RXTX.MASK .EQ $1FFF
.INB DRV/X.NET.W5100.S
*--------------------------------------
* File Header (16 Bytes)
*--------------------------------------
@ -96,9 +36,9 @@ 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 SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
ldx #$10+$88
.1 lda #W5100.MR.RST
@ -128,7 +68,7 @@ Dev.Detect sta hArgs
bcc .1 #$108 ?
>LDYA L.MSG.DETECT.KO
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
lda #DEVMGR.ERRNOHW
sec
@ -136,9 +76,11 @@ Dev.Detect sta hArgs
.3 stx DEVSLOTx8
lda hARGS
>LDYA ARGS
>STYA ZPTmpPTR
lda (ZPTmpPTR)
bne .4
lda #$00
sta MAC
lda #$08
@ -162,22 +104,19 @@ Dev.Detect sta hArgs
sec
rts
.8 >LDYA L.MSG.DETECT.OK
>SYSCALL SYS.PStrOutYA
>LDYA L.DEV.HEADER.NAME
>SYSCALL SYS.PStrOutYA
lda #13
>SYSCALL SYS.COutA
.8 >PUSHW L.DEV.HEADER.NAME
>LDYA L.MSG.DETECT.OK
>SYSCALL SYS.PrintFYA
clc
rts
*--------------------------------------
.INB DRV/X.NET.DRV.S
*--------------------------------------
CS.END
MSG.DETECT >PSTRING "UtherNet2/W5100 Driver (ARP OffLoad).\n"
MSG.DETECT.OK >PSTRING "UtherNet2/W5100 Installed As Device : "
MSG.DETECT.KO >PSTRING "Hardware Not Found.\n"
hArgs .BS 1
MSG.DETECT >CSTRING "UtherNet2/W5100 Driver (ARP OffLoad).\n"
MSG.DETECT.OK >CSTRING "UtherNet2/W5100 Installed As Device : %S\n"
MSG.DETECT.KO >CSTRING "Hardware Not Found.\n"
Args .BS 2
*--------------------------------------
* Device Header (16 Bytes)
*--------------------------------------

View File

@ -1,6 +1,6 @@
PR#3
PREFIX /A2OSX.SRC
LOMEM $C00
NEW
INC 1
AUTO 6
.LIST OFF
@ -14,95 +14,7 @@ AUTO 6
*--------------------------------------
ZPTmpPTR .EQ ZPDRV
*--------------------------------------
DEVID .EQ $630E
*--------------------------------------
* CS8900A IO Registers
*--------------------------------------
RTDATA .EQ $C080 Receive/Transmit Data (DWORD)
TxCMD .EQ $C084 Transmit Command
TxLength .EQ $C086 Transmission Length
IntStatusQueue .EQ $C088 Interrupt Status Queue
PacketPagePTR .EQ $C08A PacketPage Pointer
PacketPageDATA .EQ $C08C PacketPage Data (DWORD)
*--------------------------------------
PP.ID .EQ $0000 Product ID code (RO)
PP.RFBCNT .EQ $0050 Received Frame Byte Counter (RO)
PP.RxCFG .EQ $0102 Receiver Configuration (RW)
PP.RxCFG.LID .EQ %00000000.00000011
PP.RxCTL .EQ $0104 Receiver Control (RW)
PP.RxCTL.LID .EQ %00000000.00000101
PP.RxCTL.IAHashA .EQ %00000000.01000000
*PP.RxCTL.PromisA .EQ %00000000.10000000
PP.RxCTL.RxOKA .EQ %00000001.00000000
PP.RxCTL.MulticastA .EQ %00000010.00000000
PP.RxCTL.IA .EQ %00000100.00000000
PP.RxCTL.BroadcastA .EQ %00001000.00000000
*PP.RxCTL.CRCerrorA .EQ %00010000.00000000
*PP.RxCTL.RuntA .EQ %00100000.00000000
*PP.RxCTL.ExtradataA .EQ %01000000.00000000
PP.TxCFG .EQ $0106 Transmit Configuration (RW)
PP.TxCMD .EQ $0108 Receiver Control (RW)
PP.TxCMD.LID .EQ %00000000.00001001
*PP.TxCMD.TxStart5 .EQ %00000000.00000000
*PP.TxCMD.TxStart381 .EQ %00000000.01000000
*PP.TxCMD.TxStart1021 .EQ %00000000.10000000
PP.TxCMD.TxStartFULL .EQ %00000000.11000000
*PP.TxCMD.Force .EQ %00000001.00000000
*PP.TxCMD.OneColl .EQ %00000010.00000000
*PP.TxCMD.InhibitCRC .EQ %00010000.00000000
*PP.TxCMD.TxPadDis .EQ %00100000.00000000
PP.BufCFG .EQ $010A
PP.LineCTL .EQ $0112 Line Control (RW)
PP.LineCTL.LID .EQ %00000000.00010011
PP.LineCTL.SerRxOn .EQ %00000000.01000000
PP.LineCTL.SerTxOn .EQ %00000000.10000000
PP.LineCTL.10BaseT .EQ %00000000.00000000
PP.LineCTL.AUIonly .EQ %00000001.00000000
PP.LineCTL.Auto .EQ %00000010.00000000
PP.SelfCTL .EQ $0114 Self Control (RW)
PP.SelfCTL.LID .EQ %00000000.00010101
PP.SelfCTL.RESET .EQ %00000000.01000000
PP.SelfCTL.SWSuspnd .EQ %00000000.10000000
*PP.SelfCTL.HWSleepE .EQ %00000001.00000000
*PP.SelfCTL.HWStndby .EQ %00000010.00000000
PP.BufCTL .EQ $0116
PP.TestCTL .EQ $0118
*PP.TestCTL.LID .EQ %00000000.00011001
*PP.TestCTL.DisLT .EQ %00000000.10000000
PP.TestCTL.FDX .EQ %01000000.00000000
PP.ISQ .EQ $0120
PP.RxEvent .EQ $0124 Receiver Event (RO)
PP.RxEvent.LID .EQ %00000000.00000100
PP.RxEvent.RxOK .EQ %00000001.00000000
PP.RxEvent.IA .EQ %00000100.00000000
PP.RxEvent.Brdcast .EQ %00001000.00000000
PP.RxEvent.CRCerror .EQ %00010000.00000000
PP.RxEvent.Runt .EQ %00100000.00000000
PP.RxEvent.Xtradata .EQ %01000000.00000000
PP.TxEvent .EQ $0128 Transmitter Event (RO)
PP.TxEvent.LID .EQ %00000000.00001000
PP.BufEvent .EQ $012C
PP.RxMISS .EQ $0130
PP.TxCOL .EQ $0132
PP.LineST .EQ $0134 Line Status (RO)
PP.LineST.LID .EQ %00000000.00010100
PP.LineST.LinkOK .EQ %00000000.10000000
PP.LineST.AUI .EQ %00000001.00000000
PP.LineST.10BT .EQ %00000010.00000000
PP.LineST.PolOK .EQ %00010000.00000000
PP.LineST.CRS .EQ %01000000.00000000
PP.SelfST .EQ $0136 Self Status (RO)
PP.SelfST.INITD .EQ %00000000.10000000
PP.BusST .EQ $0138 Bus Status (RO)
PP.BusST.LID .EQ %00000000.00011000
PP.BusST.TxBidErr .EQ %00000000.10000000
PP.BusST.Rdy4TxNOW .EQ %00000001.00000000
PP.TDR .EQ $013C
PP.MAC .EQ $0158 MAC Address (RW)
PP.RxStatus .EQ $0400
PP.RxLength .EQ $0402
PP.RxFrame .EQ $0404
PP.TxFrame .EQ $0A00
.INB DRV/X.NET.8900A.S
*--------------------------------------
* File Header (16 Bytes)
*--------------------------------------
@ -126,7 +38,7 @@ L.DEV.HEADER.NAME .DA DEV.HEADER.NAME
*--------------------------------------
Dev.Detect >STYA ARGS
>LDYA L.MSG.DETECT
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
ldx #$10
.1 >LDYAI PP.ID
@ -146,7 +58,7 @@ Dev.Detect >STYA ARGS
bne .1
>LDYA L.MSG.DETECT.KO
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
lda #DEVMGR.ERRNOHW
sec
@ -180,21 +92,18 @@ Dev.Detect >STYA ARGS
sec
rts
.8 >LDYA L.MSG.DETECT.OK
>SYSCALL SYS.PStrOutYA
>LDYA L.DEV.HEADER.NAME
>SYSCALL SYS.PStrOutYA
lda #13
>SYSCALL SYS.COutA
.8 >PUSHW L.DEV.HEADER.NAME
>LDYA L.MSG.DETECT.OK
>SYSCALL SYS.PrintFYA
clc
rts
*--------------------------------------
.INB DRV/X.NET.DRV.S
*--------------------------------------
CS.END
MSG.DETECT >PSTRING "UtherNet/CS8900A Driver.\n"
MSG.DETECT.OK >PSTRING "UtherNet/CS8900A Installed As Device : "
MSG.DETECT.KO >PSTRING "Hardware Not Found.\n"
MSG.DETECT >CSTRING "UtherNet/CS8900A Driver.\n"
MSG.DETECT.OK >CSTRING "UtherNet/CS8900A Installed As Device : "
MSG.DETECT.KO >CSTRING "Hardware Not Found.\n"
ARGS .BS 2
*--------------------------------------
* Device Header (16 Bytes)

View File

@ -1,6 +1,6 @@
PR#3
PREFIX /A2OSX.SRC
LOMEM $C00
NEW
INC 1
AUTO 6
.LIST OFF
@ -21,60 +21,7 @@ ZPTmpPTR .EQ ZPDRV
sta W5100.AR+1,x
.EM
*--------------------------------------
* WIZnet W5100 IO Registers
*--------------------------------------
W5100.MR .EQ $C084-$88 Mode Register
W5100.MR.RST .EQ %10000000
W5100.MR.PB .EQ %00010000
W5100.MR.PPPOE .EQ %00001000
W5100.MR.AI .EQ %00000010
W5100.MR.IND .EQ %00000001
W5100.AR .EQ $C085-$88 Memory Pointer
W5100.AR.GAR .EQ $0001
W5100.AR.SUBR .EQ $0005
W5100.AR.SHAR .EQ $0009
W5100.AR.SIPR .EQ $000F
W5100.AR.IR .EQ $0015
W5100.AR.IMR .EQ $0016
W5100.AR.RTR .EQ $0017
W5100.AR.RCR .EQ $0019
W5100.AR.RMSR .EQ $001A
W5100.AR.TMSR .EQ $001B
W5100.AR.PATR .EQ $001C
W5100.AR.PTIMER .EQ $0028
W5100.AR.PMAGIC .EQ $0029
W5100.AR.UIPR .EQ $002A
W5100.AR.UPORT .EQ $002E
W5100.AR.S0.MR .EQ $0400
W5100.AR.S0.MR.MULTI .EQ $80
W5100.AR.S0.MR.MF .EQ $40
W5100.AR.S0.MR.NDMC .EQ $20
W5100.AR.S0.MR.TCP .EQ $01
W5100.AR.S0.MR.UDP .EQ $02
W5100.AR.S0.MR.IPRAW .EQ $03
W5100.AR.S0.MR.MACRAW .EQ $04
W5100.AR.S0.MR.PPPOE .EQ $05
W5100.AR.S0.CR .EQ $0401
W5100.AR.S0.IR .EQ $0402
W5100.AR.S0.SR .EQ $0403
W5100.AR.S0.PORT .EQ $0404
W5100.AR.S0.DHAR .EQ $0406
W5100.AR.S0.DIPR .EQ $040C
W5100.AR.S0.DPORT .EQ $0410
W5100.AR.S0.MSSR .EQ $0412
W5100.AR.S0.PROTO .EQ $0414
W5100.AR.S0.TOS .EQ $0415
W5100.AR.S0.TTL .EQ $0416
W5100.AR.S0.TX.FSR .EQ $0420
W5100.AR.S0.TX.RD .EQ $0422
W5100.AR.S0.TX.WR .EQ $0424
W5100.AR.S0.RX.RSR .EQ $0426
W5100.AR.S0.RX.RD .EQ $0428
W5100.DR .EQ $C087-$88
*--------------------------------------
TX.BASE .EQ $4000
RX.BASE .EQ $6000
RXTX.MASK .EQ $1FFF
.INB DRV/X.NET.W5100.S
*--------------------------------------
* File Header (16 Bytes)
*--------------------------------------
@ -96,9 +43,9 @@ 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 SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
ldx #$10+$88
.1 lda #W5100.MR.RST
@ -128,7 +75,7 @@ Dev.Detect sta hArgs
bcc .1 #$108 ?
>LDYA L.MSG.DETECT.KO
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
lda #DEVMGR.ERRNOHW
sec
@ -136,9 +83,11 @@ Dev.Detect sta hArgs
.3 stx DEVSLOTx8
lda hARGS
>LDYA ARGS
>STYA ZPTmpPTR
lda (ZPTmpPTR)
bne .4
lda #$00
sta MAC
lda #$08
@ -162,22 +111,19 @@ Dev.Detect sta hArgs
sec
rts
.8 >LDYA L.MSG.DETECT.OK
>SYSCALL SYS.PStrOutYA
>LDYA L.DEV.HEADER.NAME
>SYSCALL SYS.PStrOutYA
lda #13
>SYSCALL SYS.COutA
.8 >PUSHW L.DEV.HEADER.NAME
>LDYA L.MSG.DETECT.OK
>SYSCALL SYS.PrintFYA
clc
rts
*--------------------------------------
.INB DRV/X.NET.DRV.S
*--------------------------------------
CS.END
MSG.DETECT >PSTRING "UtherNet2/W5100 Driver.\n"
MSG.DETECT.OK >PSTRING "UtherNet2/W5100 Installed As Device : "
MSG.DETECT.KO >PSTRING "Hardware Not Found.\n"
hArgs .BS 1
MSG.DETECT >CSTRING "UtherNet2/W5100 Driver.\n"
MSG.DETECT.OK >CSTRING "UtherNet2/W5100 Installed As Device : %S\n"
MSG.DETECT.KO >CSTRING "Hardware Not Found.\n"
Args .BS 2
*--------------------------------------
* Device Header (16 Bytes)
*--------------------------------------

99
DRV/X.NET.8900A.S.txt Normal file
View File

@ -0,0 +1,99 @@
PR#3
PREFIX /A2OSX.SRC
LOMEM $C00
INC 1
AUTO 6
.LIST OFF
*--------------------------------------
* CS8900A IO Registers
*--------------------------------------
DEVID .EQ $630E
*--------------------------------------
RTDATA .EQ $C080 Receive/Transmit Data (DWORD)
TxCMD .EQ $C084 Transmit Command
TxLength .EQ $C086 Transmission Length
IntStatusQueue .EQ $C088 Interrupt Status Queue
PacketPagePTR .EQ $C08A PacketPage Pointer
PacketPageDATA .EQ $C08C PacketPage Data (DWORD)
*--------------------------------------
PP.ID .EQ $0000 Product ID code (RO)
PP.RFBCNT .EQ $0050 Received Frame Byte Counter (RO)
PP.RxCFG .EQ $0102 Receiver Configuration (RW)
PP.RxCFG.LID .EQ %00000000.00000011
PP.RxCTL .EQ $0104 Receiver Control (RW)
PP.RxCTL.LID .EQ %00000000.00000101
PP.RxCTL.IAHashA .EQ %00000000.01000000
*PP.RxCTL.PromisA .EQ %00000000.10000000
PP.RxCTL.RxOKA .EQ %00000001.00000000
PP.RxCTL.MulticastA .EQ %00000010.00000000
PP.RxCTL.IA .EQ %00000100.00000000
PP.RxCTL.BroadcastA .EQ %00001000.00000000
*PP.RxCTL.CRCerrorA .EQ %00010000.00000000
*PP.RxCTL.RuntA .EQ %00100000.00000000
*PP.RxCTL.ExtradataA .EQ %01000000.00000000
PP.TxCFG .EQ $0106 Transmit Configuration (RW)
PP.TxCMD .EQ $0108 Receiver Control (RW)
PP.TxCMD.LID .EQ %00000000.00001001
*PP.TxCMD.TxStart5 .EQ %00000000.00000000
*PP.TxCMD.TxStart381 .EQ %00000000.01000000
*PP.TxCMD.TxStart1021 .EQ %00000000.10000000
PP.TxCMD.TxStartFULL .EQ %00000000.11000000
*PP.TxCMD.Force .EQ %00000001.00000000
*PP.TxCMD.OneColl .EQ %00000010.00000000
*PP.TxCMD.InhibitCRC .EQ %00010000.00000000
*PP.TxCMD.TxPadDis .EQ %00100000.00000000
PP.BufCFG .EQ $010A
PP.LineCTL .EQ $0112 Line Control (RW)
PP.LineCTL.LID .EQ %00000000.00010011
PP.LineCTL.SerRxOn .EQ %00000000.01000000
PP.LineCTL.SerTxOn .EQ %00000000.10000000
*PP.LineCTL.10BaseT .EQ %00000000.00000000
*PP.LineCTL.AUIonly .EQ %00000001.00000000
PP.LineCTL.Auto .EQ %00000010.00000000
PP.SelfCTL .EQ $0114 Self Control (RW)
PP.SelfCTL.LID .EQ %00000000.00010101
PP.SelfCTL.RESET .EQ %00000000.01000000
PP.SelfCTL.SWSuspnd .EQ %00000000.10000000
*PP.SelfCTL.HWSleepE .EQ %00000001.00000000
*PP.SelfCTL.HWStndby .EQ %00000010.00000000
PP.BufCTL .EQ $0116
PP.TestCTL .EQ $0118
*PP.TestCTL.LID .EQ %00000000.00011001
*PP.TestCTL.DisLT .EQ %00000000.10000000
PP.TestCTL.FDX .EQ %01000000.00000000
PP.ISQ .EQ $0120
PP.RxEvent .EQ $0124 Receiver Event (RO)
PP.RxEvent.LID .EQ %00000000.00000100
PP.RxEvent.RxOK .EQ %00000001.00000000
PP.RxEvent.IA .EQ %00000100.00000000
PP.RxEvent.Brdcast .EQ %00001000.00000000
PP.RxEvent.CRCerror .EQ %00010000.00000000
PP.RxEvent.Runt .EQ %00100000.00000000
PP.RxEvent.Xtradata .EQ %01000000.00000000
PP.TxEvent .EQ $0128 Transmitter Event (RO)
PP.TxEvent.LID .EQ %00000000.00001000
PP.BufEvent .EQ $012C
PP.RxMISS .EQ $0130
PP.TxCOL .EQ $0132
PP.LineST .EQ $0134 Line Status (RO)
PP.LineST.LID .EQ %00000000.00010100
PP.LineST.LinkOK .EQ %00000000.10000000
PP.LineST.AUI .EQ %00000001.00000000
PP.LineST.10BT .EQ %00000010.00000000
PP.LineST.PolOK .EQ %00010000.00000000
PP.LineST.CRS .EQ %01000000.00000000
PP.SelfST .EQ $0136 Self Status (RO)
PP.SelfST.INITD .EQ %00000000.10000000
PP.BusST .EQ $0138 Bus Status (RO)
PP.BusST.LID .EQ %00000000.00011000
PP.BusST.TxBidErr .EQ %00000000.10000000
PP.BusST.Rdy4TxNOW .EQ %00000001.00000000
PP.TDR .EQ $013C
PP.MAC .EQ $0158 MAC Address (RW)
PP.RxStatus .EQ $0400
PP.RxLength .EQ $0402
PP.RxFrame .EQ $0404
PP.TxFrame .EQ $0A00
*--------------------------------------
MAN
SAVE DRV/X.NET.8900A.S

66
DRV/X.NET.91C96.S.txt Normal file
View File

@ -0,0 +1,66 @@
PR#3
PREFIX /A2OSX.SRC
NEW
INC 1
AUTO 6
.LIST OFF
*--------------------------------------
* SMSC L91C96 IO Registers
*--------------------------------------
DEVID .EQ $33
*--------------------------------------
L91C96.0.TCR .EQ $C080
L91C96.0.TCR.FDSE .EQ %10000000.00000000
L91C96.0.TCR.FUDPLX .EQ %00001000.00000000
L91C96.0.TCR.PADEN .EQ %00000000.10000000
L91C96.0.TCR.TXENA .EQ %00000000.00000001
L91C96.0.EPHSR .EQ $C082
L91C96.0.EPHSR.LINK .EQ %01000000.00000000
L91C96.0.RCR .EQ $C084
L91C96.0.RCR.RESET .EQ %10000000.00000000
L91C96.0.RCR.NOCRC .EQ %00000010.00000000
L91C96.0.RCR.RXENA .EQ %00000001.00000000
L91C96.0.RCR.ALLMUL .EQ %00000000.00000100
*L91C96.0.RCR.PRMS .EQ %00000000.00000010
*L91C96.0.RCR.RXABRT .EQ %00000000.00000001
L91C96.0.ECR .EQ $C086
L91C96.0.MIR .EQ $C088
L91C96.0.MCR .EQ $C08A
L91C96.1.CR .EQ $C080
L91C96.1.CR.NOWAIT .EQ %00010000.00000000
L91C96.1.BAR .EQ $C082
L91C96.1.IAR .EQ $C084
L91C96.1.GPR .EQ $C08A
L91C96.1.CTR .EQ $C08C
L91C96.1.CTR.DEFAULT .EQ %00000000.00000001
L91C96.1.CTR.AUTOREL .EQ %00000000.00001000
L91C96.2.MMUCR .EQ $C080
L91C96.2.MMUCR.ALLOC .EQ %00100000
L91C96.2.MMUCR.RESET .EQ %01000000
L91C96.2.MMUCR.REMREL .EQ %10000000
L91C96.2.MMUCR.NQPKT .EQ %11000000
L91C96.2.PNR .EQ $C082
L91C96.2.AAR .EQ $C083
L91C96.2.FIFO .EQ $C084
L91C96.2.PTR .EQ $C086
L91C96.2.PTR.RCVD .EQ %10000000.00000000
L91C96.2.PTR.AUTOI .EQ %01000000.00000000
L91C96.2.PTR.READ .EQ %00100000.00000000
L91C96.2.DATA .EQ $C088
L91C96.2.IST .EQ $C08C
L91C96.2.IST.ALLOC .EQ %00001000
L91C96.2.IST.RCV .EQ %00000001
*L91C96.2.ACK .EQ $C08C
*L91C96.2.MSK .EQ $C08D
L91C96.3.MT .EQ $C080
L91C96.3.MGMT .EQ $C088
L91C96.3.REV .EQ $C08A
L91C96.3.RCV .EQ $C08C
L91C96.BSR .EQ $C08E
*--------------------------------------
MAN
SAVE DRV/X.NET.91C96.S

71
DRV/X.NET.W5100.S.txt Normal file
View File

@ -0,0 +1,71 @@
PR#3
PREFIX /A2OSX.SRC
NEW
INC 1
AUTO 6
.LIST OFF
*--------------------------------------
* WIZnet W5100 IO Registers
*--------------------------------------
.MA AR.SELECT
lda /W5100.AR.]1
sta W5100.AR,x
lda #W5100.AR.]1
sta W5100.AR+1,x
.EM
*--------------------------------------
W5100.MR .EQ $C084-$88 Mode Register
W5100.MR.RST .EQ %10000000
W5100.MR.PB .EQ %00010000
W5100.MR.PPPOE .EQ %00001000
W5100.MR.AI .EQ %00000010
W5100.MR.IND .EQ %00000001
W5100.AR .EQ $C085-$88 Memory Pointer
W5100.AR.GAR .EQ $0001
W5100.AR.SUBR .EQ $0005
W5100.AR.SHAR .EQ $0009
W5100.AR.SIPR .EQ $000F
W5100.AR.IR .EQ $0015
W5100.AR.IMR .EQ $0016
W5100.AR.RTR .EQ $0017
W5100.AR.RCR .EQ $0019
W5100.AR.RMSR .EQ $001A
W5100.AR.TMSR .EQ $001B
W5100.AR.PATR .EQ $001C
W5100.AR.PTIMER .EQ $0028
W5100.AR.PMAGIC .EQ $0029
W5100.AR.UIPR .EQ $002A
W5100.AR.UPORT .EQ $002E
W5100.AR.S0.MR .EQ $0400
W5100.AR.S0.MR.MULTI .EQ $80
W5100.AR.S0.MR.MF .EQ $40
W5100.AR.S0.MR.NDMC .EQ $20
W5100.AR.S0.MR.TCP .EQ $01
W5100.AR.S0.MR.UDP .EQ $02
W5100.AR.S0.MR.IPRAW .EQ $03
W5100.AR.S0.MR.MACRAW .EQ $04
W5100.AR.S0.MR.PPPOE .EQ $05
W5100.AR.S0.CR .EQ $0401
W5100.AR.S0.IR .EQ $0402
W5100.AR.S0.SR .EQ $0403
W5100.AR.S0.PORT .EQ $0404
W5100.AR.S0.DHAR .EQ $0406
W5100.AR.S0.DIPR .EQ $040C
W5100.AR.S0.DPORT .EQ $0410
W5100.AR.S0.MSSR .EQ $0412
W5100.AR.S0.PROTO .EQ $0414
W5100.AR.S0.TOS .EQ $0415
W5100.AR.S0.TTL .EQ $0416
W5100.AR.S0.TX.FSR .EQ $0420
W5100.AR.S0.TX.RD .EQ $0422
W5100.AR.S0.TX.WR .EQ $0424
W5100.AR.S0.RX.RSR .EQ $0426
W5100.AR.S0.RX.RD .EQ $0428
W5100.DR .EQ $C087-$88
*--------------------------------------
TX.BASE .EQ $4000
RX.BASE .EQ $6000
RXTX.MASK .EQ $1FFF
*--------------------------------------
MAN
SAVE DRV/X.NET.W5100.S

View File

@ -193,8 +193,8 @@ SYS.CLOSEDIRA .EQ $3C
SYS.MKDIRYA .EQ $3E
*--------------------------------------
SYS.COutA .EQ $40
* .EQ $42
SYS.PStrOutYA .EQ $44
SYS.SScanF .EQ $42
* .EQ $44
SYS.PrintFYA .EQ $46
* .EQ $48 SYS.FPUTCA

View File

@ -6,7 +6,7 @@ AUTO 6
.LIST OFF
.OP 65C02
*--------------------------------------
LIBSTR.PRINTF .EQ 4
*LIBSTR.PRINTF .EQ 4
*LIBSTR.PRINTC .EQ 6
*LIBSTR.PRINTP .EQ 8
*LIBSTR.STRMATCHP .EQ 10

View File

@ -42,20 +42,6 @@ In Progress : moving TCPIP to socket API
| 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. | 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 | | 0.8 |
| Uthernet.DRV | Working | | 0.8 |
| Uthernet2.DRV | Working | |
| Uther2.AI.DRV | In Progress | With ARP/IP Offloading |
| LanCeGS.DRV | Working | |
| DHGR.DRV | In Progress | except bitblt... | 0.8 |
## Internal Shell commands:
| Name | Status | Comment |
| ---- | ------ | ------- |
@ -71,6 +57,20 @@ In Progress : moving TCPIP to socket API
| SET | Working | |
| STARTPROC | Working | Used in A2osX.startup |
## DRV,Drivers:
| Name | Status | Comment | K.Ver |
| ---- | ------ | ------- | ----- |
| Console.DRV | Working | ANSI support in Progress. | 0.8 |
| PIC.DRV | In Progress | Apple "Parallel Interface Card" Driver, renamed from PPIC.DRV | 0.8 |
| SSC.DRV | In Progress | | 0.8 |
| SSC.I.DRV | In Progress | | 0.8 |
| Mouse.DRV | Working | | 0.8 |
| Uthernet.DRV | Working | | 0.8 |
| Uthernet2.DRV | Working | | 0.8 |
| Uther2.AI.DRV | In Progress | With ARP/IP Offloading | 0.8 |
| LanCeGS.DRV | Working | | 0.8 |
| DHGR.DRV | In Progress | except bitblt... | 0.8 |
## BIN,External Shell commands:
| Name | Status | Comment | K.Ver |
| ---- | ------ | ------- | ----- |
@ -79,11 +79,11 @@ In Progress : moving TCPIP to socket API
| PS | Working | | 0.8 |
| MD | Working | | 0.8 |
| 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 | |
| LS | Working | switches not yet implemented | 0.8 |
| CP | Working | switches not yet implemented | |
| ARP | Working | dump ARP cache, setup a static ARP entry | 0.8 |
| PING | Working | | |
| DNSINFO | Working | dump DNS cache, setup a static DNS entry | |
| DNSINFO | Working | dump DNS cache, setup a static DNS entry | | 0.8 |
| IPCONFIG | Working | renamed from NETINFO | 0.8 |
| NETSTAT | Working | | 0.8 |
| EDIT | Working | still missing : find/replace | 0.8 |
@ -93,9 +93,9 @@ In Progress : moving TCPIP to socket API
| Name | Status | Comment | K.Ver |
| ---- | ------ | ------- | ----- |
| ASM | In Progress | S-C MASM based multi CPU assembler | |
| DEVDUMP | | | |
| DEVDUMP | | | 0.8 |
| MEMDUMP | Working | | 0.8 |
| RPCDUMP | Working | tool based on UDP socket API, renamed from RPCINFO | |
| RPCDUMP | Working | tool based on UDP socket API, renamed from RPCINFO | 0.8 |
## Misc
### S-C MASM color scheme for Notepad++

View File

@ -40,7 +40,7 @@ L.DrawLine.X1 .DA DrawLine.X1
.DA 0
*--------------------------------------
CS.INIT >LDYA L.MSG.INIT
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
>LDYA L.LIBGFX
>SYSCALL SYS.LoadLibYA
@ -213,7 +213,7 @@ CS.END
DEVNAME.GFX >PSTRING "GFX"
DEVNAME.MOUSE >PSTRING "MOU1"
LIBGFX >PSTRING "libgfx.o"
MSG.INIT >PSTRING "DESKTOP:Init...\n"
MSG.INIT >CSTRING "DESKTOP:Init...\n"
hLibGFX .BS 1
hDevGFX .BS 1
hDevMouse .BS 1

View File

@ -97,7 +97,7 @@ CS.INIT >LDYA L.LIBTCPIP
.98 >LDYA L.MSG.CFG.ND
bra .90
.99 >LDYA L.MSG.CFG.NA
.90 >SYSCALL SYS.PStrOutYA
.90 >SYSCALL SYS.PrintFYA
lda #0
sec
rts
@ -113,7 +113,7 @@ CS.RUN >PUSHW L.Socket
sta (pData),y
>LDYA L.MSG.CFG1
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
jsr Init.Timeout
@ -151,7 +151,7 @@ CS.RUN.SREQ ldx #3
bpl .1
>LDYA L.MSG.CFG2
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
>PUSHWI DHCP.REQ.LEN
>PUSHW L.DHCP.REQ
@ -192,7 +192,7 @@ CS.RUN.OK lda #S.IPCFG.STATUS.OK
bpl .2
>LDYA L.MSG.CFG.OK
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
lda #0 Leave with NO ERROR
sec
rts
@ -200,7 +200,7 @@ CS.RUN.OK lda #S.IPCFG.STATUS.OK
CS.RUN.KO pha
>PUSHA
>LDYA L.MSG.CFG.KO
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
pla
sec
rts
@ -441,12 +441,12 @@ Wait.TimeOut sec
*--------------------------------------
CS.END
LIBTCPIP >PSTRING "libtcpip.o"
MSG.CFG1 >PSTRING "DHCPCLNT:Searching for DHCP servers...\n"
MSG.CFG2 >PSTRING "DHCPCLNT:Reply from DHCP Server at %d.%d.%d.%d, requesting...\n"
MSG.CFG.KO >PSTRING "DHCPCLNT:Time Out [%h].\n"
MSG.CFG.OK >PSTRING "DHCPCLNT:Success:[IP=%d.%d.%d.%d/%d.%d.%d.%d]\n"
MSG.CFG.ND >PSTRING "DHCPCLNT:No Device, exiting.\n"
MSG.CFG.NA >PSTRING "DHCPCLNT:TCPIP Already configured, exiting.\n"
MSG.CFG1 >CSTRING "DHCPCLNT:Searching for DHCP servers...\n"
MSG.CFG2 >CSTRING "DHCPCLNT:Reply from DHCP Server at %d.%d.%d.%d, requesting...\n"
MSG.CFG.KO >CSTRING "DHCPCLNT:Time Out [%h].\n"
MSG.CFG.OK >CSTRING "DHCPCLNT:Success:[IP=%d.%d.%d.%d/%d.%d.%d.%d]\n"
MSG.CFG.ND >CSTRING "DHCPCLNT:No Device, exiting.\n"
MSG.CFG.NA >CSTRING "DHCPCLNT:TCPIP Already configured, exiting.\n"
hLIBTCPIP .BS 1
IPCFG .BS S.IPCFG
FrameLen .BS 2

View File

@ -40,7 +40,7 @@ CS.INIT >SYSCALL SYS.GetArgC
bne .1
>LDYA L.MSG.USAGE
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
lda #0
sec
rts
@ -93,7 +93,7 @@ CS.RUN lda #13 try send a CR...
adc /S.DEV.NAME
>PUSHYA
>LDYA L.MSG.GREETINGS
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
bcs .8 unable to send greetings...loop..
@ -121,8 +121,8 @@ CS.QUIT ldy #hBinName
rts
*--------------------------------------
CS.END
MSG.USAGE >PSTRING "GETTY <DEV> <PROGRAM>"
MSG.GREETINGS >PSTRING "\e[12h\nA2osX-GeTTY on Dev=%S\n"
MSG.USAGE >CSTRING "GETTY <DEV> <PROGRAM>"
MSG.GREETINGS >CSTRING "\e[12h\nA2osX-GeTTY on Dev=%S\n"
*--------------------------------------
.DUMMY
.OR 0

View File

@ -58,7 +58,7 @@ CS.INIT >LDYA L.LIBTCPIP
CS.RUN jsr Init.Timeout
>LDYA L.MSG.TCPWAIT
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
.1 >LIBCALL hLIBTCPIP,LIBTCPIP.GET.IPCFG is TCPIP loaded ?
bcs .99
@ -72,7 +72,7 @@ CS.RUN jsr Init.Timeout
bcc .1
.99 >LDYA L.MSG.TCPIPERR
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
lda #SYSMGR.ERRSYN
sec
rts
@ -93,7 +93,7 @@ CS.RUN.INIT ldx #3
sta (pData),y
>LDYA L.MSG.INITOK
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
.11 >SYSCALL SYS.Sleep
ldy #bCTRLC
@ -118,17 +118,17 @@ CS.RUN.INIT ldx #3
bpl .2
>LDYA L.MSG.INCOMING
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
bra .11
.9 >LDYA L.MSG.SKTERR
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
lda #SYSMGR.ERRSYN
sec
rts
.99 >LDYA L.MSG.ABORT
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
lda #0
sec
rts
@ -196,12 +196,12 @@ Wait.TimeOut sec
CS.END
*--------------------------------------
LIBTCPIP >PSTRING "libtcpip.o"
MSG.TCPWAIT >PSTRING "HTTPD:Waiting for TCP/IP initializing...\n"
MSG.INITOK >PSTRING "HTTPD:Init Ok, Listening.\n"
MSG.TCPIPERR >PSTRING "HTTPD:TCP/IP Not initialized properly\n"
MSG.SKTERR >PSTRING "HTTPD:Listen Error\n"
MSG.ABORT >PSTRING "HTTPD:User Aborted\n"
MSG.INCOMING >PSTRING "HTTPD:Incoming Connection From : %d.%d.%d.%d\n"
MSG.TCPWAIT >CSTRING "HTTPD:Waiting for TCP/IP initializing...\n"
MSG.INITOK >CSTRING "HTTPD:Init Ok, Listening.\n"
MSG.TCPIPERR >CSTRING "HTTPD:TCP/IP Not initialized properly\n"
MSG.SKTERR >CSTRING "HTTPD:Listen Error\n"
MSG.ABORT >CSTRING "HTTPD:User Aborted\n"
MSG.INCOMING >CSTRING "HTTPD:Incoming Connection From : %d.%d.%d.%d\n"
hLIBTCPIP .BS 1
*--------------------------------------
Socket .DA #S.SOCKET.SOCK.STREAM

View File

@ -42,7 +42,7 @@ CS.INIT >SYSCALL SYS.GetArgC
bne .1
>LDYA L.MSG.HELP
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
lda #0 tell TSKMGR that all done ok, but
sec we do not want to stay in memory
rts
@ -52,13 +52,15 @@ CS.INIT >SYSCALL SYS.GetArgC
>PUSHYA
>LDYA L.MSG.LOAD
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
lda #1 get PTR to ARG[1] (Driver name)
>SYSCALL SYS.GetArgA
>SYSCALL SYS.LoadDrvYA YA = PTR to ARG[1...n]
bcs .99
lda #0 success, but....
sec we do not want to stay in memory
.99 rts
*--------------------------------------
@ -68,8 +70,8 @@ CS.QUIT clc
rts
*--------------------------------------
CS.END
MSG.HELP >PSTRING "Usage: insdrv file.drv <args>\n"
MSG.LOAD >PSTRING "INSDRV:Loading %S...\n"
MSG.HELP >CSTRING "Usage: insdrv file.drv <args>\n"
MSG.LOAD >CSTRING "INSDRV:Loading %S...\n"
*--------------------------------------
MAN
SAVE SBIN/INSDRV.S

View File

@ -55,7 +55,7 @@ CS.RUN lda #0
bcs .9
>LDYA L.MSG.LOGIN
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
bcs .9
lda #0 Echo all caracters
@ -70,7 +70,7 @@ CS.RUN lda #0
bcs .9
>LDYA L.MSG.PASSWORD
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
lda #'*'
jsr INPUT.RESET
@ -196,8 +196,8 @@ INPUT.LINEIN ldy #INPUT.Status
rts
*--------------------------------------
CS.END
MSG.LOGIN >PSTRING "login:"
MSG.PASSWORD >PSTRING "password:"
MSG.LOGIN >CSTRING "login:"
MSG.PASSWORD >CSTRING "password:"
SHELL >PSTRING "${A2OSX}SBIN/SHELL"
.DUMMY
.OR 0

View File

@ -189,11 +189,10 @@ Cmd.Exec.CD lda ARGS
ldy #S.PS.hPREFIX
lda (pPs),y
>SYSCALL SYS.GetMemPtrA
>SYSCALL SYS.PStrOutYA
bcs .9
lda #13
>SYSCALL SYS.COutA
.9 rts
>PUSHYA
>LDYA L.MSG.PSTR
>SYSCALL SYS.PrintFYA
rts
Cmd.Exec.CD1 lda ARGS+1
cmp #'/' Full Path?
@ -301,38 +300,38 @@ Cmd.Exec.SET lda ARGS
>SYSCALL SYS.GetMemPtrA
>STYA ZPPTR1
* No arg, print all ENV
.1 lda (ZPPTR1)
beq .8 Ending 0 ?
>LDYA ZPPTR1
>SYSCALL SYS.PStrOutYA
bcs .9
lda ZPPTR1 get next for value
sec
adc (ZPPTR1) Add len+1 to PTR
sta ZPPTR2
lda ZPPTR1+1
adc #0
sta ZPPTR2+1
lda ZPPTR1
lda (ZPPTR2) just in case...
beq .8
>PUSHW ZPPTR2 Push value
>PUSHW ZPPTR1 Push name
>LDYA L.MSG.PRINTENV
>SYSCALL SYS.PrintFYA
bcs .9
lda ZPPTR2
sec
adc (ZPPTR1) Add len+1 to PTR
adc (ZPPTR2) Add len+1 to PTR
sta ZPPTR1
bcc .2
inc ZPPTR1+1
.2 lda #'='
>SYSCALL SYS.COutA
bcs .9
>LDYA ZPPTR1
>SYSCALL SYS.PStrOutYA
bcs .9
lda #13
>SYSCALL SYS.COutA
bcs .9
lda ZPPTR1
sec
adc (ZPPTR1) Add len+1 to PTR
sta ZPPTR1
bcc .1
inc ZPPTR1+1
lda ZPPTR2+1
adc #0
sta ZPPTR1+1
bra .1
.8 clc
.9 rts
@ -359,63 +358,49 @@ Cmd.Exec.SETVAR tax
>LDYA L.ARGS String is "VAR"...
>SYSCALL SYS.UnsetEnvYA
rts
* Print requeted VAR
.3 >LDYA L.ARGS String is VAR...
>SYSCALL SYS.PStrOutYA
bcs .9
lda #'='
>SYSCALL SYS.COutA
bcs .9
>LDYA L.ARGS
.3 >LDYA L.ARGS
>SYSCALL SYS.GetEnvYA
bcs .8
>SYSCALL SYS.PStrOutYA Y,A = VALUE
>PUSHYA push value
>PUSHW L.ARGS push name
>LDYA L.MSG.PRINTENV
>SYSCALL SYS.PrintFYA
.8 lda #13
>SYSCALL SYS.COutA
.8 clc
.9 rts
*--------------------------------------
Cmd.Exec.DATE >LDYA L.TIME
Cmd.Exec.DATE sec
.HS 90 bcc
Cmd.Exec.TIME clc
php
>LDYA L.TIME
>SYSCALL SYS.TimeYA
>PUSHWI UsrBuf256
plp
bcc .1
>PUSHW L.FMT.DATE
>PUSHW L.TIME
>SYSCALL SYS.PStrFTime
>LDYAI UsrBuf256
>SYSCALL SYS.PStrOutYA
bcs .9
lda #13
>SYSCALL SYS.COutA
.9 rts
*--------------------------------------
Cmd.Exec.TIME >LDYA L.TIME
>SYSCALL SYS.TimeYA
bra .2
.1 >PUSHW L.FMT.TIME
>PUSHWI UsrBuf256
>PUSHW L.FMT.TIME
>PUSHW L.TIME
.2 >PUSHW L.TIME
>SYSCALL SYS.PStrFTime
>LDYAI UsrBuf256
>SYSCALL SYS.PStrOutYA
bcs .9
lda #13
>SYSCALL SYS.COutA
.9 rts
>PUSHWI UsrBuf256
>LDYA L.MSG.PSTR
>SYSCALL SYS.PrintFYA
rts
*--------------------------------------
Cmd.Exec.ECHO lda ARGS
beq .9
>LDYA L.ARGS
>SYSCALL SYS.PStrOutYA
lda #13
>SYSCALL SYS.COutA
>PUSHW L.ARGS
>LDYA L.MSG.PSTR
>SYSCALL SYS.PrintFYA
clc
rts

View File

@ -40,6 +40,8 @@ CS.START cld
L.MSG.GREETINGS .DA MSG.GREETINGS
L.MSG.ECHO .DA MSG.ECHO
L.MSG.ERROR .DA MSG.ERROR
L.MSG.PSTR .DA MSG.PSTR
L.MSG.PRINTENV .DA MSG.PRINTENV
L.ENV.PATH .DA ENV.PATH
L.CMD .DA CMD
L.ARGS .DA ARGS
@ -84,7 +86,7 @@ CS.INIT.INTERACTIVE
lda (pPs),y
>PUSHA
>LDYA L.MSG.GREETINGS
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
lda (pPs)
ora #S.PS.F.EVENT Now accept events
@ -334,7 +336,7 @@ PrintPrompt lda #'$'
PrintError pha
>PUSHA
>LDYA L.MSG.ERROR
>SYSCALL SYS.PStrOutYA
>SYSCALL SYS.PrintFYA
pla
rts
*--------------------------------------
@ -433,11 +435,14 @@ CMDS >PSTRING "CD"
>PSTRING "TYPE"
.HS 00
*--------------------------------------
MSG.GREETINGS >PSTRING "\nA2osX-Shell on Dev=%h\n\n"
MSG.GREETINGS >CSTRING "\nA2osX-Shell on Dev=%h\n\n"
MSG.ECHO >CSTRING ">%S\n"
MSG.ERROR >PSTRING "[%h]\n"
FMT.DATE >PSTRING "%a %A %b %B %Y/%m/%d"
MSG.ERROR >CSTRING "[%h]\n"
FMT.DATE >PSTRING "%A, %B %d %Y"
FMT.TIME >PSTRING "%H:%M:%S (%I:%M:%S%p)"
MSG.PSTR >CSTRING "%S\n"
MSG.PRINTENV >CSTRING "%S=%S\n"
*--------------------------------------
EscChars >PSTRING "DBAC"
EscAscii .HS 04080A0B15
CMD .BS 256

View File

@ -5,9 +5,102 @@ INC 1
AUTO 6
.LIST OFF
*--------------------------------------
*
*--------------------------------------
K.SScanF >PULLW ZPQuickPtr1 get PString to scan (ex: "192.168.1.5")
>PULLW ZPQuickPtr2 get PString pattern (ex: "%d.%d.%d.%d")
>PULLW ZPQuickPtr3 get target buffer
ldy #0 Y = PTR in pattern
lda (ZPQuickPtr1)
beq .9
tax X = COUNT to scan
inc ZPQuickPtr1
bne .1
inc ZPQuickPtr1+1
.1 txa End Of String?
beq .8
tya
cmp (ZPQuickPtr2) End of pattern?
beq .8
iny
lda (ZPQuickPtr2),y
cmp #'%' Escape?
beq .2
cmp (ZPQuickPtr1) Same char?
bne .9
jsr K.SScanF.IncPtr1
bne .1
clc
rts
.2 tya
cmp (ZPQuickPtr2) unexpected End of pattern after "%" ?
beq .9
iny
lda (ZPQuickPtr2),y
cmp #'d' BYTE ?
bne .3
stz ASCBUF
.20 lda (ZPQuickPtr1)
jsr K.SScanF.IsDigit
bcs .21
phx
inc ASCBUF
ldx ASCBUF
sta ASCBUF,x
plx
jsr K.SScanF.IncPtr1
bne .20 end of string ?
.21 jsr DEC2HEX
lda HEXBUF
sta (ZPQuickPtr3)
inc ZPQuickPtr3
bne .1
inc ZPQuickPtr3+1
bra .1
.3 cmp #'D' WORD ?
bne .4
bra .1
.4 cmp #'s' STRING ?
bne .9
bra .1
.8 clc
rts
.9 sec
rts
*--------------------------------------
K.SScanF.IncPtr1 dex
beq .1
inc ZPQuickPtr1
bne .1
inc ZPQuickPtr1+1 never Zero
.1 rts
*--------------------------------------
K.SScanF.IsDigit cmp #'0'
bcc .1
cmp #'9'+1
bcs .1
rts
.1 sec
rts
*--------------------------------------
* K.PrintFYA :
* Prints C-Style String
* Y,A = PTR to Sting,Last Byte negative
*--------------------------------------
* %a pull 2 bytes to Print Access right String drwxrwxrwx
* %b pull 1 byte to Print BIN
* %B pull 2 bytes to Print BIN
@ -187,14 +280,12 @@ PrintF.F >PULLW ZPQuickPtr2
rts
*--------------------------------------
PrintF.HH >PULLYA
K.HexOutYA
phy
jsr PrintF.H.1
pla
bra PrintF.H.1
*--------------------------------------
PrintF.H >PULLA
K.HexOutA
PrintF.H.1 pha
jsr PrintF.NN.1
pla
@ -510,207 +601,6 @@ SIGN .BS 1
PADLEN .BS 1
PADCHAR .BS 1
*--------------------------------------
* SUPERSEEDED by K.PrintFYA
*--------------------------------------
* Mini printf for PSTR
* %d : byte
* %D : word
* %h : hex byte
* %H : hex word
* %s : hSTR
* %S : PSTR
* \e : ESC
* \n : CR
*--------------------------------------
K.PStrOutYA >STYA ZPQuickPtr1
ldy #0
.1 jsr K.PStrOut.Next
bne .12
.8 clc
rts
.12 cmp #'\'
bne .2
jsr K.PStrOut.Next
beq .8
cmp #'e'
bne .11
lda #27
bra .6
.11 cmp #'n'
bne .6
lda #13
bra .6
.2 cmp #'%'
bne .6
jsr K.PStrOut.Next
beq .8
cmp #'d'
bne .3
phy
>PULLA
jsr K.DecOutA
ply
bcc .1
rts
.3 cmp #'D'
bne .4
phy
>PULLYA
jsr K.DecOutYA
ply
bcc .1
rts
.4 cmp #'h'
bne .5
phy
>PULLA
jsr K.HexOutA
ply
bcc .1
rts
.5 cmp #'H'
bne .51
phy
>PULLYA
jsr K.HexOutYA
ply
bcc .1
rts
.51 cmp #'s'
bne .52
jsr K.PStrOutYAS1
bcc .1
rts
.52 cmp #'S'
bne .53
jsr K.PStrOutYAS2
bcc .10
rts
.53 tax
lda #'%'
jsr K.COutA
bcs .9
txa
.6 jsr K.COutA
bcs .9
.10 jmp .1
.9 rts
*--------------------------------------
K.PStrOut.Next tya
eor (ZPQuickPtr1)
beq .8
iny
lda (ZPQuickPtr1),y
.8 rts
*--------------------------------------
K.PStrOutYAS1 phy
>PULLA
jsr K.GetMemPtrA
bra K.PStrOutYAS
K.PStrOutYAS2 phy
>PULLYA
K.PStrOutYAS >STYA ZPQuickPtr2
clc
lda (ZPQuickPtr2)
tax
beq .9
ldy #1
.1 lda (ZPQuickPtr2),y
jsr K.COutA
bcs .9
iny
dex
bne .1
.9 ply
rts
*--------------------------------------
K.DecOutA tay
lda #0
K.DecOutYA >STYA HEX
stz BCD
stz BCD+1
stz BCD+2
ldx #16 let's roll 16 bits
sed
.2 asl HEX
rol HEX+1
php cpy will disturb carry while BCD adc
ldy #0
.3 plp
lda BCD,y
adc BCD,y
sta BCD,y
php
iny
cpy #3 Last byte of BCDBUF?
bne .3
plp
dex
bne .2
cld
stz bL0Flag
ldx #2
.4 lda BCD,x
lsr
lsr
lsr
lsr
bne .5
bit bL0Flag
bpl .6
.5 sec
ror bL0Flag
ora #$30
jsr K.COutA
bcs .9
.6 lda BCD,x
and #$0F
bne .7
bit bL0Flag
bpl .8
.7 sec
ror bL0Flag
ora #$30
jsr K.COutA
bcs .9
.8 dex
bpl .4
bit bL0Flag
bmi .9
lda #$30
jsr K.COutA
.9 rts
*--------------------------------------
HEX .BS 2
BCD .BS 3
bL0Flag .BS 1
*--------------------------------------
MAN
SAVE SYS/KERNEL.S.CIO
LOAD SYS/KERNEL.S

View File

@ -50,8 +50,8 @@ KERNEL.SYSCALL
* Bank 2
*--------------------------------------
.DA K.COutA $40
.DA K.SScanF
.DA 0
.DA K.PStrOutYA
.DA K.PrintFYA
.DA 0
.DA 0

View File

@ -344,8 +344,12 @@ K.PStrFTime.STR lda (ZPQuickPtr1),y get required S.Time field value
bne .3
.8 rts
.9 lda #'?'
jmp K.PStrFTime.addChar
.9 ldx #3
lda #'?'
.99 jsr K.PStrFTime.addChar
dex
bne .99
rts
K.PStrFTime.D ldy #S.Time.DAY
bra K.PStrFTime.addDecPtr1Y