80 FOR X=0 TO 255
90 LET Y=128+120*SIN(X/128*PI)
100 GOSUB 9980
110 NEXT X
120 GOTO 9980
130 NEXT X
140 GOTO 9988
9980 REM PLOTS (X,Y) INTO A$
9981 IF X<0 OR X>255 OR Y<0 OR Y>255 THEN RETURN
9982 LET C=1+INT(X/8)
9983 LET R=256-INT Y
9984 POKE 16526, CODE A$(C,R)
9985 POKE 16527,2**(8*C-INT X-1)
9986 LET A$(C,R)=CHR$(USR 16514)
9987 RETURN
9988 REM PRINTS A$ 8 LINES AT A TIME
9989 FOR I=0 TO 246 STEP 8
9990 FOR J=1 TO 32
9991 FOR K=1 TO 8
9992 POKE 32255+K+8*(J-1), CODE A$(J,K+I)
9993 NEXT K
9994 NEXT J
9995 FOR H=0 TO 31
9996 POKE 16444+H,H
9997 NEXT H
9998 LET HPRINT=USR 31744
9999 NEXT I
LPRINT
A printing error occurs when using LPRINT on decimal numbers in the range .00001
to .0099999999.
The leading zeroes, except the first, print as various non-numeric characters instead of zero.
This is overcome by converting the number you want to LPRINT into a string. Although the string
looks the same, it will print correctly because the routines inside the computer treats strings and
numbers differently. Alternatively PRINT on the TV screen then use COPY.
Suggested programming alternatives
Example 1
Replace: 100 LPRINT A
With:
100 LET A$ = STR$ A