;Example: Add 2 to non-negative number in memory (temp1) and store
;into another memory location (temp2)
.ORIG x3000 ; program starts/loaded at address x3000
    LD R1, temp1    ; load value at location temp1 into register R1
    BRn done        ; if number is negative then done go to end and Halt
    ADD R3, R1, #2  ; else add 2 to number and store into Register R3
    ST R3, temp2    ; store value in Register R3 into memory location temp2
done    HALT        ; halt program
temp2   .BLKW #1    ; reserve one word/location in memory for temp2
temp1   .FILL x0005 ;reserve location for temp1 and initilize temp1 to 5
        .END    ; end of program