2474
|
1 **************************************
|
|
2
|
|
3 * FPUTS: print null terminated string to "A".
|
|
4
|
|
5 * OTHER MODULES REQUIRED: none
|
|
6
|
|
7 * ENTRY: X=start of string
|
|
8 * A=path
|
|
9
|
|
10 * EXIT: CC carry set if error
|
|
11 * B = OS9 error if any (from I$WritLn)
|
|
12
|
|
13 * NOTE: string is feed through I$WritLn for editing (adding LF, etc.)
|
|
14
|
|
15 nam Output String
|
|
16 ttl Assembler Library Module
|
|
17
|
|
18
|
|
19 psect FPUTS,0,0,0,0,0
|
|
20
|
|
21 FPUTS:
|
|
22 pshs a,x,y,u
|
|
23 tfr x,u start of 1st segment to print
|
|
24
|
|
25 loop
|
|
26 pshs u start of this segment
|
|
27 ldy #-1 size of this seg.
|
|
28
|
|
29 l1
|
|
30 leay 1,y count size
|
|
31 ldb ,u+ check for null/cr
|
|
32 beq doit null=do last seg.
|
|
33 cmpb #$0d cr=do this seg.
|
|
34 bne l1
|
|
35 leay 1,y count CR as one of the ones to print
|
|
36
|
|
37 doit
|
|
38 puls x get start of this segment
|
|
39 OS9 I$WritLn
|
|
40 bcs exit
|
|
41 tst -1,u at end?
|
|
42 bne loop
|
|
43
|
|
44 exit
|
|
45 puls a,x,y,u,pc return with status in CC,error code in B
|
|
46
|
|
47 endsect
|