annotate lib/net.as @ 2807:3b7b5021f8bc lwtools-port

Cosmetic
author Boisy Pitre <boisy.pitre@nuance.com>
date Fri, 01 Feb 2013 21:34:07 -0600
parents 03f26e88b809
children
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
2807
3b7b5021f8bc Cosmetic
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2783
diff changeset
12 section bss
2783
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
13 nbufferl equ 128
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
14 nbuffer rmb nbufferl
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
15 endsect
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
16
2807
3b7b5021f8bc Cosmetic
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2783
diff changeset
17 section code
2783
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
18
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
19 space fcb C$SPAC
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
20 devnam fcs "/N"
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 getopts leax nbuffer,u
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
23 ldb #SS.Opt
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
24 os9 I$GetStt
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
25 rts
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 setopts 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$SetStt
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 * Set Echo On
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
33 *
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
34 * Entry: A = path to network device
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
35 * Exit:
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
36 * Success: CC carry clear
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
37 * 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
38 SetEchoOn: pshs a,x
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
39 bsr getopts
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
40 bcs rawex
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
41 ldb #1
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
42 stb PD.EKO-PD.OPT,x
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
43 bsr setopts
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
44 puls a,x,pc
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
45
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
46
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
47 * Set Echo Off
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
48 *
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
49 * Entry: A = path to network device
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
50 * Exit:
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
51 * Success: CC carry clear
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
52 * 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
53 SetEchoOff: pshs a,x
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
54 bsr getopts
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
55 bcs rawex
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
56 clr PD.EKO-PD.OPT,x
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
57 bsr setopts
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
58 puls a,x,pc
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
59
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
60
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
61 * Set Auto Linefeed On
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
62 *
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
63 * Entry: A = path to network device
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
64 * Exit:
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
65 * Success: CC carry clear
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
66 * 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
67 SetAutoLFOn: pshs a,x
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
68 bsr getopts
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
69 bcs rawex
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
70 ldb #1
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
71 stb PD.ALF-PD.OPT,x
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
72 bsr setopts
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
73 puls a,x,pc
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
74
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
75
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
76 * Set Auto Linefeed Off
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
77 *
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
78 * Entry: A = path to network device
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
79 * Exit:
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
80 * Success: CC carry clear
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
81 * 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
82 SetAutoLFOff: pshs a,x
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
83 bsr getopts
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
84 bcs rawex
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
85 clr PD.ALF-PD.OPT,x
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
86 bsr setopts
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
87 puls a,x,pc
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
88
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
89
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
90 * 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
91 *
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
92 * Entry: A = path to network device
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 * Exit:
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
95 * Success: CC carry clear
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
96 * 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
97 RawPath: pshs a,x
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
98 bsr getopts
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
99 bcs rawex
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
100 leax PD.UPC-PD.OPT,x
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
101 ldb #PD.QUT-PD.UPC
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
102 rawloop clr ,x+
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
103 decb
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
104 bpl rawloop
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
105 bsr setopts
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
106 rawex puls a,x,pc
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
107
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
108
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
109 * 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
110 *
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
111 * Exit:
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
112 * 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
113 * 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
114 TCPOpen: pshs x,y
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
115 lda #UPDAT.
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
116 leax devnam,pcr
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
117 os9 I$Open
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
118 bcs openerr
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
119 bsr SetEchoOff
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
120 bsr SetAutoLFOff
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
121 openerr
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
122 puls x,y,pc
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
123
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
124
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
125 * 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
126 *
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
127 * Entry: A = path to network device
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
128 * 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
129 *
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
130 * Exit:
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
131 * Success: CC carry clear
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
132 * 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
133 TCPKill: pshs a,x,y
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
134 leax tcpkill,pcr
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
135 ldy #tcpkilll
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
136 os9 I$Write
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
137 lbcs connectex
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
138 bra writeport
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
139
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
140 * 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
141 *
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
142 * Entry: A = path to network device
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
143 * 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
144 *
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
145 * Exit:
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
146 * Success: CC carry clear
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
147 * 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
148 TCPJoin: pshs a,x,y
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
149 leax tcpjoin,pcr
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
150 ldy #tcpjoinl
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
151 os9 I$Write
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
152 lbcs connectex
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
153 bra writeport
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
154
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
155 * 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
156 *
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
157 * Entry: A = path to network device
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
158 * 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
159 * 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
160 *
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
161 * Exit:
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
162 * Success: CC carry clear
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
163 * 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
164 TCPConnectToHost:
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
165 pshs a,x,y
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
166 leax tcpconnect,pcr
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
167 ldy #tcpconnectl
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
168 os9 I$Write
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
169 bcs connectex
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
170 ldx 1,s
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
171 lbsr STRLEN
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
172 tfr d,y
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
173 lda ,s
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
174 os9 I$Write
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
175 * write space
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
176 leax space,pcr
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
177 ldy #1
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
178 os9 I$Write
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
179 * 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
180 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
181 pshs a
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
182 lbsr STRLEN
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
183 tfr d,y
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
184 puls a
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
185 os9 I$Write
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
186 leax acr,pcr
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
187 ldy #1
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
188 os9 I$WritLn
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
189
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
190 * read response from server
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
191 * Entry: A = path
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
192 readresponse
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
193 leax nbuffer,u
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
194 ldy #nbufferl
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
195 os9 I$ReadLn
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
196 bcs connectex
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
197 lda ,x
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
198 cmpa #'F
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
199 bne connectex
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
200 * 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
201 leax 5,x skip over "FAIL "
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
202 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
203 coma set carry
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
204 connectex puls a,x,y,pc
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
205
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
206 acr fcb C$CR
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
207
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
208 * Requests to listen on a port
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
209 *
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
210 * Entry: A = path to network device
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
211 * 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
212 *
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
213 * Exit:
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
214 * Success: CC carry clear
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
215 * 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
216 TCPListen: pshs a,x,y
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
217 leax tcplisten,pcr
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
218 ldy #tcplistenl
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
219 os9 I$Write
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
220 bcs connectex
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
221 ldx 1,s
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
222 lbsr STRLEN
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
223 tfr d,y
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
224 lda ,s
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
225 os9 I$Write
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
226 leax acr,pcr
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
227 ldy #1
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
228 os9 I$WritLn
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
229 bra readresponse
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
230
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
231 * 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
232 *
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
233 * Entry: A = path to network device
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
234 *
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
235 * Exit:
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
236 * Success: CC carry clear
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
237 * 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
238 TCPDisconnect: os9 I$Close
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
239 rts
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
240
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
241 tcpconnect fcc 'tcp connect '
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
242 tcpconnectl equ *-tcpconnect
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
243
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
244 tcplisten fcc 'tcp listen '
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
245 tcplistenl equ *-tcplisten
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
246
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
247 tcpjoin fcc 'tcp join '
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
248 tcpjoinl equ *-tcpjoin
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
249
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
250 tcpkill fcc 'tcp kill '
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
251 tcpkilll equ *-tcpkill
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
252
03f26e88b809 Renamed files and setup for lwasm/lwlink work
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
253 endsect