Algebra

Authors

Publication

Pub Details

Date

Pages

See all articles from SyncWare News v1

Here’s a neat program that Bill has allowed us to print, hoping that some of you will avail yourselves of his other programs. Drop him a line at the above address for his current product list.

This program, like all Soft-way programs, is tightly coded and numbered consecutively. You may wish to re-number using a toolkit (or simply entering each line number * 10) if like me you prefer more elbow room. (No computed GOTO/GOSUBs so toolkits work fine). It allows you to enter up to 20 formulas, including transcendental functions (LN, SIN, etc.) and bracketing. The dependent variable (on the left) is two characters, the independent variables must be one character. Work with any formula, then DISPLAY updates each before showing the values of the dependents. (You can’t put dependent variables over to the right side directly, e.g. in the example you can’t use FQ = 1/PR; see what you can come up with to do this if you’re interested, It’s trickier than it looks!)

The best way to learn to use ALGEBRA is to follow Bill’s example below. It solves the 555 timer IC in the “astable multi” mode (pulse generator). Pretty nifty, no?

0 REM ALGEBRA (C) SOFTWAY 83
1 GOTO 12
2 DIM A$(20,29)
3 LET C$=""
4 CLS
5 PRINT TAB 5;"MAKE DESIRED CHANGES :"
6 FOR X=1 TO 20
7 PRINT AT X+1,0;X;" ";A$(X)
8 INPUT B$
9 IF B$<>"" THEN LET A$(X)=B$
10 PRINT AT X+1,0;X;" ";A$(X)
11 NEXT X
12 CLS
13 FOR X=1 TO 20
14 PRINT AT X,0;X;" ";A$(X)
15 NEXT X
16 PRINT AT 21,2;"SELECT DESIRED EQUATION :";
17 INPUT X
18 CLS
19 PRINT AT 4,2;A$(X)
20 FOR Y=4 TO 29
21 IF A$(X,Y)>="A" AND A$(X,Y)<="Z" THEN GOSUB 32
22 NEXT Y
23 IF A$(X,3)="=" THEN PRINT ,,,,TAB 5;A$(X, TO 2);" = ";VAL A$(X,4 TO )
24 PRINT AT 21,0;"DISPLAY REPEAT LIST CHANGE SAVE"
25 PAUSE 10E3
26 IF INKEY$="D" THEN GOTO 49
27 IF INKEY$="S" THEN GOTO 48
28 IF INKEY$="R" THEN GOTO 18
29 IF INKEY$="L" THEN GOTO 12
30 IF INKEY$="C" THEN GOTO 3
31 GOTO 24
32 PRINT ,,TAB 7;A$(X,Y);" = ?";
33 INPUT B$
34 GOTO 44
35 IF B$="" THEN GOTO 33
36 POKE (PEEK 16425+256*PEEK 16426+5),CODE A$(X,Y)
37 LET C=VAL B$
38 PRINT VAL B$
39 LET C$=C$+A$(X,Y)
40 RETURN
41 POKE (PEEK 16425+256*PEEK 16426+5),CODE C$(0)
42 PRINT R
43 RETURN
44 FOR O=1 TO LEN C$
45 IF C$(O)=A$(X,Y) AND B$="" THEN GOTO 41
46 NEXT O
47 GOTO 35
48 SAVE "ALGEBRA"
49 CLS
50 FOR O=1 TO 20
51 IF A$(O,3)="=" THEN PRINT A$(O, TO 3);" ";VAL A$(O,4 TO 29)
52 NEXT O
53 GOTO 24

Products

 

Downloadable Media

 
Scroll to Top