A2osX/SBIN/TELNETD.S.txt

83 lines
1.7 KiB
Plaintext
Raw Normal View History

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 /A2OSX.DEV/INC/MACROS.I
.INB /A2OSX.DEV/INC/A2OSX.I
.INB /A2OSX.DEV/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
>SYSCALL LoadLibYA
2015-10-19 20:35:00 +00:00
bcs .99
sta hLIBTCPIP
>PUSHWI S.IP.PROTOCOL.TCP
>PUSHWI TCP.PORT.TELNET
>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
*--------------------------------------
CS.RUN >PUSHB hSrvSocket
>LIBCALL hLIBTCPIP,LIBTCPIP.SrvSocketAccept
2015-10-19 20:35:00 +00:00
bcs .8
.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
>LIBCALL hLIBTCPIP,LIBTCPIP.CloseSocket
2015-10-19 20:35:00 +00:00
lda hLIBTCPIP
>SYSCALL UnloadLibA
2015-10-19 20:35:00 +00:00
clc
2015-03-14 21:48:35 +00:00
rts
*--------------------------------------
CS.END
2015-10-19 20:35:00 +00:00
*--------------------------------------
LIBTCPIP >PSTR "libtcpip.o"
2015-10-19 20:35:00 +00:00
hLIBTCPIP .BS 1
hSrvSocket .BS 1
*--------------------------------------
2015-03-14 21:48:35 +00:00
MAN
SAVE SBIN/TELNETD.S
ASM