15–34 Mathematics Programs
File name 32sii-Manual-E-0424
Printed Date : 2003/4/24 Size : 17.7 x 25.2 cm
Program Lines: Description
"!
%
Prompts for and stores X, the old x–coordinate.
"!
&
Prompts for and stores Y, the old y–coordinate.
%
Pushes Y up and recalls X to the X–register.
Pushes X and Y up and recalls N to the X–register.
Pushes N, X, and Y up and recalls M.
%.
Calculates (X – M) and (Y – N).
!
Pushes (X – M) and (Y – N) up and recalls T.
-+.
Charges the sign of T because sin(–T) equals –sin(T).
Sets radius to 1 for computation of cos(T) and –sin(T).
θ
8T
´
¸8º
Calculates cost (T) and –sin(T) in X– and Y–registers.
%º
Calculates (X – M) cos (T) + (Y–N) sin (T) and (Y – N)
cos (T) – (X – M) sin(T).
!
"
Stores x–coordinate in variable U.
º65¸
Swaps positions of the coordinates.
!
"
Stores y–coordinate in variable V.
º65¸
Swaps positions of coordinates back.
#$
"
Halts program to display U.
#$
#
Halts program to display V.
!
Goes back for another calculation.
Checksum and length: 3A46 028.5
This routine converts from the new system to the old
system.
"!
"
Prompts for and stores U.
"!
#
Prompts for and stores V.
"
Pushes V up and recalls U.
!
Pushes U and V up and recalls T.
Sets radius to 1 for the computation of sin(T) and
cos(T).
θ
8T
´
¸8º
Calculates cos(T) and sin(T).
%º
Calculates U cos(T) V sin(T) and U sin(T) + V cos(T).
Pushes up previous results and recalls N.
Pushes up results and recalls M.
%-
Completes calculation by adding M and N to
previous results.