--- title: "Formulary" id: 54527 type: "computer_media" slug: "formulary" url: "http://localhost/computer_media/formulary/" markdown_url: "http://localhost/computer_media/formulary.md" published_at: "2024-06-02T16:28:09+00:00" modified_at: "2026-03-30T21:42:46+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2024/06/Formulary-1.png" excerpt: "A complete darkroom reference program stores seven black-and-white film developer formulas with chemical weights and development times, all navigated from a single menu." category: - name: "Archived Media" slug: "archived-media" taxonomy: "category" url: "http://localhost/category/archived-media/" post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "TS 2068" slug: "ts2068" taxonomy: "post_tag" url: "http://localhost/tag/ts2068/" model: - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" indiv: - name: "Bob Howard (WA6DLI)" slug: "bob-howard" taxonomy: "indiv" url: "http://localhost/indiv/bob-howard/" genre: - name: "Photography" slug: "photography" taxonomy: "genre" url: "http://localhost/type/photography/" media_contents: - id: 51213 title: "CATS Library Tape 3" type: "computer_media" url: "http://localhost/computer_media/cats-library-tape-3/" media_type: "Program" programmers: - name: "Bob Howard (WA6DLI)" slug: "bob-howard" taxonomy: "indiv" url: "http://localhost/indiv/bob-howard/" mediadate: "198x" images: - url: "http://localhost/wp-content/uploads/2024/06/Formulary-1.png" - url: "http://localhost/wp-content/uploads/2024/06/Formulary-2.png" media_type_tags: "Photography" --- # Formulary This program is a darkroom chemistry reference tool that stores and displays photographic developer formulas for black-and-white film processing. It maintains string arrays for developers, accelerators, restrainers, and preservatives, then presents a menu of seven processing options including Delagi No. 8, divided D-76, Beers two-solution paper developer, and Ansel Adams Zone System HC-110 times. Each formula subroutine prints chemical names drawn from the named arrays alongside gram weights and development times, then waits for a keypress using PAUSE 4E4 before returning to the menu. Lines 2–4 indicate a machine code loader routine: CLEAR 64715 protects high RAM, LOAD “”CODE brings in a binary block, and RANDOMIZE USR 64719 executes it, likely providing the colored splash screen support used in line 7010. *** ## Program Analysis ### Program Structure The program opens at line 1 with `GO TO 5`, bypassing lines 2–4 on a normal run. Lines 2–4 form a machine code bootstrap sequence: `CLEAR 64715` reserves high memory, `LOAD ""CODE` loads a binary block, and `RANDOMIZE USR 64719` executes it. Line 5 calls subroutine 7000, which dimensions the string arrays and displays a splash screen, then returns to line 10 to populate the arrays. The main menu runs from lines 54–100. User input is taken at line 84 and dispatched to one of seven formula subroutines via consecutive `IF … THEN GO SUB` tests. Each subroutine ends with `RETURN`, bringing execution back after the dispatching line and falling through to the next test — a common BASIC pattern since there is no `ELSE`. Lines 98–100 attempt to loop back to the menu for unrecognized input using the label `50`, which does not exist as a line number; in practice the `GO TO 50` at line 100 would jump to line 54 (the nearest line at or after 50), since the interpreter selects the first line with a number ≥ the target. ### Array Initialization All string arrays are dimensioned in subroutine 7000 at line 7000 before any elements are assigned. The arrays and their roles are: - `D$(7,20)` — developer agents (Elon/Metol, Glycin, Amidol, p-Amino Phenol, Phenidone, p-Phenylene Diamine, Hydroquinone) - `A$(4,20)` — accelerators/alkalis (Borax, Sodium Carbonate, Kodalk, Sodium Hydroxide) - `R$(3,20)` — restrainers (Potassium Bromide, “To Be Found”, Benzadrol) - `P$(2,20)` — preservative, with only `P$(1)` assigned (“Sodium Sulfite”) Note that `P$` is dimensioned for two entries but only one is ever populated; `P$(2)` is never set. ### Formula Subroutines | Line | Formula | Film/Paper Target | | --- | --- | --- | | 500 | Delagi No. 8 (Phenidone-based) | Kodak Tech Pan, 40 ASA | | 600 | Modified Stockler two-bath | Tri-X / HP-5 | | 700 | Edwal FG-7 two-bath | Tech Pan 2415 | | 800 | Divided D-76 | General purpose | | 900 | Two-bath Phenidone | General purpose | | 1000 | Beers two-solution variable-contrast | Paper printing | | 1300 | Ansel Adams Zone System HC-110 | Multiple films, 35mm and 120 | Subroutine 5000 is a secondary reference for Tech Pan in Paterson Acutol and Rodinol, called from the end of the Tech Pan/FG-7 subroutine (line 598) rather than from the main menu. ### Notable Techniques - **PAUSE 4E4** — `4E4` equals 40,000 frames (~11 minutes at 50 Hz), used throughout as an indefinite wait for a keypress before clearing the screen and returning. - **String arrays as a data store** — chemical names are stored in fixed-length string arrays and reused across multiple subroutines, reducing repeated literal strings and simplifying edits. - **Inline branch via subroutine** — the Tech Pan/FG-7 subroutine at line 763 conditionally jumps to line 1500 (Pan-X/Rodinol table) via `GO TO` rather than `GO SUB`, meaning that path exits through `GO TO 50` at line 1590 instead of `RETURN`, bypassing the normal menu return flow. - **Concatenated PRINT items** — many lines use comma-separated expressions in a single `PRINT` statement to place chemical names and quantities side by side using the tab-stop columns. - **FLASH 1 splash screen** — line 7012 uses `FLASH 1` to animate the author credit, paused for approximately four seconds (200 frames) by line 7015. ### Bugs and Anomalies - **Duplicate assignments** — `R$(1)` (“Potassium Bromide”) is assigned at both line 21 and line 53, and `P$(1)` (“Sodium Sulfite”) at both lines 52 and 550’s implicit reference. The duplication at line 53 is harmless but redundant. - **Logic error at lines 98–100** — the condition `Q$<>"1" OR Q$<>"2"` is a tautology: for any value of `Q$`, at least one of the two inequalities is always true, so the `CLS` and `GO TO 50` execute unconditionally after all the `GO SUB` dispatches have been attempted. The intent was presumably `AND` rather than `OR`. - **Missing line 50** — `GO TO 50` targets a non-existent line; the interpreter will jump to line 54, which is the `CLS` at the top of the menu, so the behavior is functionally correct. - **Beers table misprint** — line 1170 prints `SOL. B 0 1 2 3 4 5 14`; the last value should conventionally be `6`, making the total 16 as shown in line 1190. This appears to be a data entry error. - **Line 110 STOP unreachable** — after lines 98–100 always branch or loop, line 110 (`STOP`) is never reached in normal execution. ### Save Line Line 8000 saves the program with `SAVE "formulary" LINE 7`, causing it to auto-run from line 7 (the initialization subroutine call) when loaded, bypassing the machine code loader at lines 2–4. ## Source Code ``` 1 GO TO 5 2 CLEAR 64715 3 LOAD ""CODE 4 RANDOMIZE USR 64719 5 GO SUB 7000 10 LET D$(1)="ELON/METOL" 11 LET D$(2)="GLYCIN" 12 LET D$(3)="AMIDOL" 13 LET D$(4)="P-AMINO PHENOL" 14 LET D$(5)="PHENIDONE" 15 LET D$(6)="P-PHENYLENE DIAMINE" 16 LET D$(7)="HYDROQUINONE" 17 LET A$(1)="BORAX" 18 LET A$(2)="SODIUM CARBONATE" 19 LET A$(3)="KODALK" 20 LET A$(4)="SODIUM HYDROXIDE" 21 LET R$(1)="POTASSIUM BROMIDE" 22 LET R$(2)="TO BE FOUND" 24 LET R$(3)="BENZADROL" 52 LET P$(1)="SODIUM SULFITE" 53 LET R$(1)="POTASSIUM BROMIDE" 54 CLS 55 PRINT "SELECT BY NUMBER THE" 58 PRINT " DEVELOPER APPLICATION" 60 PRINT 65 PRINT 70 PRINT "1. CONTINUOUS TONE ON TECH PAN FILM." 72 PRINT 74 PRINT "2. TWO-BATH FINE-GRAIN TRI-X OR HP-5" 75 PRINT 76 PRINT "3. USING EDWAL FG-7 FOR TECH PAN" 77 PRINT 78 PRINT "4.TWO-BATH D-76 DEVELOPER" 79 PRINT 80 PRINT "5. LEICA FOTOGRAFIE 1968-1","TWO-BATH ";D$(5) 81 PRINT 82 PRINT "6. BEERS 2-SOLUTION PAPER","DEVELOPER (VAR. CONTRAST) " 83 PRINT "7. ZONE SYSTEM USE KODAK HC-110" 84 INPUT Q$ 85 IF Q$="1" THEN GO SUB 500 90 IF Q$="2" THEN GO SUB 600 91 IF Q$="3" THEN GO SUB 700 92 IF Q$="4" THEN GO SUB 800 94 IF Q$="5" THEN GO SUB 900 95 IF Q$="6" THEN GO SUB 1000 97 IF Q$="7" THEN GO SUB 1300 98 IF Q$<>"1" OR Q$<>"2" THEN CLS 100 IF Q$<>"1" OR Q$<>"2" THEN GO TO 50 110 STOP 500 CLS 510 PRINT 520 PRINT TAB 12;"DELAGI NO. 8" 530 PRINT TAB 7;"(EXPOSE FILM AT 40 ASA)" 535 PRINT 540 PRINT "WATER (AT 38C/100F).......500 ML" 550 PRINT ;P$(1);".......25 G." 560 PRINT ;D$(5);"......1.4 G." 570 PRINT A$(3);"OR ",A$(1);"......0.8 G." 580 PRINT ;R$(3);"* ONE KODAK ANTI-FOG NO.1 TABLET" 590 PRINT "WATER TO MAKE ...........1000 ML" 591 PRINT 592 PRINT 593 PRINT "USE AT 20C, 15 MIN. WITH INTER- MITTENT AGITATION." 594 PRINT "ONE-SHOT, USE ONCE AND DISCARD. FIX, WASH AND DRY AS USUAL." 595 PRINT "* OR USE 3.0 ML EDWAL ORTHAZITE PRESS ANY KEY TO CONTINUE" 596 PAUSE 4E4 597 CLS 598 GO SUB 5000 599 RETURN 600 CLS 605 PRINT TAB 5;" TRI-X MODIFIED STOCKLER" 610 PRINT 615 PRINT "BATH A:" 620 PRINT "WATER (90F)..............750 ML" 625 PRINT D$(1);".....7.0 G." 630 PRINT P$(1);".....75 G." 632 PRINT "WATER TO MAKE...........1000 ML" 635 PRINT 640 PRINT "BATH B:" 650 PRINT "WATER...................1000 ML" 655 PRINT A$(1),A$(3);"....10.0 G." 660 PRINT 665 PRINT "DEVELOP IN BATH A:5 MIN./IN BATH B: 5 MIN. TEMP. 20C TO 25C, NO RINSE BETWEEN A AND B, FIX,WASH, AND DRY AS USUAL." 666 PRINT 668 PRINT TAB 3;"PRESS ANY KEY TO CONTINUE" 670 PAUSE 4E4 675 CLS 680 RETURN 700 CLS 705 PRINT TAB 6;"TECHPAN 2415 IN EDWAL FG-7" 710 PRINT "FILL TWO KODAK FILM CANS:" 715 PRINT TAB 5;"ONE WITH FG-7 STOCK" 720 PRINT TAB 5;"ONE WITH ";P$(1) 730 PRINT "ADD ABOVE TO 16 OZ. WATER"'" AND DISSOLVE." 735 PRINT "LOAD TANK, PRE-SOAK 1 MIN IN WATER AT 20C/68F" 740 PRINT "AT 20C/68F, DEVELOP:" 750 PRINT TAB 5;"FOR ASA 32: 2 MIN" 755 PRINT TAB 5;"FOR ASA 64; 3 MIN" 757 PRINT 760 PRINT "AGITATE CONT. IN PRE-SOAK AND FIRST 15 SEC. IN DEV. AND 5 SEC. EVERY 30 SEC. FROM THEN ON." 761 PRINT "FOR PAN-X AND RODINOL, ENTER R , TO CONTINUE, ENTER C " 762 INPUT Q$ 763 IF Q$="R" THEN GO TO 1500 765 CLS 766 RETURN 800 CLS 802 PRINT TAB 10;"DIVIDED D-76 " 803 PRINT 805 PRINT "SOLUTION A :" 807 PRINT TAB 5;"WATER AT 125F, 750 ML:" 810 PRINT TAB 5;D$(1);"2.0 G." 815 PRINT TAB 5;P$(1);"100 G." 820 PRINT TAB 5;D$(7);"5.0 G." 825 PRINT TAB 5;R$(1);"1.0 G." 830 PRINT TAB 5;"WATER TO MAKE 1 LITER" 835 PRINT 840 PRINT "SOLUTION B :" 845 PRINT TAB 5;A$(3);"50 G." 850 PRINT TAB 5;"WATER 1000 ML" 860 PRINT 870 PRINT "AT 65F TO 85F,DEVELOP 3 MIN. IN A THEN B WITH NO PRE-SOAK OR STOP BATH, THEN FIX, WASH-DRY AS USUAL. "; 885 PRINT "FOR AVAILABLE LIGHT:",D$(1);" 4.0 G. ",D$(7);" 7.5 G." 886 PRINT "MAY BE RE-USED FOR 6-MONTHS"," PRESS ANY KEY TO RETURN" 888 PAUSE 4E4 889 CLS 890 RETURN 900 CLS 905 PRINT TAB 8;"TWO-BATH ";D$(5) 910 PRINT 915 PRINT "SOLUTION A :" 917 PRINT TAB 4;"WATER (100F) 750 ML" 920 PRINT TAB 4;P$(1);"50 G." 925 PRINT TAB 4;D$(7);" 5 G." 930 PRINT TAB 4;D$(5);".3 G." 935 PRINT TAB 4;R$(1);".5 G." 940 PRINT TAB 4;"WATER TO MAKE 1 LITER" 945 PRINT 950 PRINT "SOLUTION B :" 952 PRINT TAB 4;"WATER (100F) 1 LITER" 955 PRINT TAB 4;A$(3);"20 G." 960 PRINT TAB 4;"BORIC ACID 10 G." 970 PRINT TAB 4;R$(1);".5 G." 975 PRINT 980 PRINT "DEV. IN A & B 3 MIN. AT 20C/68F."'"NO PRE-SOAK OR RINSE BETWEEN A&B." 982 PRINT TAB 3;"PRESS ANY KEY TO RETURN" 985 PAUSE 4E4 987 CLS 990 RETURN 1000 CLS 1003 PRINT "SOLUTION A :(BEERS 7-CONTRAST)" 1005 PRINT "WATER..............750 ML" 1010 PRINT D$(1);"8.0 G." 1020 PRINT P$(1);"23.0 G." 1030 PRINT A$(2);"23.4 G." 1040 PRINT R$(1);"1.1 G." 1050 PRINT "WATER TO MAKE.....1000 ML" 1055 PRINT 1060 PRINT "SOLUTION B :" 1070 PRINT "WATER..............750 ML" 1080 PRINT D$(7);"8.0 G." 1090 PRINT P$(1);"23.0 G." 1100 PRINT A$(2);"27.0 G." 1110 PRINT R$(1);"2.2 G." 1120 PRINT "WATER TO MAKE.....1000 ML" 1130 PRINT TAB 11;"LOW";TAB 20;"NORM.";TAB 29;"HI" 1140 PRINT "CONTRAST 1 2 3 4 5 6 7" 1150 PRINT ".(PARTS)......................." 1160 PRINT "SOL. A 8 7 6 5 4 3 2" 1170 PRINT "SOL. B 0 1 2 3 4 5 14" 1180 PRINT "WATER 8 8 8 8 8 8 0" 1190 PRINT "TOTAL 16 16 16 16 16 16 16" 1200 PAUSE 4E4 1205 CLS 1210 RETURN 1300 CLS 1302 PRINT "ANSEL ADAM'S ZONE SYSTEM: HC-110" 1305 PRINT 1310 PRINT TAB 2;"FILM";TAB 10;"E.I.";TAB 16;"DEVELOPING TIME" 1320 PRINT "(DILUTED TO ) 1:7 1:15" 1325 PRINT 1330 PRINT "35MM:" 1340 PRINT "PAN F";TAB 10;"20";TAB 17;"--";TAB 28;"7.00" 1350 PRINT "PAN-X";TAB 10;"20";TAB 17;"--";TAB 28;"7.75" 1360 PRINT "FP4";TAB 10;"80";TAB 17;"4.75";TAB 27;"10.75" 1365 PRINT "TRI-X";TAB 9;"200";TAB 17;"6.75";TAB 27;"15.00" 1370 PRINT "120 ROLL:" 1380 PRINT "PAN-X";TAB 10;"20";TAB 17;"--";TAB 28;"8.50" 1390 PRINT "FP4";TAB 10;"64";TAB 17;"5.00";TAB 27;"11.00" 1400 PRINT "TRI-X PROF.";TAB 9;"200";TAB 17;"5.50";TAB 27;"12.00" 1410 PRINT 1420 PRINT "ALL FILMS DEVELOPED AT 68F/20C. AGITATION IS 5 SEC. EVERY 30 SEC E.I. IS TESTED FILM SPEED FOR DIFFUSION ENLARGER. IF CONDENSER-SOURCE REDUCE DEV. TIME 20 PERCENT" 1430 PAUSE 4E4 1435 CLS 1440 RETURN 1500 CLS 1510 PRINT "KODAK PAN-X IN RODINOL" 1520 PRINT 1530 PRINT "SUB. CONTRAST E.I. DILUTE TIME" 1540 PRINT 1550 PRINT TAB 4;"HIGH";TAB 15;" 8";TAB 20;"1:100";TAB 27;"5 MIN " 1560 PRINT TAB 4;"NORMAL";TAB 15;"16";TAB 20;"1:50";TAB 27;"5 MIN " 1570 PRINT TAB 4;"LOW";TAB 15;"32";TAB 20;"1:50";TAB 27;"7 MIN " 1580 PRINT "DEVELOPING TIME FOR 20C/68F"," BILL PIERCE POPULAR PHOTOGRAPHY 8/76" 1582 PRINT TAB 3;"PRESS ANY KEY TO CONTINUE" 1585 PAUSE 4E4 1587 CLS 1590 GO TO 50 1600 STOP 5000 PRINT 5010 PRINT AT 2,10;"KODAK TECHPAN 2415 IN PATERSON ACUTOL (ASA 50 RATING)" 5020 PRINT 5030 PRINT "DILUTE ACUTOL 1 PART CONCENTRATE TO 20 PARTS WATER" 5035 PRINT 5040 PRINT "DEVELOP AT 20C/68F 10 MIN. FOR COND. ENL. OR 13 MIN. FOR","DIFFUSION." 5045 PRINT 5050 PRINT "AGITATE ONE INVERSION PER MINUTE " 5055 PRINT 5060 PRINT "SHORT-STOP, FIX, AND WASH AS USUAL" 5063 PRINT TAB 3;"PRESS ANY KEY TO CONTINUE" 5065 PAUSE 4E4 5067 CLS 5070 PRINT TAB 3;"KODAK TECHPAN IN RODINOL" 5075 PRINT TAB 3;"************************" 5080 PRINT 5081 PRINT "EXPOSE AT 25 ASA FOR RODINOL" 5082 PRINT 5083 PRINT 5085 PRINT "DILUTE RODINOL....1:125" 5090 PRINT 5095 PRINT "DEVELOP AT 68F/20C"," FOR 6 MINUTES" 6000 PRINT 6010 PRINT "AGITATE 5 SECONDS","EACH 30 SECONDS" 6015 PRINT 6020 PRINT "SHORT-STOP, FIX, AND WASH " 6030 PRINT 6040 PRINT "PRESS ANY KEY TO RETURN" 6050 PAUSE 4E4 6055 CLS 6060 RETURN 7000 DIM d$(7,20): DIM a$(4,20): DIM p$(2,20): DIM R$(3,20) 7010 BORDER 1: PAPER 1: INK 7: CLS 7012 PRINT AT 7,10; FLASH 1;"FROM THE DARKROOM of"'" BOB HOWARD WA6DLI" 7015 PAUSE 200: FLASH 0 7020 RETURN 8000 SAVE "formulary" LINE 7 ```