annotate lib/alib/alib.docs @ 2784:2594295f9cc7 lwtools-port

Merged Drencor's work
author Boisy Pitre <boisy.pitre@nuance.com>
date Sat, 26 Jan 2013 17:19:06 -0600
parents 7d70b7e1cb21
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2474
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
1 .s="",ss=0,p="",n="",sn=80, * normal (pica) characters, 80 per 8 inch line
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
2 .lm=5, rm=75, tm=5, bm=60
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
3 .lh=5,rh=75,p=""
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
4 .he0="Assembler Library Documentation", he1="Page ##"
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
5 .he2="String Handlers"
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
6 .hf0=r,hf1=l,hf2=r
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
7 .hl0=2,hl1=2,hl2=3
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
8 .lf=c
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
9 .tf=_
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
10 =====================
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
11 == String Handlers ==
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
12 =====================
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
13 .lf=l
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
14
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
15
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
16 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
17 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
18
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
19 STIMESTR: Get current system time as an ascii string.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
20
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
21 OTHER MODULES NEEDED: DATESTR
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
22
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
23 ENTRY: X=buffer for ascii
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
24
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
25 EXIT: all registers preserved (except cc)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
26
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
27
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
28 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
29 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
30
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
31 DATESTR: Convert a date to a string. This can be used
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
32 for converting the system time as well as
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
33 modify/create dates from files. The date must
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
34 be 6 bytes -- null pad file dates.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
35
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
36 OTHER MODULES NEEDED: BIN_ASC
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
37
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
38 ENTRY: X=binary date
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
39 Y=buffer for ascii
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
40
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
41 EXIT: all registers preserved (except cc)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
42
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
43
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
44 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
45 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
46
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
47 TO_NON_SP: Advance X to 1st non-space character
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
48
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
49 OTHER MODULES NEEDED: none
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
50
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
51 ENTRY: X=somewhere in a string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
52
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
53 EXIT: X=1st non-space character in string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
54 B=char at X
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
55
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
56
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
57 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
58 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
59
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
60 PRINT_DEC: Print decimal number to standard out.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
61
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
62 ENTRY: D=value to print
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
63
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
64 EXIT: CC carry set if error (from I$WritLn)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
65 B error code, if any
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
66
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
67
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
68 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
69 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
70
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
71 PRINT_HEX: Print hex number to standard out.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
72
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
73 ENTRY: D=value to print
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
74
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
75 EXIT: CC carry set if error (from I$WritLn)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
76 B error code, if any
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
77
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
78
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
79 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
80 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
81
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
82 PRINT_ASC: Print binary number to standard out.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
83
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
84 ENTRY: D=value to print
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
85
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
86 EXIT: CC carry set if error (from I$WritLn)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
87 B error code, if any
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
88
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
89
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
90 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
91 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
92
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
93 STRCMP: compare two null terminated strings.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
94
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
95 NOTE: This routine first finds the length of both
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
96 strings and passes the length of the longer
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
97 one to strncmp.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
98
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
99 OTHER MODULES NEEDED: STRNCMP, STRLEN
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
100
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
101 ENTRY: X=start of 1st string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
102 Y=start of 2nd string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
103
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
104 EXIT: CC zero set if equal (beq)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
105 carry + zero clear if 1>2 (bhi)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
106 carry set if 1<2 (blo)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
107
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
108
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
109 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
110 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
111
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
112 STRNCMP: compare 2 null terminated strings
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
113 maximum number of bytes to compare in D
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
114
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
115 OTHER MODULES NEEDED: COMPARE
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
116
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
117 ENTRY: X=start of 1st string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
118 Y=start of 2nd string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
119 D=number of bytes to compare
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
120 CASEMTCH:(a global variable in COMPARE)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
121 0=match for case
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
122 -1=ignore case differences
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
123
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
124 EXIT: CC zero set if equal (beq)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
125 carry + zero clear if 1>2 (bhi)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
126 carry set if 1<2 (blo)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
127
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
128
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
129 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
130 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
131
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
132 STRLEN: String Length: find length of null terminated string.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
133 note:null NOT included in count.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
134
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
135 ENTRY: X=start of string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
136
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
137 EXIT: D=length
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
138 all other regs (except cc) preserved
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
139
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
140
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
141 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
142 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
143
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
144 STRHLEN: find length of sign-bit terminated string.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
145 note: sign-bit set byte IS included in count.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
146
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
147 OTHER MODULES NEEDED: none
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
148
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
149 ENTRY: X=start of string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
150
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
151 EXIT: D=length
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
152 all other regs (except cc) preserved
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
153
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
154
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
155 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
156 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
157
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
158 B09STRLEN: Find the length of a BASIC09 string.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
159
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
160 OTHER MODULES NEEDED: none
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
161
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
162 ENTRY: X=start of string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
163 D=max possible length (size passed to subroutine)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
164
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
165 EXIT: D=actual length (either at $FF or max size)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
166 all other regs (except cc) preserved
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
167
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
168 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
169 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
170
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
171 STRCAT: append 2 null terminated strings
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
172 User must ensure there is room in buffer!!!
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
173
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
174 OTHER MODULES NEEDED: STRCPY, STRLEN
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
175
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
176 ENTRY: X=start of string to move
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
177 Y=start of string to append to
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
178
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
179 EXIT: all regs preserved (except cc)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
180
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
181
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
182 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
183 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
184
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
185 STRNCPY: copy N bytes of a null terminated string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
186 User must ensure there is room in buffer!!!
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
187 If N>string length only N bytes will be moved
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
188
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
189 OTHER MODULES NEEDED: STRLEN, MEMMOVE
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
190
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
191 ENTRY: X=start of string to move
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
192 Y=buffer for copy of string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
193
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
194 EXIT: D = actual number of bytes moved
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
195 all other regs preserved (except cc)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
196
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
197
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
198 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
199 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
200
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
201 STRCPY: copy a null terminated string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
202 User must ensure there is room in buffer!!!
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
203
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
204 OTHER MODULES NEEDED: STRNCPY
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
205
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
206 ENTRY: X=start of string to move
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
207 Y=buffer for copy of string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
208
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
209 EXIT: all regs preserved (except cc)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
210
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
211 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
212 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
213
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
214 STRNCPY: copy N bytes of a null terminated string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
215 User must ensure there is room in buffer!!!
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
216 If N>string length only N bytes will be moved
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
217
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
218 OTHER MODULES NEEDED: STRLEN, MEMMOVE
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
219
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
220 ENTRY: X=start of string to move
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
221 Y=buffer for copy of string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
222
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
223 EXIT: D = actual number of bytes moved
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
224 all other regs preserved (except cc)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
225
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
226
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
227 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
228 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
229
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
230 STRHCPY: copy sign-bit terminated string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
231 User must ensure there is room in buffer!!!
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
232 See also PARSNSTR, this routine does not change
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
233 sign-bit termination.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
234
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
235 OTHER MODULES NEEDED: strhlen,memmove
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
236
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
237 ENTRY: X=start of string to move
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
238 Y=buffer for copy of string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
239
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
240
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
241 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
242 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
243
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
244 TO_UPPRS: convert a null terminated string to all uppercase
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
245
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
246 OTHER MODULES NEEDED: TO_UPPER
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
247
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
248 ENTRY: X=start of string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
249
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
250 EXIT: all registers (except CC) preserved
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
251
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
252
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
253 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
254 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
255
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
256 TO_UPPER: Convert character in "B" to uppercase
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
257
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
258 OTHER MODULES NEEDED: IS_LOWER
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
259
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
260 ENTRY: B=ascii value of character to convert
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
261
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
262 EXIT: B=ascii value of character in uppercase
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
263
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
264 Note: control codes, etc. are not effected.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
265
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
266
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
267 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
268 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
269
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
270 TO_LOWRS: convert a null terminated string to all lowercase
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
271
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
272 OTHER MODULES NEEDED: TO_LOWER
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
273
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
274 ENTRY: X=start of string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
275
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
276 EXIT: all registers (except CC) preserved
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
277
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
278
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
279 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
280 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
281
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
282 TO_LOWER: Convert character in "B" to lowercase
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
283
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
284 OTHER MODULES NEEDED: IS_UPPER
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
285
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
286 ENTRY: B=ascii value of character to convert
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
287
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
288 EXIT: B=ascii value of character in lowercase
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
289
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
290 Note: control codes, etc. are not effected.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
291
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
292
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
293 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
294 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
295
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
296 PARSNSTR: Parse sign bit terminated string to convert it to a
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
297 null terminated string. Note: if X and Y are the same
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
298 the existing string will be overwritten -- don't do this
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
299 with psects...
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
300
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
301 OTHER MODULES NEEDED: none
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
302
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
303 ENTRY: X=start of sign bit terminated string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
304 Y=buffer for null terminated string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
305
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
306 EXIT: D=string size (not including null)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
307 All other regs (except cc) preserved
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
308
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
309
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
310 .lf=c, he2="I/O Routines",pg
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
311 ==================
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
312 == I/O Routines ==
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
313 ==================
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
314 .lf=l
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
315
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
316 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
317 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
318
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
319 PRINTS: Print a program embedded, null terminated string to std out.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
320
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
321 OTHER MODULES NEEDED: puts
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
322
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
323 ENTRY: Null terminated string must follow PRINTS call
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
324 eg: LBSR PRINTS
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
325 fcc /this is a string to print/
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
326 fcb $0d
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
327 fcc /a second string/
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
328 fcb $0d,0
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
329 lbsr morestuff...
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
330
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
331 EXIT: CC carry set if error
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
332 B error code (if any)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
333
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
334 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
335 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
336
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
337 PUTS: Print a null terminated string to standard out.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
338
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
339 OTHER MODULES NEEDED: fputs
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
340
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
341 ENTRY: X=string to print
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
342
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
343 EXIT: CC carry set if error
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
344 B error code (if any)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
345
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
346
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
347 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
348 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
349
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
350 FPUTS: print null terminated string to "A".
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
351
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
352 OTHER MODULES REQUIRED: none
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
353
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
354 ENTRY: X=start of string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
355 A=path
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
356
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
357 EXIT: CC carry set if error
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
358 B = OS9 error if any (from I$WritLn)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
359
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
360 NOTE: string is feed through I$WritLn for editing (adding LF, etc.)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
361
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
362
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
363 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
364 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
365
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
366 PUTCR: Subroutine to print a carriage return to std. out.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
367
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
368 OTHER MODULES REQUIRED: FPUTCR
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
369
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
370 ENTRY: none
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
371
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
372 EXIT: CC carry set if error (from I$WritLn)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
373 B error code if any.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
374
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
375
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
376 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
377 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
378
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
379 FPUTCR: Subroutine to print a carriage return
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
380
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
381 OTHER MODULES REQUIRED: FPUTC
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
382
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
383 ENTRY: A=path
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
384
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
385 EXIT: CC carry set if error (from I$WritLn)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
386 B error code if any.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
387
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
388
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
389 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
390 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
391
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
392 PUTSPACE: Subroutine to print a space to std. out
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
393
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
394 OTHER MODULES REQUIRED: FPUTSPACE
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
395
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
396 ENTRY: none
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
397
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
398 EXIT: CC carry set if error (from I$WritLn)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
399 B error code if any.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
400
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
401
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
402 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
403 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
404
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
405 FPUTSPACE: Subroutine to print a space
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
406
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
407 OTHER MODULES REQUIRED: FPUTC
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
408
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
409 ENTRY: A=path
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
410
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
411 EXIT: CC carry set if error (from I$WritLn)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
412 B error code if any.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
413
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
414
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
415 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
416 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
417
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
418 PUTC: Put single character to standard out.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
419
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
420 OTHER MODULES NEEDED: FPUTC
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
421
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
422 ENTRY: B=character to print
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
423
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
424 EXIT: CC carry set if error
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
425 B=error code if any
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
426
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
427
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
428 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
429 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
430
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
431 FPUTC: Subroutine to print one character.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
432
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
433 OTHER MODULES NEEDED: none
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
434
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
435 ENTRY: A=path
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
436 B=char to print
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
437
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
438 EXIT: CC carry set if error (from I$WritLn)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
439 B error code if any
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
440
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
441
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
442 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
443 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
444
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
445 GETC: Subroutine to input one character from std in.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
446
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
447 OTHER MODULES NEEDED: FGETC
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
448
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
449 ENTRY: none
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
450
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
451 EXIT: A character
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
452 CC carry set if error (from I$Read)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
453 B error code if any
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
454
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
455
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
456 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
457 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
458
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
459 FGETC: Subroutine to input one character.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
460
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
461 OTHER MODULES NEEDED: none
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
462
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
463 ENTRY: A=path
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
464
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
465 EXIT: A character
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
466 CC carry set if error (from I$Read)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
467 B error code if any
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
468
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
469
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
470 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
471 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
472
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
473 GETS: Subroutine to input a null terminated string from Std. In
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
474
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
475 OTHER MODULES NEEDED: FGETS
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
476
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
477 ENTRY: X=buffer for string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
478 Y=max buffer size (leave room for null!!)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
479
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
480 EXIT: CC carry set if error (from I$ReadLn)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
481 B error code if any
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
482
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
483 NOTE: The string entered must end with an end-of-record char
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
484 (usually a $0D), the null is appended for ease in string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
485 handling.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
486
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
487
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
488 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
489 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
490
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
491 FGETS: Subroutine to input a null terminated string.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
492
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
493 OTHER MODULES NEEDED: none
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
494
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
495 ENTRY: A=path
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
496 X=buffer for string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
497 Y=max buffer size (leave room for null!!)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
498
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
499 EXIT: CC carry set if error (from I$ReadLn)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
500 B error code if any
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
501
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
502
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
503 NOTE: The string entered must end with an end-of-record char
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
504 (usually a $0D), the null is appended for ease in string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
505 handling.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
506
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
507 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
508 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
509
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
510 INKEY: Checks STDIN for a keypress and returns it if avail.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
511
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
512 ENTRY: none
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
513
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
514 EXIT: A=character, 0=no character
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
515 B=error code (if any)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
516 CC=carry set if error (from I$Read)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
517
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
518 NOTE: NULLs entered from the keyboard are returned as "no keypress".
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
519
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
520
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
521 .he2="Integer Math",pg,lf=c
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
522 ==================
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
523 == Integer Math ==
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
524 ==================
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
525 .lf=l
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
526
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
527
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
528 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
529 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
530
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
531 MULT168: 16 x 8 Multiply (24 bit result)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
532
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
533 OTHER MODULES NEEDED: none
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
534
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
535 ENTRY: A = multiplier
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
536 X = multiplicand
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
537
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
538 EXIT: A = product byte 1
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
539 X = product bytes 2 & 3
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
540 B modified
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
541
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
542
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
543 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
544 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
545
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
546 MULT16: 16 x 16 Multiply
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
547
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
548 ENTRY: D = multiplier
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
549 X = multiplicand
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
550
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
551 EXIT: Y = product 2 msbs
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
552 U = " 2 lsbs
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
553 D & X preserved
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
554
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
555
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
556 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
557 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
558
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
559 DIV168: 16 x 8 bit integer divide
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
560
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
561 Result must be an 8 bit value
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
562
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
563 ENTRY: A = divisor
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
564 X = dividend
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
565
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
566 EXIT: A = remainder
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
567 B = quotient
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
568 all other registers (except CC) preserved
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
569
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
570
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
571 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
572 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
573
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
574 DIV16: 16 x 16 bit integer divide
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
575
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
576 OTHER MODULES NEEDED: none
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
577
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
578 ENTRY: D = divisor
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
579 X = dividend
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
580
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
581 EXIT: X = quotient
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
582 D = remainder
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
583
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
584
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
585 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
586 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
587
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
588 DIV88: 8 x 8 Divide
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
589
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
590 OTHER MODULES NEEDED: none
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
591
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
592 ENTRY: A = divisor
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
593 B = dividend
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
594
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
595 EXIT: A = remainder
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
596 B = quotient
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
597
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
598
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
599 .he2="Number Conversions",pg,lf=c
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
600 ========================
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
601 == Number Conversions ==
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
602 ========================
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
603 .lf=l
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
604
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
605
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
606 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
607 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
608
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
609 DEC_BIN: DECIMAL to BINARY conversion routine
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
610
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
611 OTHER MODULES NEEDED: DECTAB$, IS_TERMIN
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
612
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
613 ENTRY: X = start of asci decimal string terminated by
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
614 a space, comma, CR or null.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
615
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
616 EXIT: D = binary value
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
617 CC carry set if error (too large, not numeric)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
618 Y = terminator or error char.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
619
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
620
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
621 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
622 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
623
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
624 BIN_DEC: Binary to decimal conversion
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
625
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
626 OTHER MODULES NEEDED: DECTAB$
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
627
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
628 ENTRY: X=buffer for ascii string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
629 D=binary value to convert
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
630
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
631 EXIT: all registers (except cc) preserved
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
632
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
633
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
634 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
635 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
636
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
637 ASC_BIN: ASCII String to binary byte conversion
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
638
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
639 OTHER MODULES NEEDED: IS_TERMIN
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
640
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
641 ENTRY: X = start of string of binary digits (001101)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
642 terminated by space, comma, CR or null.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
643
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
644 EXIT: D = value
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
645 CC carry set if error (string too long, not binary digits)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
646 Y = terminator or error pos.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
647
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
648
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
649 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
650 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
651
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
652 BIN_ASC: Binary word to ASCII string conversion
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
653
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
654 OTHER MODULES NEEDED: none
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
655
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
656 ENTRY: D = binary value
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
657 X = buffer for 16 bit number
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
658
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
659 EXIT: all registers (except cc) preserved
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
660
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
661
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
662 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
663 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
664
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
665 HEX_BIN: Hexadecimal string to BINARY conversion
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
666
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
667 OTHER MODULES REQUIRED: TO_UPPER, IS_TERMIN, IS_XDIGIT
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
668
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
669 ENTRY: X=start of a hex string terminated by a space,
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
670 comma, CR, or NULL.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
671
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
672 EXIT: D=binary number
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
673 CC carry set iferror (too large, non-numeric)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
674 Y=terminator position or error char.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
675
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
676
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
677 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
678 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
679
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
680 BIN_HEX: Binary to hexadecimal convertor
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
681
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
682 This subroutine will convert the binary value in
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
683 'D' to a 4 digit hexadecimal ascii string.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
684
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
685 OTHER MODULES NEEDED: BIN2HEX
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
686
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
687 ENTRY: D=value to convert
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
688 X=buffer for hex string-null terminated
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
689
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
690 EXIT all registers (except CC) preserved.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
691
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
692
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
693 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
694 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
695
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
696 HEX2BIN: Convert hex byte to 2 hex digits
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
697
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
698 OTHER MODULES REQUIRED: none
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
699
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
700 ENTRY: B= value to convert
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
701
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
702 EXIT: D=2 byte hex digits
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
703
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
704
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
705 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
706 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
707
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
708 DECTAB: table of decimal numbers for use by binary/decimal conversion
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
709 routines.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
710
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
711
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
712 .he2="What's IT??",pg,lf=c
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
713 =================
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
714 == What's IT?? ==
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
715 =================
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
716 .lf=l
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
717
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
718
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
719 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
720 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
721
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
722 IS_PUNCT: See if character in "B" is a punctuation character
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
723
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
724 OTHER MODULES NEEDED: IS_ALNUM, IS_CNTRL
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
725
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
726 ENTRY: B=character to test
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
727
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
728 EXIT: CC zero=1 if punct., 0 if not
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
729
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
730
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
731 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
732 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
733
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
734 IS_PRINT: See if character in "B" is a printable character
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
735 controls are defined as $00..$1F and $7F+ -- all others are printable
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
736
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
737 OTHER MODULES NEEDED: IS_CNTRL
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
738
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
739 ENTRY: B=character to test
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
740
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
741 EXIT: CC zero=1 if printable, 0 if not
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
742
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
743
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
744 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
745 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
746
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
747 IS_CNTRL: See if character in "B" is a control character
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
748 controls are defined as $00..$1F and $7F+
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
749
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
750 OTHER MODULES NEEDED: none
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
751
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
752 ENTRY: B=character to test
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
753
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
754 EXIT: CC zero=1 if control, 0 if not
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
755
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
756
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
757 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
758 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
759
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
760 IS_SPACE: See if character in "B" is a space ($20)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
761
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
762 NOTE: This module is included for completeness only,
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
763 it is much more efficient to do an inline test.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
764
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
765 OTHER MODULES NEEDED: none
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
766
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
767 ENTRY: B=character to test
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
768
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
769 EXIT: CC zero=1 if space, 0 if not
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
770
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
771
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
772 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
773 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
774
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
775 IS_XDIGIT: See if character in "B" is a hexdigit 0..9, A..F or a..f
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
776
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
777 OTHER MODULES NEEDED: IS_DIGIT
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
778
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
779 ENTRY: B=character to test
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
780
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
781 EXIT: CC zero=1 if hex digit, 0 if not
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
782
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
783
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
784 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
785 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
786
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
787 IS_ALNUM: See if character in "B" is a
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
788 alpha letter a..z or A..Z or digit 0..9
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
789
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
790 OTHER MODULES NEEDED: IS_ALPHA, IS_DIGIT
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
791
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
792 ENTRY: B=character to test
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
793
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
794 EXIT: CC zero=1 if alphanumeric, 0 if not
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
795
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
796
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
797 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
798 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
799
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
800 IS_ALPHA: See if character in "B" is a alpha letter a..z or A..Z
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
801
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
802 OTHER MODULES NEEDED: IS_LOWER, IS_UPPER
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
803
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
804 ENTRY: B=character to test
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
805
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
806 EXIT: CC zero=1 if alpha, 0 if not
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
807
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
808
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
809 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
810 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
811
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
812 IS_DIGIT: See if character in "B" is a digit 0..9
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
813
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
814 OTHER MODULES NEEDED: none
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
815
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
816 ENTRY: B=character to test
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
817
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
818 EXIT: CC zero=1 if digit, 0 if not
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
819
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
820
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
821 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
822 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
823
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
824 IS_LOWER: See if character in "B" is a lowercase letter
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
825
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
826 OTHER MODULES NEEDED: none
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
827
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
828 ENTRY: B=character to test
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
829
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
830 EXIT: CC zero=1 if lowercase, 0 if not
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
831
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
832
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
833 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
834 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
835
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
836 IS_UPPER: See if character in "B" is a uppercase letter
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
837
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
838 OTHER MODULES NEEDED: none
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
839
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
840 ENTRY: B=character to test
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
841
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
842 EXIT: CC zero=1 if uppercase, 0 if not
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
843
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
844
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
845 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
846 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
847
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
848 IS_TERMIN: See if character in "B" is a valid string terminator.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
849
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
850 NOTE: This module is used by HEX_BIN, DEC_BIN, etc. It permits
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
851 SPACE, CR, COMMA and NULL to be used as a delimiter -- useful
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
852 for paramater and list processing....
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
853
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
854 OTHER MODULES NEEDED: none
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
855
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
856 ENTRY: B=character to test
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
857
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
858 EXIT: CC zero=1 if space, 0 if not
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
859
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
860
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
861 .he2="OS9 File Specific",lf=c
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
862 =======================
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
863 == OS9 File Specific ==
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
864 =======================
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
865 .lf=l
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
866
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
867
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
868 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
869 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
870
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
871 GETFMD: Get the "last modified" date of an open file
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
872
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
873 NOTE: Even though OS9 does not save seconds in its
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
874 files this routine stores a zero in this position.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
875 This is done to make the routine compatible with
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
876 DATESTR.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
877
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
878 OTHER MODULES NEEDED: none
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
879
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
880 ENTRY: X=buffer for 6 byte date
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
881 A=path of open file
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
882
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
883 EXIT: CC carry set if error
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
884 B error code (if any) from SS.FD
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
885
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
886
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
887 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
888 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
889
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
890 MKTEMP: This subroutine creates a temorary filename
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
891 by adding a "." and a 2digit hex value based
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
892 on the process id.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
893 IMPORTANT: there must be room after the filename
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
894 for at least 6 bytes!! Filename must be variable
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
895 area, not parameter or program sections!!!
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
896
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
897 OTHER MODULES NEEDED: BIN_HEX
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
898
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
899 ENTRY: X= filename
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
900
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
901 EXIT: no registers (expect cc) modified
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
902 filename ends in ".processid",$0d
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
903
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
904
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
905 .he2="Miscellaneous Routines",pg,lf=c
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
906 ============================
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
907 == Miscellaneous Routines ==
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
908 ============================
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
909 .lf=l
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
910
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
911
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
912 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
913 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
914
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
915 LINEDIT: Edit/input line.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
916
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
917 This routine does not use cursor positioning,
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
918 instead it uses backspacing, etc. This means it
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
919 can be used without a GOTOXY module, however it
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
920 is a bit slow, especially when lines get longer than
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
921 one line. If the buffer contains data, you will be
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
922 able to edit; to enter new data pass a buffer of
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
923 blanks.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
924
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
925 OTHER MODULES NEEDED: STRLEN,IS_PRINT, FPUTS, FPUTC, FGETC, MEMMOVE
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
926
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
927 ENTRY: X=null terminated string to edit
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
928 A=input path (normally 0)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
929 B=output path (normally 1)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
930
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
931 EXIT: CC carry set if error (GetStt, Setstt, Write, Read, etc.)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
932 B=error code, if any
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
933
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
934
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
935 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
936 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
937
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
938 SHO_REGS: Display the 6809 registers to standard error.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
939
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
940 OTHER MODULES NEEDED: BIN2HEX, BIN_HEX, PUTS
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
941
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
942 ENTRY: none
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
943
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
944 EXIT: none
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
945
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
946
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
947 NOTE: The value used for PC is that of the calling routine
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
948 S is assumed to be 2 greater than actual to comp for
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
949 the subroutine call...
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
950
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
951
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
952 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
953 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
954
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
955 MEMMOVE: Memory move
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
956
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
957 NOTE: This routine properly moves overlapping areas of memory.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
958 Uses fast move algorithm
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
959
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
960 ENTRY: X=source data
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
961 Y=destination
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
962 D=count
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
963
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
964 EXIT: all registers (except CC) preserved
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
965
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
966
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
967 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
968 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
969
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
970 PTSEARCH: Pattern Search
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
971
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
972 OTHER MODULES REQUIRED: COMPARE
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
973
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
974 ENTRY: X=start of memory to search
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
975 U=end of memory
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
976 Y=start of pattern
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
977 D=size of pattern
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
978 CASEMTCH (a global variable in COMPARE) =0 if A<>a, -1 if A=a
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
979
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
980 EXIT: X=address of match if found, unchanged if no match
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
981 CC zero set if match, clear for no-match
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
982 A,B,U,Y preserved
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
983
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
984
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
985 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
986 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
987
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
988 MEMSET: Set bytes in memory to specified value
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
989
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
990 OTHER MODULES NEEDED: none
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
991
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
992 ENTRY: X=start of memory
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
993 Y=number of bytes to set
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
994 B=character to set
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
995
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
996 EXIT: all registers (except cc) preserved
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
997
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
998
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
999 .nl=7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
1000 \t66\
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
1001
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
1002 COMPARE: Subroutine for string comparsion routines.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
1003 Compares chars in A/B, will convert both to
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
1004 uppercase first if CASEMTCH is set (negative)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
1005
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
1006 OTHER MODULES NEEDED: TO_UPPER
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
1007
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
1008 ENTRY: A/B=characters to compare
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
1009 CASEMTCH=0 (or positive value) if A<>a
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
1010 -1 (or neg value) if A=a
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
1011
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
1012 EXIT: CC zero set if characters match.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
1013 All other registers preserved.