2015-03-14 21:48:35 +00:00
|
|
|
|
PR#3
|
2015-06-03 18:30:57 +00:00
|
|
|
|
PREFIX /A2OSX.SRC
|
2015-03-14 21:48:35 +00:00
|
|
|
|
NEW
|
|
|
|
|
INC 1
|
|
|
|
|
AUTO 6
|
|
|
|
|
.LIST OFF
|
|
|
|
|
.OP 65C02
|
|
|
|
|
.OR $2000
|
2015-10-19 20:35:00 +00:00
|
|
|
|
.TF /A2OSX.BOOT/SBIN/TELNETD
|
2015-03-14 21:48:35 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
.INB INC/MACROS.I
|
|
|
|
|
.INB INC/A2OSX.I
|
2015-10-19 20:35:00 +00:00
|
|
|
|
.INB INC/LIBTCPIP.I
|
2015-03-14 21:48:35 +00:00
|
|
|
|
*--------------------------------------
|
2015-10-19 20:35:00 +00:00
|
|
|
|
* File Header (16 Bytes)
|
2015-03-14 21:48:35 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.START cld
|
|
|
|
|
jmp (.1,x)
|
2015-10-19 20:35:00 +00:00
|
|
|
|
.DA #$61 6502,Level 1 (65c02)
|
|
|
|
|
.DA #1 BIN Layout Version 1
|
|
|
|
|
.DA 0
|
|
|
|
|
.DA CS.END-CS.START Code Length To Relocate
|
|
|
|
|
.DA 0
|
|
|
|
|
.DA 0
|
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Relocation Table
|
|
|
|
|
*--------------------------------------
|
2015-03-14 21:48:35 +00:00
|
|
|
|
.1 .DA CS.INIT
|
|
|
|
|
.DA CS.RUN
|
2015-10-19 20:35:00 +00:00
|
|
|
|
.DA CS.DOEVENT
|
2015-03-14 21:48:35 +00:00
|
|
|
|
.DA CS.QUIT
|
2015-10-19 20:35:00 +00:00
|
|
|
|
L.LIBTCPIP .DA LIBTCPIP
|
|
|
|
|
.DA 0
|
2015-03-14 21:48:35 +00:00
|
|
|
|
*--------------------------------------
|
2015-10-19 20:35:00 +00:00
|
|
|
|
CS.INIT >LDYA L.LIBTCPIP
|
2015-11-22 22:30:06 +00:00
|
|
|
|
>SYSCALL SYS.LoadLibYA
|
2015-10-19 20:35:00 +00:00
|
|
|
|
bcs .99
|
|
|
|
|
|
|
|
|
|
sta hLIBTCPIP
|
|
|
|
|
|
|
|
|
|
>PUSHWI S.IP.PROTOCOL.TCP
|
|
|
|
|
>PUSHWI TCP.PORT.TELNETS
|
2016-01-16 22:05:07 +00:00
|
|
|
|
>LIBCALL hLIBTCPIP,LIBTCPIP.NewSrvSocket
|
2015-10-19 20:35:00 +00:00
|
|
|
|
bcs .99
|
|
|
|
|
sta hSrvSocket
|
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
.99 rts
|
2015-03-14 21:48:35 +00:00
|
|
|
|
*--------------------------------------
|
2016-01-16 22:05:07 +00:00
|
|
|
|
CS.RUN >PUSHB hSrvSocket
|
|
|
|
|
>LIBCALL hLIBTCPIP,LIBTCPIP.SrvSocketAccept
|
2015-10-19 20:35:00 +00:00
|
|
|
|
bcs .8
|
|
|
|
|
|
|
|
|
|
>LIBCALL hLIBTCPIP,LIBTCPIP.CreateDevice
|
|
|
|
|
bcs *
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.8 clc
|
2015-03-14 21:48:35 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2015-10-19 20:35:00 +00:00
|
|
|
|
CS.DOEVENT clc
|
2015-03-14 21:48:35 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2015-10-19 20:35:00 +00:00
|
|
|
|
CS.QUIT >PUSHB hSrvSocket
|
2016-01-16 22:05:07 +00:00
|
|
|
|
>LIBCALL hLIBTCPIP,LIBTCPIP.CloseSocket
|
2015-10-19 20:35:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lda hLIBTCPIP
|
|
|
|
|
>SYSCALL SYS.UnloadLibA
|
|
|
|
|
clc
|
2015-03-14 21:48:35 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.END
|
2015-10-19 20:35:00 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
LIBTCPIP >PSTRING "libtcpip.o"
|
|
|
|
|
hLIBTCPIP .BS 1
|
|
|
|
|
hSrvSocket .BS 1
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
|
2015-03-14 21:48:35 +00:00
|
|
|
|
MAN
|
|
|
|
|
SAVE SBIN/TELNETD.S
|
|
|
|
|
ASM
|