A DATA line maker, the opposite of POKEing code from DATA: give it a line number below 9900 and the start and end addresses of a block of memory (machine code, a font, text), and it builds a DATA line holding those bytes and enters it into your program with a 42-byte relocatable machine-code routine kept below BASIC at 24311. RUN line 9950 once to POKE the routine; it then RUNs and asks for the line number and addresses. Keep each block to about 150 bytes so the line stays easy to edit, and RUN 9900 again for the next block. Running it on its own code (24311 to 24352) should give back the bytes in line 9965.
Michael J. Di Rienzo simplified it from H.E. Weppler’s DATA line maker in the May 1988 newsletter of the Capital Area Timex Sinclair Users Group; the column came to Sinc-Link from the SWYM Newsletter.
Listing only: as printed it cannot be entered and run (line 9910 has no closing quote, line 9935 has RS( for R$(, line 9965 prints 19.14 for 19,14, and one DATA byte is illegible).
Published in Sinc-Link July-August 1992 (Mike’s Notebook: MKDATA).
Source Code
9900 INPUT "Input Line # to put DATA
9910 INPUT "Input CODE Start
9915 INPUT "Input CODE End
9920 LET R$=STR$ LL+CHR$ 228
9925 FOR N=SS TO EE
9930 LET R$=R$+STR$ PEEK N+","
9935 NEXT N: LET R$=RS( TO LEN R$-1)
9940 RANDOMIZE USR 24311
9945 STOP
9950 FOR N=24311 TO 24352
9955 READ M: POKE N,M: NEXT N
9960 RUN
9965 DATA 33,19,0,9,229,229,42,97,92,
9999 SAVE "MKDATA" LINE 9950Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.