mirror of
https://github.com/A2osX/A2osX.git
synced 2025-01-10 18:34:45 +00:00
Kernel 0.93
This commit is contained in:
parent
10386ff979
commit
61f29a1075
@ -1,6 +1,5 @@
|
|||||||
NEW
|
NEW
|
||||||
PREFIX
|
AUTO 3,1 Enable MASM3 auto line num
|
||||||
AUTO 4,1 Enable MASM3 auto line num
|
|
||||||
.LIST OFF
|
.LIST OFF
|
||||||
.OP 65C02 Target CPU, must = CPU header level
|
.OP 65C02 Target CPU, must = CPU header level
|
||||||
.OR $2000 usualy $2000, any value > $100 ok
|
.OR $2000 usualy $2000, any value > $100 ok
|
||||||
@ -27,7 +26,7 @@ CS.START cld
|
|||||||
.DA #0
|
.DA #0
|
||||||
.DA CS.END-CS.START Code Size (without Constants)
|
.DA CS.END-CS.START Code Size (without Constants)
|
||||||
.DA DS.END-DS.START Data SegmentSize
|
.DA DS.END-DS.START Data SegmentSize
|
||||||
.DA #16 Stack Size
|
.DA #64 Stack Size
|
||||||
.DA #ZS.END-ZS.START Zero Page Size
|
.DA #ZS.END-ZS.START Zero Page Size
|
||||||
.DA 0
|
.DA 0
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
@ -26,7 +26,7 @@ CS.START cld
|
|||||||
.DA #0
|
.DA #0
|
||||||
.DA CS.END-CS.START Code Size (without Constants)
|
.DA CS.END-CS.START Code Size (without Constants)
|
||||||
.DA DS.END-DS.START Data SegmentSize
|
.DA DS.END-DS.START Data SegmentSize
|
||||||
.DA #16 Stack Size
|
.DA #64 Stack Size
|
||||||
.DA #ZS.END-ZS.START Zero Page Size
|
.DA #ZS.END-ZS.START Zero Page Size
|
||||||
.DA 0
|
.DA 0
|
||||||
*---------------------------------------
|
*---------------------------------------
|
||||||
@ -49,7 +49,7 @@ CS.INIT clc
|
|||||||
rts
|
rts
|
||||||
*---------------------------------------
|
*---------------------------------------
|
||||||
* Called until exit with CS
|
* Called until exit with CS
|
||||||
* if RUN exits with CC, RN entered again
|
* if RUN exits with CC, RUN entered again
|
||||||
*---------------------------------------
|
*---------------------------------------
|
||||||
CS.RUN
|
CS.RUN
|
||||||
|
|
||||||
|
137
SBIN/CIFSD.S.txt
Normal file
137
SBIN/CIFSD.S.txt
Normal file
@ -0,0 +1,137 @@
|
|||||||
|
NEW
|
||||||
|
AUTO 3,1 Enable MASM3 auto line num
|
||||||
|
.LIST OFF
|
||||||
|
.OP 65C02 Target CPU, must match CPU level in header
|
||||||
|
.OR $2000 usualy $2000, but any value > $100 allowed
|
||||||
|
.TF SBIN/CIFSD
|
||||||
|
*--------------------------------------
|
||||||
|
.INB INC/MACROS.I
|
||||||
|
.INB INC/A2OSX.I
|
||||||
|
*--------------------------------------
|
||||||
|
* Zero Page Segment, up to 32 bytes
|
||||||
|
*--------------------------------------
|
||||||
|
.DUMMY
|
||||||
|
.OR ZPBIN
|
||||||
|
ZS.START
|
||||||
|
ZPIPCfgPtr .BS 2
|
||||||
|
ZS.END
|
||||||
|
.ED
|
||||||
|
*--------------------------------------
|
||||||
|
* File Header (16 Bytes)
|
||||||
|
*--------------------------------------
|
||||||
|
CS.START cld
|
||||||
|
jmp (.1,x)
|
||||||
|
.DA #$61 6502,Level 1 (65c02)
|
||||||
|
.DA #1 BIN Layout Version 1
|
||||||
|
.DA #0 S.PS.F.EVENT
|
||||||
|
.DA #0
|
||||||
|
.DA CS.END-CS.START Code Size (without Constants)
|
||||||
|
.DA DS.END-DS.START Data SegmentSize
|
||||||
|
.DA #64 Stack Size
|
||||||
|
.DA #ZS.END-ZS.START Zero Page Size
|
||||||
|
.DA 0
|
||||||
|
*--------------------------------------
|
||||||
|
* Relocation Table
|
||||||
|
*--------------------------------------
|
||||||
|
.1 .DA CS.INIT
|
||||||
|
.DA CS.RUN
|
||||||
|
.DA CS.DOEVENT
|
||||||
|
.DA CS.QUIT
|
||||||
|
L.MSG.USAGE .DA MSG.USAGE
|
||||||
|
.DA 0
|
||||||
|
*--------------------------------------
|
||||||
|
* Called once at process creation
|
||||||
|
* Put code for loading LIB here
|
||||||
|
*--------------------------------------
|
||||||
|
CS.INIT >LDYA L.LIBTCPIP
|
||||||
|
>SYSCALL LoadLib
|
||||||
|
bcs .99
|
||||||
|
sta hLIBTCPIP
|
||||||
|
|
||||||
|
>LIBCALL hLIBTCPIP,LIBTCPIP.GETCFG is TCPIP loaded ?
|
||||||
|
bcs .99
|
||||||
|
>STYA ZPIPCfgPtr
|
||||||
|
|
||||||
|
lda (ZPIPCfgPtr) Configured ?
|
||||||
|
bmi .8
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
lda #E.SYN
|
||||||
|
sec
|
||||||
|
rts
|
||||||
|
|
||||||
|
.8 clc
|
||||||
|
.99 rts
|
||||||
|
*--------------------------------------
|
||||||
|
* Called until exit with CS
|
||||||
|
* if RUN exits with CC, RUN entered again
|
||||||
|
*--------------------------------------
|
||||||
|
CS.RUN jsr CS.RUN.CheckArgs
|
||||||
|
bcs .90
|
||||||
|
|
||||||
|
lda #0
|
||||||
|
sec
|
||||||
|
rts
|
||||||
|
|
||||||
|
.90 >LDYA L.MSG.USAGE
|
||||||
|
>SYSCALL puts
|
||||||
|
lda #E.SYN
|
||||||
|
sec
|
||||||
|
rts
|
||||||
|
*--------------------------------------
|
||||||
|
CS.RUN.CheckArgs
|
||||||
|
ldy #S.PS.ARGC
|
||||||
|
lda (pPs),y
|
||||||
|
cmp #3
|
||||||
|
bcc .9
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.9 sec
|
||||||
|
rts
|
||||||
|
*--------------------------------------
|
||||||
|
* Called if option S.PS.F.EVENT enabled in Header
|
||||||
|
* Timer Event : every 10th seconds
|
||||||
|
*--------------------------------------
|
||||||
|
CS.DOEVENT sec
|
||||||
|
rts
|
||||||
|
*--------------------------------------
|
||||||
|
* Called once, when RUN exited with CS
|
||||||
|
* Put code for unloading LIB here
|
||||||
|
*--------------------------------------
|
||||||
|
CS.QUIT lda hLIBTCPIP
|
||||||
|
beq .8
|
||||||
|
>SYSCALL UnloadLib
|
||||||
|
|
||||||
|
.8 clc
|
||||||
|
rts
|
||||||
|
*--------------------------------------
|
||||||
|
CS.END
|
||||||
|
*--------------------------------------
|
||||||
|
* Initialized DATA
|
||||||
|
*--------------------------------------
|
||||||
|
MSG.USAGE .AZ "Usage : CIFSD <ip|host> sharename mountpoint"
|
||||||
|
hLIBTCPIP .BS 1
|
||||||
|
*--------------------------------------
|
||||||
|
* Per Process DATA segement (0 filled before INIT)
|
||||||
|
*--------------------------------------
|
||||||
|
.DUMMY
|
||||||
|
.OR 0
|
||||||
|
DS.START
|
||||||
|
SA.LOCAL .DA #AF.INET S.SOCKADDR.AF
|
||||||
|
.BS 1
|
||||||
|
.BS 4 S.SOCKADDR.ADDR
|
||||||
|
.BS 2 S.SOCKADDR.PORT
|
||||||
|
SA.REMOTE .DA #AF.INET S.SOCKADDR.AF
|
||||||
|
.BS 1
|
||||||
|
.BS 4 S.SOCKADDR.ADDR
|
||||||
|
.DA 445
|
||||||
|
DS.END
|
||||||
|
.ED
|
||||||
|
*--------------------------------------
|
||||||
|
MAN
|
||||||
|
SAVE USR/SRC/SBIN/CIFSD
|
||||||
|
ASM
|
@ -1,6 +1,5 @@
|
|||||||
NEW
|
NEW
|
||||||
PREFIX
|
AUTO 4,1
|
||||||
AUTO 4,1
|
|
||||||
.LIST OFF
|
.LIST OFF
|
||||||
.OP 65C02
|
.OP 65C02
|
||||||
.OR $2000
|
.OR $2000
|
||||||
|
Loading…
x
Reference in New Issue
Block a user