💾 Archived View for mirrors.apple2.org.za › archive › ground.icaen.uiowa.edu › apple8 › Pgms › trigc… captured on 2023-01-29 at 10:57:03.
View Raw
More Information
-=-=-=-=-=-=-
Hello all.......
here is an old program that I wrote a while ago (!@#$ almost 15 years ago),
but here is the problem. I now run on a Macintosh (and a quite fine unit I
might add) :) ......
I'm using Bernie ][ to emulate a ][gs. I've re-figured out quite a bit in
the last couple of days (thanks to TOM cturley2). The ole' brain cells
started firing again on AppleSoft. I was even thinking about staying up
into the wee hours of the morning wacking away on the keyboard. (geese!
I'm getting too old for this!)
anyway, I digress..... I have attempted many different ways of porting this
program over to the IIgs emulator, but the file types that arrive never seem
to let me do anything with it. I've tried changing the Macintosh file type
and creator to TEXT pdos, but that does not seem to want to work.
Here is my request..... could someone take this listed program below and put
it on a FD image that Bernie ][ can recognize, and have the file that is on
the FD image be recognized as a BASIC program by ProDOS? Oh, yea, then
e-mail me the image......
Also, if this is possible, please send a note on the method that you used to
do this, so that in the future I will have this knowledge and I won't have
to bother anyone (again) for this function.
I Bow to Cupertino and give 3 Hail Wozes!
TIA,
Kos Semonski (TheRhino)
- ************************ BEGIN PROGRAM LISTING *************************
1 HOME: PRINT CHR$(4); "OPEN MESSAGE": PRINT CHR$(4); "READ MESSAGE"
2 ONERR GOTO 5
3 INPUT A$: PRINT A$: GOTO 3
5 FOR X = 1 TO 5000: NEXT X
9 PRINT "PRESS RETURN TO CONTINUE..."; : INPUT A$
10 HOME
30 CLEAR
50 D$ = CHR$ (4)
70 PRINT D$;"PR#3"
90 FOR X = 1 TO 80
110 PRINT CHR$(254); : NEXT
130 PRINT
150 PRINT " TRIGONOMETRY CALCULATOR "
170 PRINT " BY"
190 PRINT " KOS SEMONSKI"
210 PRINT
230 FOR X = 1 TO 80
250 PRINT CHR$(254); : NEXT
270 PRINT "ANGLE THATA ="
290 PRINT "HYPOT. ="
310 PRINT "AJACENT ="
330 PRINT "OPPOSITE ="
350 PRINT "SIN <0 ="
370 PRINT "COS <0 ="
390 PRINT "TAN <0 ="
400 PRINT "AREA ="
410 V = 8: H = 14: VTAB V: HTAB H
430 VTAB V: HTAB H
450 GET IN$
470 IF IN$ = CHR$ (10) AND V < 14 THEN V = V + 1: GOTO 430
490 IF IN$ = CHR$(11) AND V > 8 THEN V = V - 1: GOTO 430
510 IF IN$ = CHR$(13) THEN 550
530 GOTO 430
550 REM INPUT INFO
570 VTAB V: HTAB H: INPUT " VALUE "; VA$(V - 7)
590 VA(V - 7) = VAL(VA$(V - 7))
610 IF VA(1) > 360 THEN VA(1) = VA(1) / 360 : VA = INT(VA(1)): VA(1) =
VA(1) - VA: VA(1) = INT(VA(1) * 360 + .5): VTAB 8: HTAB 22: PRINT VA(1); "
"
630 IF VA(1) > 90 THEN VA(1) = VA(1) - 90: VTAB 8: HTAB 22: PRINT VA(1); "
": GOTO 630
650 IF VA(5) <> 0 AND VA(6) <> 0 OR VA(5) <> 0 AND VA(7) <> 0 OR VA(6) <>
0 AND VA(7) <> 0 THEN GOTO 10
670 IF VA(1) <> 0 AND VA(5) <> 0 OR VA(1) <> 0 AND VA(6) <> 0 OR VA(1) <>
0 AND VA(7) <> 0 THEN 10
690 FOR X = 1 TO 8 710 IF VA(X) < > 0 THEN C = C + 1
730 NEXT
750 IF VA(2) = 0 AND VA(3) = 0 AND VA(4) = 0 THEN C = 0: GOTO 430
770 IF C > 1 THEN 830
790 C = 0
810 GOTO 430
830 REM ENOUGH INFO TO CALCULATE
850 IF VA(1) <> 0 AND VA(5) = 0 THEN VA(5) = (VA(1) * 3.14159266# / 180):
VA(5) = SIN(VA(5)): VA(5) = INT(VA(5) * 1000): VA(5) = VA(5) / 1000
870 IF VA(1) <> 0 AND VA(6) = 0 THEN VA(6) = (VA(1) * 3.14159266# / 180):
VA(6) = COS(VA(6)): VA(6) = INT(VA(6) * 1000): VA(6) = VA(6) / 1000
890 IF VA(1) <> 0 AND VA(7) = 0 THEN VA(7) = (VA(1) * 3.14159266# / 180):
VA(7) = TAN(VA(7)): VA(7) = INT(VA(7) * 1000): VA(7) = VA(7) / 1000
910 IF VA(1) <> 0 THEN FOR X = 5 TO 7: VTAB (7 + X): HTAB 22: PRINT VA(X):
NEXT
930 IF VA(2) <> 0 AND VA(3) = 0 AND VA(6) <> 0 THEN VA(3) = VA(2) * VA(6):
VTAB (10): HTAB 22: PRINT VA(3)
950 IF VA(2) <> 0 AND VA(4) <> 0 AND VA(5) = 0 THEN VA(5) = VA(4) / VA(2):
VA(5) = INT(VA(5) * 1000): VA(5) = VA(5) / 1000: VTAB (12): HTAB 22: PRINT
VA(5)
970 IF VA(2) <> 0 AND VA(3) <> 0 AND VA(6) = 0 THEN VA(6) = VA(3) / VA(2):
VA(6) = INT(VA(6) * 1000): VA(6) = VA(6) / 1000: VTAB (13): HTAB 22: PRINT
VA(6)
990 IF VA(3) <> 0 AND VA(6) <> 0 AND VA(2) = 0 THEN VA(2) = VA(3) / VA(6):
VA(2) = INT(VA(2) * 1000): VA(2) = VA(2) / 1000: VTAB 9: HTAB 22: PRINT
VA(2)
1010 IF VA(3) <> 0 AND VA(7) <> 0 AND VA(4) = 0 THEN VA(4) = VA(3) *
VA(7): VA(4) = INT(VA(4) * 1000): VA(4) = VA(4) / 1000: HTAB 22: VTAB 11:
PRINT VA(4)
1030 IF VA(3) <> 0 AND VA(2) <> 0 AND VA(6) = 0 THEN VA(6) = VA(3) /
VA(2): VA(6) = INT(VA(6) * 1000): VA(6) = VA(6) / 1000: HTAB 22: VTAB 13:
PRINT VA(6)
1050 IF VA(3) <> 0 AND VA(4) <> 0 AND VA(7) = 0 THEN VA(7) = VA(4) /
VA(3): VA(7) = INT(VA(7) * 1000): VA(7) = VA(7) / 1000: VTAB 14: HTAB 22:
PRINT VA(7)
1070 IF VA(4) <> 0 AND VA(5) <> 0 AND VA(2) = 0 THEN VA(2) = VA(4) /
VA(5): VA(2) = INT(VA(2) * 1000): VA(2) = VA(2) / 1000: VTAB 9: HTAB 22:
PRINT VA(2)
1090 IF VA(4) <> 0 AND VA(7) <> 0 AND VA(3) = 0 THEN VA(3) = VA(4) /
VA(7): VA(3) = INT(VA(3) * 1000): VA(3) = VA(3) / 1000: VTAB 10: HTAB 22:
PRINT VA(3)
1110 IF VA(4) <> 0 AND VA(2) <> 0 AND VA(5) = 0 THEN VA(5) = VA(4) /
VA(2): VA(5) = INT(VA(5) * 1000): VA(5) = VA(5) / 1000: VTAB 12: HTAB 22:
PRINT VA(5)
1130 IF VA(4) <> 0 AND VA(3) <> 0 AND VA(7) = 0 THEN VA(7) = VA(4) /
VA(3): VA(7) = INT(VA(7) * 1000): VA(7) = VA(7) / 1000: VTAB 14: HTAB 22:
PRINT VA(7)
1150 IF VA(5) <> 0 AND VA(1) = 0 THEN VA(1) = ATN(VA(5) / SQR(-VA(5) *
VA(5) + .98)): VA(1) = VA(1) * 180 / 3.14159266#: VA(1) = INT(VA(1)): VTAB
8: HTAB 22: PRINT VA(1)
1170 IF VA(6) <> 0 AND VA(1) = 0 THEN VA(1) = -ATN(VA(6) / SQR(-VA(6) *
VA(6) + 1)) + 1.5708: VA(1) = VA(1) * 180 / 3.14159266#: VA(1) = INT(VA(1)):
VTAB 8: HTAB 22: PRINT VA(1)
1190 IF VA(7) <> 0 AND VA(1) = 0 THEN VA(1) = ATN(VA(7)) + .003: VA(1) =
VA(1) * 180 / 3.14159266#: VA(1) = INT(VA(1)): VTAB 8: HTAB 22: PRINT VA(1)
1210 IF VA(1) <> 0 AND VA(2) <> 0 AND VA(3) <> 0 AND VA(4) <> 0 AND VA(5)
<> 0 AND VA(6) <> 0 AND VA(7) <> 0 THEN 1250
1230 GOTO 830
1231 VTAB 15: HTAB 22: PRINT VA(3) * VA(4) / 2
1250 VTAB 15: HTAB 22: PRINT VA(3) * VA(4) / 2
1251 VTAB 17: HTAB 1
1270 PRINT "PRESS RETURN TO CALCULATE ANOTHER:";: GET AN$
1290 IF AN$ = CHR$ (13) THEN 10
1310 IF AN$ = CHR$(27) THEN PRINT D$; "PR#5"
1330 PRINT 1350 GOTO 1250
- ************************ END PROGRAM LISTING *************************