TITLE "mp2.a, Machine Problem 2 by Douglas W. Jones" ; This code is based on the Hello World program ; from Chapter 5 of the 22C:60 course notes. S START USE "hawk.macs" USE "monitor.h" EXT UNUSED ; the program starts here! START: LIL R2,UNUSED ; set up the stack ; --- begin aplication code LIL R1,DSPINI JSRS R1,R1 ; initialize the display ADDI R3,R3,-NAMELEN ; added code SR R3,1 ; x = (width-namelen)/2: ; added code SR R4,1 ; y = height/2 ; added code LIL R1,DSPAT ; added code JSRS R1,R1 ; set screen coordinates ; added code LIL R3,NAME ; changed line LIL R1,DSPST JSRS R1,R1 ; output (NAME) ; --- end aplication code LIL R1,EXIT JSRS R1,R1 ; stop! ; --- begin aplication constants NAME: ASCII "Douglas W. Jones" ; changed line NAMELEN = . - NAME ; record of string length ; added code B 0 ; null marks end of string ; added code END