/ PRINTS - Print an ASCIIZ string to the terminal
/
/ It expects to receive the address of the string - 1 in AC.  (The -1
/ hassle saves an instruction or two in our use of an autoincrement
/ register.)
/
/ This routine uses the autoinc register at location 10.
/
/ Created by Warren Young of tangentsoft.com, 2016.11.30
/ Improved by Rick Murphy of the PiDP-8/I mailing list, 2016.12.03
/
/ Copyright © 2016 Warren Young and Rick Murphy
/
/ Permission is hereby granted, free of charge, to any person obtaining a
/ copy of this software and associated documentation files (the "Software"),
/ to deal in the Software without restriction, including without limitation
/ the rights to use, copy, modify, merge, publish, distribute, sublicense,
/ and/or sell copies of the Software, and to permit persons to whom the
/ Software is furnished to do so, subject to the following conditions:
/
/ The above copyright notice and this permission notice shall be included in
/ all copies or substantial portions of the Software.
/
/ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
/ THE AUTHORS LISTED ABOVE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/ DEALINGS IN THE SOFTWARE.
/
/ Except as contained in this notice, the names of the authors above shall
/ not be used in advertising or otherwise to promote the sale, use or other
/ dealings in this Software without prior written authorization from those
/ authors.
////////////////////////////////////////////////////////////////////////

TYPE,   0		/ helper routine for sending a single character
	TSF
	JMP .-1
	TLS
	CLA
	JMP I TYPE

SADDR=10		/ autoinc register for walking the string
PRINTS, 0
	DCA SADDR	/ save AC as string address
PSNEXT, TAD I SADDR	/ load next character
	SNA
	JMP I PRINTS	/ found the null terminator; leave
	JMS TYPE	/ print that character
	JMP PSNEXT	/ look at next character
