Some languages automatically insert a newline after outputting a string, unless measures are taken to prevent its output.



Task

Display the string   Goodbye, World!   without a trailing newline.



Related tasks

   Hello world/Graphical
   Hello world/Line Printer
   Hello world/Standard error
   Hello world/Text


PrintString:
;input: A0 = source address
;outputs to screen.
MOVE.B (A0)+,D0
BEQ Terminated
JSR PrintChar
BRA PrintString
Terminated:
; If this routine did in fact put a new line by default, it would do so here with the following:
; MOVE.B #13,D0  ;13 is ascii for Carriage Return (moves cursor back to beginning of row).
; JSR PrintChar
; MOVE.B #10,D0  ;10 is ascii for Line Feed (moves cursor down one line).
; JSR PrintChar
RTS
 
myString:
DC.B "Goodbye, World!",0
EVEN