Hello world/Newline omission: Difference between revisions

m
Line 19:
 
=={{header|68000 Assembly}}==
Because assembly lets (or rather forces) the programmer to create their own print routines, new lines are not done by default.
 
Code is called as a subroutine, taking <code>A0</code> as its argument (e.g. <code>LEA myString,A0 JSR PrintString</code>). The hardware-specific <code>PrintChar</code> routine is left unimplemented.
Line 30:
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
 
1,489

edits