--- title: "Ohm’s Law (Syntax)" id: 76544 type: "computer_media" slug: "ohms-law-syntax" url: "http://localhost/computer_media/ohms-law-syntax/" markdown_url: "http://localhost/computer_media/ohms-law-syntax.md" published_at: "2026-11-11T08:02:28+00:00" modified_at: "2026-11-11T08:02:28+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2026/11/ohms-law-syntax-1.png" excerpt: "An Ohm's law helper for the ZX81: work out the resistor that drops a voltage, the wattage, or the current, from the values you know." post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "TS 1000" slug: "ts1000" taxonomy: "post_tag" url: "http://localhost/tag/ts1000/" - name: "ZX81" slug: "zx81" taxonomy: "post_tag" url: "http://localhost/tag/zx81/" model: - name: "Sinclair ZX81" slug: "zx81" taxonomy: "model" url: "http://localhost/model/zx81/" - name: "Timex/Sinclair 1000" slug: "ts-1000" taxonomy: "model" url: "http://localhost/model/ts-1000/" indiv: - name: "Blase Sanzone" slug: "blase-sanzone" taxonomy: "indiv" url: "http://localhost/indiv/blase-sanzone/" genre: - name: "Electronics" slug: "electronics" taxonomy: "genre" url: "http://localhost/type/electronics/" media_type: "Program" programmers: - name: "Blase Sanzone" slug: "blase-sanzone" taxonomy: "indiv" url: "http://localhost/indiv/blase-sanzone/" download_url: "https://archive.org/download/timex-sinclair-software-archive/Ohm%27s%20Law%20%281982%29%28Sanzone%2C%20Blase%29%28TS1000%29%28US%29%28Program%29.zip" mediadate: "1982" images: - url: "http://localhost/wp-content/uploads/2026/11/ohms-law-syntax-1.png" - url: "http://localhost/wp-content/uploads/2026/11/ohms-law-syntax-2.png" article_media: - id: 19342 title: "Ohm’s Law" type: "article" url: "http://localhost/article/ohms-law/" media_type_tags: "Electronics" license: false --- # Ohm’s Law (Syntax) RUN shows a menu: press 1 for the resistance (OHMS) that drops a given voltage at a given current, 2 for the wattage (P=I**2*R), or 3 for the current. Each choice shows its formula and asks for the two values it needs; the program then prints the result in a sentence, then asks whether to go on (Y) or stop (N). It needs 16K. The printed Syntactic Sum, 19638, is the same as the one printed for the Syntactic Sum Loader two issues earlier, so it is probably a printing error. Published in Syntax October 1982 ([Ohm’s Law](https://timexsinclair.com/article/ohms-law/)). ## Source Code ``` 5 CLS 10 PRINT AT 0,10;"OHMS LAW" 15 PRINT 20 PRINT "YOU CAN CALCULATE THE FOLLOWING:" 25 PRINT "--------------------------------" 30 PRINT "1 RESISTANCE (OHMS)" 35 PRINT "2 WATTS" 40 PRINT "3 CURRENT (AMPS)" 45 PRINT 50 PRINT "SELECT BY ENTERING A NUMBER" 60 PAUSE 40000 70 LET K$=INKEY$ 80 IF K$<"1" OR K$>"3" THEN GOTO 70 90 GOTO VAL K$*100 100 CLS 105 PRINT "THE FORMULA FOR CALCULATING RESISTANCE IS: R=E/I" 110 PRINT 115 PRINT "E=VOLTAGE DROP(AVAILABLE-NEEDED)";"I=CURRENT (IN AMPS)" 120 PRINT "********************************" 125 PRINT "ENTER VOLTAGE DROP" 130 INPUT E 135 PRINT AT 6,20;E 140 PRINT "ENTER CURRENT IN AMPS" 145 INPUT I 150 PRINT AT 7,23;I 155 LET R=E/I 160 LET X=R 165 GOSUB 400 170 LET R=X 175 PRINT AT 10,0;"A ";R;" OHM RESISTOR IS NEEDED TO","REDUCE THE AVAILABLE VOLTAGE BY",E;" VOLT(S) TO A DEVICE DRAWING",I;" AMP(S)." 180 GOTO 500 200 CLS 205 PRINT "THE FORMULA FOR CALCULATING WATTAGE IS: P=I**2*R" 210 PRINT 215 PRINT "I**2=CURRENT,IN AMPS, SQUARED","R=RESISTANCE IN OHMS" 220 PRINT "********************************" 225 PRINT "ENTER THE CURRENT" 230 INPUT I 235 PRINT AT 6,18;I 240 PRINT "ENTER RESISTANCE IN OHMS" 245 INPUT R 250 PRINT AT 7,25;R 255 LET P=I**2*R 260 LET X=P 265 GOSUB 400 270 LET P=X 275 PRINT AT 10,0;"A ";R;" OHM RESISTOR RATED AT ",P;" WATTS IS NEEDED BY A","DEVICE DRAWING ";I;" AMPS." 280 GOTO 500 300 CLS 305 PRINT "THE FORMULA FOR CALCULATING CURRENT IS: I=E/R" 310 PRINT 315 PRINT "E=VOLTAGE DROP",,"R=RESISTANCE IN OHMS" 320 PRINT "********************************" 325 PRINT "ENTER THE VOLTAGE DROP" 330 INPUT E 335 PRINT AT 6,23;E 340 PRINT "ENTER RESISTANCE IN OHMS" 345 INPUT R 350 PRINT AT 7,25;R 355 LET I=E/R 360 LET X=I 365 GOSUB 400 370 LET I=X 375 PRINT AT 10,0;"THE MAXIMUM CURRENT IS ";I;" AMPS","USING A ";R;" OHM RESISTOR TO","DROP THE AVAIABLE VOLTAGE BY ",E;" VOLTS" 380 GOTO 500 400 LET X=(INT (10*(X+(.05))))/10 405 RETURN 500 PRINT AT 15,0;"DO YOU WANT TO CONTINUE Y/N" 505 PAUSE 10000 510 IF INKEY$="Y" THEN GOTO 5 515 IF INKEY$="N" THEN STOP ```