title: How do I print a string in one line in MARIE?
body: <p>I want to print a set of letters in one line in MARIE. I modified the code to print <code>Hello World</code> and came up with:</p>
  
  <pre><code>    ORG     0       / implemented using "do while" loop
  WHILE,      LOAD        STR_BASE    / load str_base into ac
      ADD     ITR         / add index to str_base
      STORE       INDEX       / store (str_base + index) into ac
      CLEAR               / set ac to zero
      ADDI        INDEX       / get the value at ADDR
      SKIPCOND    400     / SKIP if ADDR = 0 (or null char)
      JUMP        DO      / jump to DO
      JUMP        PRINT       / JUMP to END
  
  DO, STORE       TEMP                / output value at ADDR
      LOAD        ITR         / load iterator into ac
      ADD         ONE         / increment iterator by one
      STORE       ITR         / store ac in iterator
      JUMP        WHILE       / jump to while
  
  PRINT,      SUBT    ONE
              SKIPCOND  000
              JUMP     PR
              HALT
  
  PR,     OUTPUT
          JUMP WHILE
  
  ONE,        DEC     1
  ITR,        DEC     0
  INDEX,      HEX     0
  STR_BASE,   HEX     12      / memory location of str
  STR,        HEX     48      / H
      HEX     65      / E
      HEX     6C      / L
      HEX     6C      / L
      HEX     6F      / O
      HEX     0       / carriage return
      HEX     57      / W
      HEX     6F      / O
      HEX     72      / R
      HEX     6C      / L
      HEX     64      / D
      HEX     0       / NULL char
  </code></pre>
  
  <p>My program ends up halting past two iterations. I can't seem to figure out how to print a set of characters in one line. Thanks.</p>