comparison lib/alib/prints.a @ 2474:7d70b7e1cb21

Moved net and alib files into here
author boisy
date Tue, 30 Mar 2010 02:44:42 +0000
parents
children aaba193af04f
comparison
equal deleted inserted replaced
2473:dac1ff96637f 2474:7d70b7e1cb21
1 ***********************************
2
3 * Print a program-embedded, null terminated string to standard out.
4
5 * OTHER MODULES NEEDED: puts
6
7 * ENTRY: Null terminated string must follow PRINTS call
8 * eg: LBSR PRINTS
9 * fcc /this is stuff to print/
10 * fcb $0d * a new line
11 * fcc /more stuff to print/
12 * fcb $0d,0 the end
13 * lda #xx or whatever..
14 * * the rest of the program....
15
16 * EXIT: CC carry set if error
17 * B error code (if any)
18
19
20 nam Print Embedded String to Std. Out
21 ttl Assembler Library Module
22
23
24 psect PRINTS,0,0,0,0,0
25
26 PRINTS:
27 pshs x,u
28 ldx 4,s get start of string (old return address)
29 tfr x,u copy it
30
31 loop
32 tst ,u+ advance U to end of string
33 bne loop
34
35 stu 4,s one past null=return address
36 lbsr PUTS print from orig pos.
37 puls x,u,pc return to caller
38
39 endsect
40