annotate lib/alib/linedit.a @ 2474:7d70b7e1cb21

Moved net and alib files into here
author boisy
date Tue, 30 Mar 2010 02:44:42 +0000
parents
children aaba193af04f
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 ***************************************
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
2
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
3 * Edit/input line.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
4
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
5 * This routine does not use cursor positioning,
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
6 * instead it uses backspacing, etc. This means it
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
7 * can be used without a GOTOXY module, however it
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
8 * is a bit slow, especially when lines get longer than
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
9 * one line. If the buffer contains data, you will be
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
10 * able to edit; to enter new data pass a buffer of
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
11 * blanks.
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 * OTHER MODULES NEEDED: STRLEN,IS_PRINT, FPUTS, FPUTC, FGETC, MEMMOVE
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 * ENTRY: X=null terminated string to edit
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
16 * A=input path (normally 0)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
17 * B=output path (normally 1)
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 * EXIT: B=key used to end editing
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
20 * CC carry set if error (GetStt, Setstt, Write, Read, etc.)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
21 * B=error code, if any
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 nam Edit/Input Line
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
24 ttl Assembler Library Module
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
25
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 psect LINEDIT,0,0,0,0,0
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
28
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
29 * these variable are all referenced via the
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
30 * U stack pointer.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
31
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
32 modPD equ 0 first buffer of copy of path descriptor
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
33 echo equ $04 echo mode
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
34 bso equ $02 backspace mode
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
35 bse equ $12 backspace echo char
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
36 bsp equ $09 backspace char
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
37 int equ $10 interupt char
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
38 qut equ $11 quit char
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
39 bell equ $13 line-overflow char
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 maxsize equ 35 temp variable
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
42 dupPD equ 38 2nd path desc.
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 vsize equ dupPD+32 variable stack size
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
45 strptr equ vsize+2 x on stack
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
46 inpath equ vsize+0 a on stack
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
47 outpath equ inpath+1 b on stack
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 LINEDIT:
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
50 pshs a,b,x,y,u
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
51 leas -vsize,s variable storage area
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
52 tfr s,u point U to var. area
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
53 lbsr STRLEN
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
54 std maxsize,u save max leng.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
55 lbeq exit
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 * get 2 copies of path descriptor, one to restore with, one to modify
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
58
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
59 lda outpath,u
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
60 leax dupPD,u
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
61 clrb SS.OPT
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
62 OS9 I$GetStt
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
63 bcs err1
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
64 leax modPD,u
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
65 clrb
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
66 OS9 I$GetStt
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
67 bcs err1
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
68
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
69 clrb
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
70 clr echo,u turn off echo
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
71 clr int,u ignore keyboard interupt
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
72 clr qut,u ignore quit
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
73 clr bso,u backspace overstrike
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
74 os9 I$SetStt
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
75 err1
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
76 lbcs exit
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 * parse string and change all controls to space
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
79
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
80 fixloop
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
81 lda ,x+
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
82 beq fixx
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
83 lbsr IS_PRINT is it printable?
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
84 beq fixloop yes, test next
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
85 lda #$20 change control to space
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
86 sta -1,x
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
87 bra fixloop
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
88 fixx
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 * print string at current cursor pos....
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
91
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
92 lda outpath,u
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
93 ldy maxsize,u
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
94 ldx strptr,u get string start
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
95 lbsr FPUTS print string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
96 bra shiftl1 go to line start
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
97
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
98 loop
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
99 pshs a save outpath
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
100 lda inpath,u
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
101 lbsr FGETC get one char
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
102 tfr a,b keypress to B
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
103 puls a restore outpath
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
104 lbcs out
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
105 cmpb bsp,u backspace?
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
106 bne delete no, try next
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 * backspace one position
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
109
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
110 sty -2,s test y
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
111 beq loop ignore if already at start
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
112 lbsr bs do a backspace
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
113 leax -1,x
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
114 bra loop
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
115
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
116 * Delete char at cursor
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
117
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
118 delete
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
119 cmpb #$10 delete char?
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
120 bne inspace no, try next
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
121 pshs d,x,y
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
122 ldd maxsize,u max leng
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
123 subd 4,s -current pos
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
124 tfr x,y destination
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
125 leax 1,x source
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
126 lbsr MEMMOVE
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
127 leax d,y end of string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
128 lda #$20 put space at end of string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
129 sta -1,x
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
130 tfr y,x
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 del1
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
133 puls d get outpath and char
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
134 lbsr FPUTS reprint string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
135 ldy maxsize,u
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 del2
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
138 cmpy 2,s back up to current cur pos
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
139 beq del3
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
140 lbsr bs
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
141 bra del2
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
142
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
143 del3
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
144 puls x,y clean up and loop
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
145
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
146 del4
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
147 bra loop
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
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
150 inspace
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
151 cmpb #$11 insert space?
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
152 bne shiftl no, try next
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
153 pshs d,x,y
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
154 ldd maxsize,u
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
155 subd 4,s
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
156 subd #1
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
157 leay 1,x X=source, Y=dest
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
158 lbsr MEMMOVE
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
159 ldb #$20 insert space in hole
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
160 stb ,x
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
161 bra del1 go reprint and loop
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
162
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
163 * move cursor to start of line
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 shiftl
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
166 cmpb #$18 shift left?
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
167 bne shiftr no, try next
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
168
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
169 shiftl1
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
170 bsr startln backup to start of line
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
171 ldx strptr,u reset x to start of line
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
172 bra asciix go loop
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 * move cursor to end of line
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 shiftr
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
177 cmpb #$19 shift right?
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
178 bne right
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
179
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
180 shiftr1
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
181 cmpy maxsize,u
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
182 bhs del4 back to loop
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
183 ldb ,x+ move to end by printing string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
184 lbsr FPUTC
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
185 leay 1,y
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
186 bra shiftr1
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
187
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
188 * move 1 pos right
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
189
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
190 right
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
191 cmpb #$09
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
192 bne maybasci
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
193 ldb ,x get current char and insert it
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
194 lbeq loop at end, don't move
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
195
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
196 * insert ascii char into buffer
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 maybasci
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
199 tstb insert ascii into buffer
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
200 lbmi out not ascii
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
201 cmpb #$20
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
202 lblo out
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
203 cmpy maxsize,u room for this?
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
204 blo ascii yes, insert it
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
205 ldb bell,u
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
206 lbsr FPUTC
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
207 bra asciix to main loop
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 ascii
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
210 stb ,x+
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
211 lbsr FPUTC
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
212 leay 1,y
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
213 asciix
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
214 lbra loop
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
215
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
216 out
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
217 pshs b save keypress
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
218 bsr startln
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
219 ldx strptr,u
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
220 lbsr FPUTS
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
221
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 leax dupPD,u get original pd
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
224 lda outpath,u
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
225 clrb
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
226 os9 I$SetStt
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
227 puls a get keypress
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
228 bcc out1
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
229 tfr b,a set error to A
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
230 out1
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
231 sta outpath,s set B to error/keypress
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
232
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
233 * when exiting CARRY will be set if error. B will contain
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
234 * either the keypress or the error code.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
235
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
236 exit
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
237 leas vsize,s
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
238 puls a,b,x,y,u,pc
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 * move cursor to start of line
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
241
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
242 startln
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
243 sty -2,s
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
244 beq startlnx exit if at start
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
245 startln1
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
246 bsr bs
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
247 bne startln1
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
248
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
249 startlnx
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
250 rts
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 bs
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
253 pshs b
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
254 ldb bse,u
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
255 lbsr FPUTC
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
256 leay -1,y
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
257 puls b,pc
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
258
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
259 endsect