comparison lib/alib/prints.as @ 2783:03f26e88b809 lwtools-port

Renamed files and setup for lwasm/lwlink work
author Boisy Pitre <boisy.pitre@nuance.com>
date Sat, 26 Jan 2013 17:18:24 -0600
parents lib/alib/prints.a@aaba193af04f
children
comparison
equal deleted inserted replaced
2782:aaba193af04f 2783:03f26e88b809
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 section .text
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