Interesting print out

Discussion about ZX80 / ZX81 Software
User avatar
XavSnap
Posts: 1940
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: Interesting print out

Post by XavSnap »

This driver get onscreen 4x4 pixels, to make a dot on the printer out.
32 characters need 4 screen to fill the 32x8 dot's printer.
It just add 32x4 characters to print a line!

All screen are stored in memory and recall to print the printing process.

Alphanumerics characters codes can't be reduced by 4... and we had to use graphics one to create the high-re printout.

The ZxPrinter high-res create a buffer in a sting value and launch all values to the printer!

POKE 16389,124
NEW

1 REM [HEX:\
3A,8E,40,5F,3A,8F,40,B3,\
06,00,4F,C9,00,40 ]

2 IF PEEK 16388+256*PEEK 16389=31744 THEN GOTO 5
3 PRINT "MEMORY NOT RESERVED"
4 STOP
5 FOR I=0 TO 112
6 POKE 31744+I,PEEK (2161+I)
7 NEXT I
8 POKE 31800,63
9 POKE 31857,201
10 POKE 16517,95
11 POKE 16524,79
12 DIM A$(32,256)
30 FOR I=0 TO 240
40 LET X=128+30*SIN (I/60*PI)
50 LET Y=128+120*COS (I/120*PI)
60 GOSUB 9980
70 LET X=128+120*COS (I/120*PI)
80 LET Y=128+30*SIN (I/60*PI)
90 GOSUB 9980
100 LET X=128+40*SIN (I/120*PI)
110 LET Y=128+40*COS (I/120*PI)
120 GOSUB 9980
130 LET X=128+80*SIN (I/120*PI)+20*SIN (I/60*PI)
140 LET Y=128+80*SIN (I/120*PI)-20*SIN (I/60*PI)
150 GOSUB 9980
160 LET X=128+80*SIN (I/120*PI)+20*SIN (I/60*PI)
170 LET Y=128-80*SIN (I/120*PI)+20*SIN (I/60*PI)
180 GOSUB 9980
190 NEXT I
1000 GOTO 9988
5000 SAVE "ZXPRINTER-HRg˜"
5500 FAST
6000 RUN
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
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Post Reply