19
COUNTDOWN
The following program directs the 1155 to count down from
10
to
0
then stop
automatically.
IF
In the program below, IF-GO TO 99
means NEG
++921.
10
1.
0
STORE 05
20
RECALL 05
IF-GO TO 99
PRINT
1
OPP SIGN
ACCSTORE 05
GO TO 20
99
STOP
Run it .
• RESET
t
SET DEC 0
.GO TO 10, START
The 1155 counts down from
10
to 0 then stops automatically.
( )( )
Start the count at
10
in register 05
Recall the count
If it is negative, go to 99
Otherwise, print it and
Decrease
it
by 1..
Then go around again
End of program. Count has become
negative.
10
9
8
7
6
5
4
3
2
1
o
*The count is decreased by
1
by adding
-1
to the previous count.
9/72
19-1