; HelloWorld.asm ; Inspired by example 2.1 from the texbook by Fredrick M. Cady ; and by Prof. Gilbert Arbez from the University of Ottawa ; Prints "Hello World" to the screen ; Constants CR equ $0d ; Carriage return LF equ $0a ; line feed EOS equ $00 ; End of String ; Adress of sub-routine printf equ $EE88 ; Memory Map Constants PROG equ $2000 ; RAM STACK equ $2000 ; End of stack ; Start of Program ORG PROG ; Put the program in memory lds #STACK ; initialize the stack loop: ldd #HELLO ; Find the adress of the message jsr printf ; sub-routine for printing the message bra loop ; Repeat forever ; The message in memory HELLO DC.B 'Hello World',CR,LF,EOS