56
Branching
You can see that execution continues within the loop until the approxima-
tion for e equals the calculator's value for e. When the instruction
in line 16 is finally true, execution is transferred out of the loop by the
subsequent
00 instruction and halted.
Problems
1.
Write a program that will cal-
culate the arc sine (that is, sin™1)
of a value that has been keyed into
the displayed X-register. Test the
resulting angle with aconditional,
and if it is negative or zero, add
360 degrees to it to make the
angle positive. Use the flowchart
below to help you write the
program:
Calculate arc
sine of x.
'
Is
arc sine
greater than
zero?
Yes
No
Add 360
degrees.