*   This program inputs an integer,
*   computes its factorial if it is > 0,
*   and prints the result

0:   IN  0, 0, 0     R0 = read integer
1:   JLE 0, 6(7)     if 0<R0 then
2:   LDC 1, 1, 0         R1 = 1
3:   LDC 2, 1, 0         R2 = 1
                         * repeat
4:   MUL 1, 1, 0             R1 = R1 * R0
5:   SUB 0, 0, 2             R0 = R0 - R2
6:   JNE 0, -3(7)        until  R0 == 0
7:   OUT 1, 0, 0     write R1
8:   HALT 0, 0, 0    halt

