Draw a pixel: Difference between revisions
→{{header|Commodore BASIC}}
(→{{header|Commodore BASIC}}: Add other graphical BASICs) |
|||
Line 719:
'''Example 4:''' Commodore Plus/4, C-16, and 128 (40-column display)
By the time the Commodore Plus/4 and C-16 were released, Commodore was ready to ship them with a version of BASIC, dubbed
<lang basic>10 COLOR 0,1:COLOR 1,3: REM SET BACKGROUND TO BLACK AND PIXEL COLOR TO RED
Line 729:
'''Example 5:''' Commodore 128 (80-column display)
While the Commodore 128's BASIC 7.0 had impressive support for graphics on the 40-column display, it had no such support for bitmap graphics on the double-resolution 80-column display provided by its VDC chip. For that, we turn to BASIC 8, which was released as a separate software package that had to be loaded (or installed as a chip on the C128's motherboard). It was developed outside of Commodore and has a syntax very different from the standard BASIC's graphic commands, but it supports 3D graphics out of the box, including viewport clipping, scaling, etc. Note that the below program specifies a Z coordinate of 0 for the dot, which places it on the surface of the viewport.
<lang basic>10 @MODE,0:REM SELECT SCREEN SET
|