      EXT               # enable extended mode

loop  LDA   first       # (modified) load the current character
      BRZ   exit        # if null, stop
      OTA               # output the character
      LDA   loop        # load the character loading instruction
      ADD   one         # add one to the address
      STO   loop        # store the modified instruction
      BR    loop        # go to the start of the loop

exit  HLT               # stop

# constants
one   DAT   1

# data
first DAT   072         # a string of characters
      DAT   101
      DAT   108
      DAT   108
      DAT   111
      DAT   032
      DAT   119
      DAT   111
      DAT   114
      DAT   108
      DAT   100
      DAT   033
      DAT   010         # ending in a newline
      DAT   000         # and terminated with a null (zero)
