; ; a 'Hello World' program in SUBLEQ language ; *0 finish ; writing this stops the program *4 inctl ; writing this requests a character in inchar inchar ; this is where input characters 'appear' ouctl ; writing this requests output of a character from ouchar ouchar ; put characters here before writing to ouctl *10 work=0 Hello='H','e','l','l','o',' ','W','o','r','l','d','!',13,0 *40 :main Hello,work ; get one message char into work ouchar,ouchar ; clear the output work,ouchar ; then put the next character there ; but before we output the character, we test if it is the terminator (value 0) ; if work is 0, then adding 1 makes it > 0 and no branch occurs -1,work,next ; testing finish,finish,finish ; stop the program :next 0,ouctl ; output the character -1,main ; increase the pointer work,work,main ; go again