MediaWiki:Sitenotice:
2025-12-29: I have restored the wiki to a backup from the end of November. Starting in September 2025, accesses went form the 800MB-1.2GB range per month to 26GB in September, 42GB in October, and 70GB in November with most accesses originating from China. As soon as I realized what was causing all the access problems in November, I shut it down (it had reached 36GB by then) behind a password/login screen. The database had gotten corrupted, and I tried a restore from just before the spike in access but that didn't work. Thus, end of November. I still have the other daily backups so if there were any important additions in December, let me know and maybe they can be recovered. - Allen H.

OHMSLAW

From CoCopedia - The Tandy/Radio Shack Color Computer Wiki
Jump to navigation Jump to search
100 CLEAR 500: CLS: PRINT@11,"OHM'S LAW"
110 PRINT@64,"SELECT ONE OF THE FOLLOWING:"
120 PRINT@96, "1. GIVEN E,R, FIND I (I=E/R)"
130 PRINT@128,"2. GIVEN E,I, FIND R (R=E/I)"
140 PRINT@160,"3. GIVEN R,I, FIND E (E=I*R)"
150 PRINT@192,"WHICH ONE";: INPUT A$
160 IF (VAL(A$)>0) AND (VAL(A$)<4) THEN 190
170 PRINT@448,"INVALID SELECTION--TRY AGAIN"
180 FOR I=1 TO 300: NEXT I: GOTO100
190 REM - PRINT FIGURE
200 B$=CHR$(140): C$=CHR$(207)
210 D$=CHR$(204): E$=CHR$(195)
220 L1$=B$+B$+BS+B$
230 L2$=C$+CS+C$+C$+E$+E$+E$+E$+C$+C$+C$+C$
240 L3$=C$+C$+C$+C$+C$+C$+C$+C$+C$+C$+C$+D5+B$
250 L4$=C$+C$+C$+C$+C$+C$+C$+C5+C5+C$+D$+D$+B5+B$
260 L5$=C5+C5+C$+C$+C$+C$+C$+C$+C$+C$+C$+C$
270 PRINT@301,L1$;: PRINT@329,L2$;
280 PRINT@361,L3$;: PRINT@393,L4$;
290 PRINT@425,L5$;
300 IF A$="2" THEN 340
310 PRINT@266,"R(OHMS)";: INPUT R$
320 IF (VAL(R$)>0) AND (VAL(R$)<99999999) THEN R=VAL(R$): GOTO340
330 PRINT@266,"": GOTO310
340 IF A$="3" THEN 390
350 PRINT@347,"E";: PRINT@376,"(VOLTS)";
360 PRINT@408,"";: INPUT E$
370 IF (VAL(E$)>0) AND (VAL(E$)<99999) THEN E=VAL(E$): GOTO390
380 PRINT@409," ";: GOTO360
390 IF AS="1" THEN 430
400 PRINT@454,"I(AMPERES)";: INPUT IS
410 IF (VAL(I$)>0) AND (VAL(I$)<99999999) THEN I=VAL(I$): GOTO46O
420 PRINT@454,"": GOTO400
430 I=E/R: I$=STR$(I)
440 PRINT@454,"I(AMPERES)";MID$(I$,2,14)
450 GOTO530
460 IF A$="3" THEN 500
470 R=E/I: R$=STR$(R)
480 PRINT@266,"R(OHMS)";MIDS(R$,2,13)
490 GOTO530
500 E=I*R: E$=STR$(E)
510 PRINT@347,"E";: PRINT@376,"(VOLTS)"
520 PRINT@408,MID$(E$,2,6)
530 PRINT@480,"PRESS ANY KEY TO CONTINUE";: A$=INKEY$
540 IF A$="" THEN 530
550 GOTO100