A parts inventory for the ZX80 (4K ROM, 2K RAM) written for the CD4000 series of CMOS ICs. Line 1 is a long REM used as storage, one byte per part number from CD4000 to CD4480, so each count can be 0-255 and is saved with the program. RUN lists every part with a nonzero count (it takes at least 5 seconds), then asks for the number after CD4. It shows that part’s count; press L to list again or C to change it and enter the new count.
The article builds the data line by typing a REM, duplicating it with EDIT, POKEing out the NEWLINEs to merge three lines into one, duplicating again and POKEing 481 bytes to zero. The download has the data line already prepared and empty. The author suggests keeping two lists, one of parts in stock and one of parts used in circuits, and says the program can be adapted for any series of consecutively numbered items.
Published in Syntax May 1982 (IC Inventory).
Source Code
1 REM 480 BYTES FOR DATA 0123456789012345678901234567890
10 LET A=16426
15 PRINT,"CURRENT LIST"
20 FOR B=0 TO 480
25 IF PEEK(A+B)>0 THEN GO SUB 300
27 IF PEEK(A+B)>0 THEN PRINT,
30 NEXT B
40 PRINT
50 PRINT "FOR CMOS IC S"
60 PRINT "INPUT THE NUMBERS AFTER CD4--"
70 INPUT B
80 IF B>480 THEN PRINT "OVERRANGE"
85 PRINT
90 IF B>480 THEN GO TO 60
100 CLS
110 GO SUB 300
130 PRINT " IN STOCK"
140 PRINT "LIST OR CHANGE? L/C"
150 INPUT C$
155 CLS
160 IF C$="" THEN GO TO 45
165 IF C$="L" THEN GO TO 10
170 PRINT "TO WHAT?"
180 INPUT D
190 POKE (A+B),D
195 GO SUB 300
197 PRINT
200 GO TO 45
300 PRINT "CD4";
305 IF B<100 THEN PRINT "0";
310 IF B<10 THEN PRINT "0";
320 PRINT B,
330 PRINT PEEK(A+B);
350 RETURN
390 REM CMOS IC LIST 5/1/82Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.


