; Hello world.asm ; This SimpSim assembly language program prints out a simple message. ; It demonstrates: ; assembling into machine language ; program and data segments in memory ; printing (using RF) ; direct, immediate, and indirect loads ; conditional and unconditional jumps with labels ; integer addition ; halting ; integer and string data bytes load R1,Text ;the start of the string load R2,1 ;increase step load R0,0 ;string-terminator NextChar:load RF,[R1] ;get character and print it on screen addi R1,R1,R2 ;increase address jmpEQ RF=R0,Ready ;when string-terminator, then ready jmp NextChar ;next character Ready: halt org 20h ;; Data segment begins at 0x20 Text: db 10 db "Hello world !!",10 db " from the",10 db " Simple Simulator",10 db 0 ;string-terminator