The PC PAGE has a program that very rapidly displays a graphic figure that looks like it has been plotted. One program is for SCREEN 2 which is an 80 column graphic mode. This screen has 0 to 639 pixel layout across and 0 to 199 pixels vertical. The other program is for SCREEN 1 which is 320 pixels wide by 200 pixels vertical, or 0 to 319 by 0 to 199.
Neither of these screens match the Sinclair screen of 256 pixels by 176 pixels so any program conversion must take the screen size into account.
A more complex problem is that GWBASIC starts the screen at the top left with 0,0 while SINCLAIR BASICS starts at the more conventional lower left corner with 0,0. If all other things fit then the image from GWBASIC must be inverted to appear the same on the Sinclair BASIC screen. These problems are solved in the conversion from the GWBASIC program. The size will not be duplicated exactly as I have used reasonably close factors. I have added an X and Y axis notation plus 0 and the end values of X and Y.
5 REM conversion by D.F.W., 5/93
10 PRINT AT 3,0;"140";AT 20,2; AT 10,2;"Y"
15 PRINT AT 21,4;"0";AT 21,15; "X";AT 21,28;"200"
20 FOR J=0 TO 20
30 LET X=J*10
40 LET Y=20+J*7
50 PLOT 28,(170-Y): DRAW X,-(160-Y)
60 NEXT J
Note that line 50 uses PLOT for the beginning point for Draw while GWBASIC requires a starting x,y and and ending x,y with “-” which means GOTO. It appears that the GWBASIC machine code does the same thing as the PLOT machine code in this case.
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.