mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-26 13:49:18 +00:00
109 lines
2.2 KiB
Plaintext
109 lines
2.2 KiB
Plaintext
NEW
|
||
PREFIX
|
||
AUTO 4,1
|
||
.LIST OFF
|
||
.OP 65C02
|
||
.OR $2000
|
||
.TF LIB/LIBETALK
|
||
*--------------------------------------
|
||
.INB INC/MACROS.I
|
||
.INB INC/A2OSX.I
|
||
.INB INC/NIC.I
|
||
.INB INC/ETH.I
|
||
.INB INC/LIBETALK.I
|
||
*--------------------------------------
|
||
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
|
||
|
||
ZPIOCTL .EQ ZPLIB+16
|
||
ZPTmpPtr1 .EQ ZPLIB+18
|
||
*--------------------------------------
|
||
* 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
|
||
|
||
.DA CFG.SET
|
||
.DA CFG.GET
|
||
|
||
.DA INCOMING
|
||
.DA PULSE
|
||
*--------------------------------------
|
||
L.ETKCFG .DA ETKCFG
|
||
.DA 0
|
||
*--------------------------------------
|
||
LIB.LOAD
|
||
*--------------------------------------
|
||
LIB.UNLOAD
|
||
|
||
clc
|
||
rts
|
||
*--------------------------------------
|
||
CFG.SET >PULLW ZPTmpPtr1 IPCFG
|
||
|
||
ldy #0
|
||
|
||
.1 lda (ZPTmpPtr1),y
|
||
sta ETKCFG,y
|
||
iny
|
||
cpy #S.ETKCFG
|
||
bne .1
|
||
|
||
clc
|
||
rts
|
||
*--------------------------------------
|
||
CFG.GET >LDYA L.ETKCFG
|
||
clc
|
||
rts
|
||
*--------------------------------------
|
||
INCOMING sta hFrameIn
|
||
>PULLW ZPIOCTL
|
||
|
||
ldy #S.IOCTL.BUFPTR+3
|
||
|
||
.1 lda (ZPIOCTL),y Get Frame Ptr & Len
|
||
sta ZPFrameInPtr-S.IOCTL.BUFPTR,y
|
||
dey
|
||
bpl .1
|
||
|
||
sec
|
||
rts
|
||
*--------------------------------------
|
||
*--------------------------------------
|
||
* A = S.EVT.F
|
||
*--------------------------------------
|
||
PULSE and #S.EVT.F.T1SEC
|
||
beq .9
|
||
|
||
.9 rts
|
||
*--------------------------------------
|
||
CS.END
|
||
*--------------------------------------
|
||
hFrameIn .BS 1
|
||
ETKCFG .BS S.ETKCFG
|
||
*--------------------------------------
|
||
MAN
|
||
SAVE USR/SRC/LIB/LIBETALK.S
|
||
ASM
|