A2osX/LIB/LIBETALK.S.txt

174 lines
3.8 KiB
Plaintext
Raw Normal View History

2019-01-05 20:33:08 +00:00
NEW
2019-05-27 06:01:59 +00:00
AUTO 3,1
2019-01-05 20:33:08 +00:00
.LIST OFF
.OP 65C02
.OR $2000
2019-12-03 15:42:17 +00:00
.TF lib/libetalk
2019-01-05 20:33:08 +00:00
*--------------------------------------
2021-05-19 12:44:47 +00:00
.INB inc/macros.i
.INB inc/a2osx.i
.INB inc/nic.i
.INB inc/eth.i
.INB inc/lib.net.i
.INB inc/libetalk.i
2019-01-05 20:33:08 +00:00
*--------------------------------------
ZPFrameInPtr .EQ ZPLIB
ZPFrameInLen .EQ ZPLIB+2
ZPDataInPtr .EQ ZPLIB+4
ZPDataInLen .EQ ZPLIB+6
ZPFrameOutPtr .EQ ZPLIB+8
ZPFrameOutLen .EQ ZPLIB+10
ZPDataOutPtr .EQ ZPLIB+12
ZPDataOutLen .EQ ZPLIB+14
2019-03-11 07:01:40 +00:00
ZPPtrADDR .EQ ZPLIB+16
ZPPtrMAC .EQ ZPLIB+18
ZPCachePtr .EQ ZPLIB+24
ZPTmpPtr1 .EQ ZPLIB+26
2019-01-05 20:33:08 +00:00
*--------------------------------------
* 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
.DA 0
.DA 0
.DA 0
*--------------------------------------
* Relocation Table
*--------------------------------------
.1 .DA LIB.LOAD
.DA LIB.UNLOAD
2019-01-14 16:37:56 +00:00
.DA CFG.SET
.DA CFG.GET
2019-01-05 20:33:08 +00:00
.DA INCOMING
.DA PULSE
2019-03-11 07:01:40 +00:00
.DA AARP.CLEAR
.DA AARP.QUERY
.DA AARP.ADD
.DA AARP.GetCACHE
L.IOCTL .DA IOCTL
L.AARP.REQ .DA AARP.REQ
L.AARP.REP .DA AARP.REP
L.AARP.CACHE .DA AARP.CACHE
2019-01-05 20:33:08 +00:00
*--------------------------------------
2019-01-14 16:37:56 +00:00
L.ETKCFG .DA ETKCFG
2019-01-05 20:33:08 +00:00
.DA 0
*--------------------------------------
2019-03-11 07:01:40 +00:00
LIB.LOAD ldx RefCount
bne .8
jsr AARP.CLEAR
.8 inc RefCount
2019-01-14 16:37:56 +00:00
clc
rts
2019-01-05 20:33:08 +00:00
*--------------------------------------
2019-03-11 07:01:40 +00:00
LIB.UNLOAD dec RefCount
2019-01-14 07:11:50 +00:00
clc
rts
2019-01-05 20:33:08 +00:00
*--------------------------------------
INCOMING sta hFrameIn
2019-03-11 07:01:40 +00:00
>PULLW ZPTmpPtr1
2019-01-05 20:33:08 +00:00
ldy #S.IOCTL.BUFPTR+3
2019-03-11 07:01:40 +00:00
.1 lda (ZPTmpPtr1),y Get Frame Ptr & Len
2019-01-14 16:37:56 +00:00
sta ZPFrameInPtr-S.IOCTL.BUFPTR,y
2019-01-05 20:33:08 +00:00
dey
bpl .1
2019-03-11 07:01:40 +00:00
ldy #S.ETH.SNAP.PROTO
lda (ZPFrameInPtr),y
tax
iny
2019-10-03 06:25:27 +00:00
lda (ZPFrameInPtr),y
2019-03-11 07:01:40 +00:00
cmp #S.ETH.SNAP.PROTO.AARP
bne .2
cpx /S.ETH.SNAP.PROTO.AARP
bne .2
jmp AARP.IN
.2 cmp #S.ETH.SNAP.PROTO.DDP
bne .9
cpx /S.ETH.SNAP.PROTO.DDP
bne .9
jmp DDP.IN
.9 sec
2019-01-05 20:33:08 +00:00
rts
*--------------------------------------
2019-01-14 16:37:56 +00:00
*--------------------------------------
* A = S.EVT.F
2019-01-05 20:33:08 +00:00
*--------------------------------------
PULSE and #S.EVT.F.T1SEC
2019-01-14 16:37:56 +00:00
beq .9
2019-01-05 20:33:08 +00:00
2019-01-14 16:37:56 +00:00
.9 rts
2019-03-11 07:01:40 +00:00
*--------------------------------------
2021-05-19 12:44:47 +00:00
.INB usr/src/lib/libetalk.s.aarp
.INB usr/src/lib/libetalk.s.cfg
.INB usr/src/lib/libetalk.s.ddp
.INB usr/src/lib/libetalk.s.elap
.INB usr/src/lib/libetalk.s.frm
.INB usr/src/lib/libetalk.s.rtmp
2019-01-05 20:33:08 +00:00
*--------------------------------------
CS.END
*--------------------------------------
2019-03-11 07:01:40 +00:00
AARP.REQ .HS 090007FFFFFF S.ETH.DSTMAC
AARP.REQ.SRCMAC .BS 6
.DA #0,#36 S.ETH.802.3.LENGTH
.HS AA S.ETH.802.2.DSTSAP
.HS AA S.ETH.802.2.SRCSAP
.HS 03 S.ETH.802.2.CTRL
.HS 00.00.00.80.F3 S.ETH.SNAP.PROTO
.HS 00.01.80.9B.06.04
.HS 0001 Request
AARP.REQ.SHA .BS 6
AARP.REQ.SPA .BS 4
AARP.REQ.THA .BS 6
AARP.REQ.TPA .BS 4
.BS AARP.REQ+60-*
AARP.REQ.LEN .EQ 60
*--------------------------------------
AARP.REP .EQ *
AARP.REP.DSTMAC .BS 6
AARP.REP.SRCMAC .BS 6
.DA #0,#36 S.ETH.802.3.LENGTH
.HS AA S.ETH.802.2.DSTSAP
.HS AA S.ETH.802.2.SRCSAP
.HS 03 S.ETH.802.2.CTRL
.HS 00.00.00.80.F3 S.ETH.SNAP.PROTO
.HS 00.01.80.9B.06.04
.HS 0002 Response
AARP.REP.SHA .BS 6
AARP.REP.SPA .BS 4
AARP.REP.THA .BS 6
AARP.REP.TPA .BS 4
.BS AARP.REP+60-*
AARP.REP.LEN .EQ 60
*--------------------------------------
RefCount .BS 1
IOCTL .BS S.IOCTL
2019-01-05 20:33:08 +00:00
hFrameIn .BS 1
2019-01-14 16:37:56 +00:00
ETKCFG .BS S.ETKCFG
2019-03-11 07:01:40 +00:00
AARP.CACHE .BS K.AARPCACHE.SIZE*S.AARPCACHE
AARP.TmpCache .BS S.AARPCACHE
TmpDWord .BS 4
TmpOffset .BS 2
2019-01-05 20:33:08 +00:00
*--------------------------------------
MAN
2021-05-19 12:44:47 +00:00
SAVE usr/src/lib/libetalk.s
2019-01-05 20:33:08 +00:00
ASM