/ Simple demonstration program of / wait loop i/o, / this program writes a standared message / to the teletype. / The message is held in the "array" data--- / one character per word with a null word terminating / the message / each character is fetched in turn, sent to the tty / with the program causing the cpu to wait until the / tty flag is set indicating safe delivery of character *200 / initialize a pointer to the start of the message cla tad addr dca ptr / main loop: fetch next character loop, cla tad i ptr sna jmp done / if zero word, then finished / if have valid character , send it, wait for acknowledgement tls wt, tsf jmp wt / update pointer so that get next character of the / message isz ptr nop jmp loop / back to start of loop done, hlt / - - - - - - - - - - addr,data / address constant ptr,0 / pointer variable / - - - - - - - - - / now get the message, one character per word / it is of course the standard first message data,0110 0145 0154 0154 0157 0040 0127 0157 0162 0154 0144 0015 0012 0 $