Mike’s Notebook: LARGE

See all articles from Sinc-Link v9 n3
Author(s): Michael DiRienzo
Publication: Sinc-Link
Pub Details: Sinc-Link v9 n3 (Volume 9, Issue 3)
Date: May/June 1991
Pages: 31

(NOTE: REPRINTING OR REPRODUCING [T]HIS COLUMN WITHOUT THE EXPRESSED [W]RITTEN PERMISSION OF THE AUTHOR IS HEREBY PROHIBITED. FOR PERMISSION, WRITE THE AUTHOR IN CARE OF THIS PUBLICATION.)

Here’s another easy-to-use command utility which quickly PRINTs a string of text at any size and at any pixel coordinate location. You will be able to use this utility in your own programs. The syntax follows: PRINT USR large;AT X,Y;W,H;”txt” The text at the end of the line can either by within quotes or use a string variable (A$…Z$). The variables “X” & “Y” are the column (0-255) and line (0-191) pixel location where you want the text to commence PRINTing. The coordinate 0,0 is at the upper left corner of the screen. The “W” variable is the letter width in terms of characters (1-32), and “H” is the height of the letter (1-24). Be sure to note the commas and [s]emicolons in the command syntax. If [yo]u make an error, you will get a “Nonsense in Basic” error. Note that the PAPER and INK command can be used within the PRINT statement in their usual way. FLASH also works. If your text runs off the screen, it will wrap around to the opposite side, so you’ll have to plan for text length and size. Be sure to RUN line 100 to initialize the CODE before RUNning for the first time, then use RUN thereafter. The CODE is not relocatable and is 350 bytes long. Have fun!

Happy TIMEXing…

“LARGE”

By Michael J. Di Rienzo

 10 BORDER 0: PAPER 0: INK 7: CLS : OUT 254,1: LET large=60400
20 LET d$="2068 LARGE print"
30 RANDOMIZE
40 LET w=INT (1+RND*2)
50 LET h=INT (1+RND*12)
60 LET x=INT (RND*(256-(w*8*16)))
70 LET y=INT (RND*(192-(h*8)))
80 LET i=INT (1+RND*6)
90 PRINT INK i;USR large;AT x,y;w,h;d$: PAUSE 100: CLS : GO TO 40
100 CLEAR 59399: LET t=0
110 FOR n=60400 TO 60749
120 READ a: POKE n,a: LET t=t+a
130 NEXT n: IF t<>31728 THEN PRINT FLASH 1;"Data Error!": PRINT "Recheck DATA lines": STOP
140 RUN
150 DATA 17,117,33,225,167,237,82,32,250,213,223,254,59,32,40,231,254,172,32,35,205,220,27,205,96,38,237,67,10,91,223,254,59,32,20,205,220,27,205,96,38,237,67,12,91,62,8,50,14,91,223,254,59,40,2,207,11,231,205,239,27,205,175,47,33,15,91,235,237,176,62,255,18
160 DATA 33,15,91,126,35,34,0,91,111,60,200,38,0,41,41,41,237,75,54,92,9,62,8,50,4,91,58,11,91,50,9,91,58,10,91,50,8,91,62,9,50,5,91,126,35,34,2,91,7,50,6,91,58,5,91,61,32,50,58,4,91,61,32,24,58,14
170 DATA 91,71,58,12,91,79,58,10,91,129,5,32,252,50,10,91,42,0,91,195,60,236,50,4,91,58,13,91,71,58,9,91,128,50,9,91,42,2,91,195,89,236,50,5,91,58,12,91,71,58,9,91,50,7,91,58,13,91,79,197,205,221,236,193,58,7
180 DATA 91,60,50,7,91,13,32,241,58,8,91,60,50,8,91,5,32,221,58,6,91,195,105,236,128,64,32,16,8,4,2,1,58,142,92,238,255,71,58,143,92,160,71,58,8,91,230,248,111,58,7,91,254,192,208,31,31,31,230,31,103,203,28,203,29,203,28,203,29,203,28,203,29,62,88,180
190 DATA 103,58,142,92,166,176,119,58,7,91,71,230,7,246,64,103,120,31,31,31,230,24,180,103,120,23,23,230,224,111,58,8,91,71,31,31,31,230,31,181,111,235,33,213,236,120,230,7,79,6,0,9,70,26,33,6,91,203,70,40,3,176,18,201,47,176,47,18,201

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.