LARGE

Developer(s): Michael DiRienzo
Date: 1991
Type: Program
Platform(s): TS 2068
Tags: Graphics

LARGE adds a command for printing text at any size and at any pixel position. After the code is installed, PRINT USR large;AT X,Y;W,H;"text" prints the text with its top-left corner at pixel column X (0–255) and line Y (0–191), each letter W characters wide and H characters high. The text can be a quoted string or a string variable, and PAPER, INK and FLASH work inside the PRINT as usual. The demonstration prints “2068 LARGE print” again and again at random sizes, places and colours.

LARGE was the type-in in Michael J. Di Rienzo’s “Mike’s Notebook” column in RMG Enterprises’ April 1991 UPDATE disk magazine, which also says this was the column’s last regular appearance. The listing here was typed from that column; its DATA total matches the column’s checksum, 31728.

Program Analysis

Structure

Lines 10–90 are the demonstration. Lines 100–140 clear memory to 59399, POKE the 350 bytes of DATA (lines 150–190) into 60400–60749 with a checksum test, and RUN the demonstration. As the column says, run line 100 first; this tape starts there automatically.

Notable Techniques

  • The routine is called as a function inside PRINT, so it can parse the rest of the statement itself: it checks for the AT token and the separators and reports “Nonsense in BASIC” on a syntax error.
  • Text that runs off the screen wraps around to the opposite side, so long strings need planning.

The code is not relocatable. The program was tested in ZEsarUX: the code installs, the checksum passes and the demonstration prints at random sizes.

Related Articles

Utility which PRINTS a string of text at any size and at any pixel coordinate location.
Here’s another easy-to-use command utility which quickly PRINTs a string of text at any size and at any pixel coordinate location.

Related Content

Image Gallery

Source Code

   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.