annotate lib/net.as @ 2802:58ca94b06908 lwtools-port

now built from defs files
author Boisy Pitre <boisy.pitre@nuance.com>
date Fri, 01 Feb 2013 19:26:44 -0600
parents 03f26e88b809
children 3b7b5021f8bc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2783
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
1 ********************************************************************
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
2 * net - network routines
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
3 *
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
4 * $Id$
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
5 *
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
6 * Edt/Rev YYYY/MM/DD Modified by
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
7 * Comment
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
8 * ------------------------------------------------------------------
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
9 * 1 2010/01/08 Boisy G. Pitre
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
10 * Started.
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
11
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
12 nam net.a
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
13 ttl network routines
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
14
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
15 section .bss
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
16 nbufferl equ 128
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
17 nbuffer rmb nbufferl
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
18 endsect
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
19
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
20 section .text
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
21
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
22 space fcb C$SPAC
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
23
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
24 devnam fcs "/N"
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
25
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
26
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
27 getopts leax nbuffer,u
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
28 ldb #SS.Opt
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
29 os9 I$GetStt
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
30 rts
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
31
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
32 setopts leax nbuffer,u
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
33 ldb #SS.Opt
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
34 os9 I$SetStt
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
35 rts
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
36
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
37 * Set Echo On
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
38 *
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
39 * Entry: A = path to network device
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
40 * Exit:
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
41 * Success: CC carry clear
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
42 * Failure: CC carry set, B = error code
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
43 SetEchoOn: pshs a,x
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
44 bsr getopts
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
45 bcs rawex
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
46 ldb #1
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
47 stb PD.EKO-PD.OPT,x
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
48 bsr setopts
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
49 puls a,x,pc
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
50
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
51
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
52 * Set Echo Off
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
53 *
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
54 * Entry: A = path to network device
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
55 * Exit:
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
56 * Success: CC carry clear
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
57 * Failure: CC carry set, B = error code
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
58 SetEchoOff: pshs a,x
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
59 bsr getopts
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
60 bcs rawex
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
61 clr PD.EKO-PD.OPT,x
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
62 bsr setopts
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
63 puls a,x,pc
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
64
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
65
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
66 * Set Auto Linefeed On
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
67 *
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
68 * Entry: A = path to network device
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
69 * Exit:
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
70 * Success: CC carry clear
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
71 * Failure: CC carry set, B = error code
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
72 SetAutoLFOn: pshs a,x
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
73 bsr getopts
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
74 bcs rawex
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
75 ldb #1
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
76 stb PD.ALF-PD.OPT,x
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
77 bsr setopts
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
78 puls a,x,pc
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
79
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
80
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
81 * Set Auto Linefeed Off
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
82 *
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
83 * Entry: A = path to network device
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
84 * Exit:
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
85 * Success: CC carry clear
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
86 * Failure: CC carry set, B = error code
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
87 SetAutoLFOff: pshs a,x
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
88 bsr getopts
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
89 bcs rawex
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
90 clr PD.ALF-PD.OPT,x
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
91 bsr setopts
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
92 puls a,x,pc
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
93
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
94
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
95 * Put the path passed in A in raw mode
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
96 *
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
97 * Entry: A = path to network device
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
98 *
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
99 * Exit:
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
100 * Success: CC carry clear
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
101 * Failure: CC carry set, B = error code
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
102 RawPath: pshs a,x
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
103 bsr getopts
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
104 bcs rawex
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
105 leax PD.UPC-PD.OPT,x
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
106 ldb #PD.QUT-PD.UPC
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
107 rawloop clr ,x+
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
108 decb
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
109 bpl rawloop
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
110 bsr setopts
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
111 rawex puls a,x,pc
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
112
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
113
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
114 * Attempts to open and setup a path to the TCP server
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
115 *
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
116 * Exit:
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
117 * Success: A = path to network device, CC carry clear
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
118 * Failure: B = error code, CC carry set
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
119 TCPOpen: pshs x,y
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
120 lda #UPDAT.
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
121 leax devnam,pcr
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
122 os9 I$Open
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
123 bcs openerr
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
124 bsr SetEchoOff
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
125 bsr SetAutoLFOff
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
126 openerr
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
127 puls x,y,pc
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
128
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
129
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
130 * Informs the server that we are killing a session
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
131 *
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
132 * Entry: A = path to network device
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
133 * Y = pointer to token string (nul terminated)
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
134 *
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
135 * Exit:
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
136 * Success: CC carry clear
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
137 * Failure: CC carry set, B = error code
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
138 TCPKill: pshs a,x,y
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
139 leax tcpkill,pcr
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
140 ldy #tcpkilll
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
141 os9 I$Write
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
142 lbcs connectex
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
143 bra writeport
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
144
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
145 * Informs the server that we are joining a session
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
146 *
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
147 * Entry: A = path to network device
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
148 * Y = pointer to token string (nul terminated)
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
149 *
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
150 * Exit:
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
151 * Success: CC carry clear
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
152 * Failure: CC carry set, B = error code
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
153 TCPJoin: pshs a,x,y
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
154 leax tcpjoin,pcr
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
155 ldy #tcpjoinl
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
156 os9 I$Write
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
157 lbcs connectex
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
158 bra writeport
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
159
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
160 * Attempts to connect to a TCP/IP host via the server
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
161 *
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
162 * Entry: A = path to network device
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
163 * X = pointer to host name string (nul terminated)
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
164 * Y = pointer to port string (nul terminated)
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
165 *
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
166 * Exit:
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
167 * Success: CC carry clear
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
168 * Failure: CC carry set, B = error code
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
169 TCPConnectToHost:
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
170 pshs a,x,y
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
171 leax tcpconnect,pcr
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
172 ldy #tcpconnectl
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
173 os9 I$Write
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
174 bcs connectex
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
175 ldx 1,s
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
176 lbsr STRLEN
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
177 tfr d,y
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
178 lda ,s
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
179 os9 I$Write
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
180 * write space
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
181 leax space,pcr
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
182 ldy #1
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
183 os9 I$Write
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
184 * write port (we worry about response later)
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
185 writeport ldx 3,s get original Y on stack
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
186 pshs a
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
187 lbsr STRLEN
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
188 tfr d,y
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
189 puls a
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
190 os9 I$Write
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
191 leax acr,pcr
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
192 ldy #1
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
193 os9 I$WritLn
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
194
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
195 * read response from server
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
196 * Entry: A = path
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
197 readresponse
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
198 leax nbuffer,u
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
199 ldy #nbufferl
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
200 os9 I$ReadLn
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
201 bcs connectex
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
202 lda ,x
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
203 cmpa #'F
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
204 bne connectex
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
205 * failure case: read number and return it with carry set
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
206 leax 5,x skip over "FAIL "
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
207 lbsr DEC_BIN error will fit in B
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
208 coma set carry
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
209 connectex puls a,x,y,pc
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
210
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
211 acr fcb C$CR
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
212
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
213 * Requests to listen on a port
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
214 *
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
215 * Entry: A = path to network device
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
216 * X = pointer to parameter string (nul terminated)
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
217 *
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
218 * Exit:
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
219 * Success: CC carry clear
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
220 * Failure: CC carry set, B = error code
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
221 TCPListen: pshs a,x,y
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
222 leax tcplisten,pcr
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
223 ldy #tcplistenl
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
224 os9 I$Write
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
225 bcs connectex
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
226 ldx 1,s
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
227 lbsr STRLEN
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
228 tfr d,y
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
229 lda ,s
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
230 os9 I$Write
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
231 leax acr,pcr
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
232 ldy #1
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
233 os9 I$WritLn
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
234 bra readresponse
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
235
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
236 * Disconnects the TCP/IP host via the server
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
237 *
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
238 * Entry: A = path to network device
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
239 *
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
240 * Exit:
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
241 * Success: CC carry clear
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
242 * Failure: B = error code, CC carry set
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
243 TCPDisconnect: os9 I$Close
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
244 rts
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
245
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
246 tcpconnect fcc 'tcp connect '
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
247 tcpconnectl equ *-tcpconnect
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
248
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
249 tcplisten fcc 'tcp listen '
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
250 tcplistenl equ *-tcplisten
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
251
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
252 tcpjoin fcc 'tcp join '
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
253 tcpjoinl equ *-tcpjoin
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
254
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
255 tcpkill fcc 'tcp kill '
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
256 tcpkilll equ *-tcpkill
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
257
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
258 endsect