EGFX · FUNCTION 41ALPHA · USE AT YOUR OWN RISK
PIXEL
Plot one pixel.
Plots exactly one opaque pixel in the selected mode, unlike DOT (9), which plots a 2×2 point. Coordinates out of range return status 1, and PROCegcall then stops with EG ERROR. BASIC: PROCegpixel(x%,y%,colour%).
Parameters
| Name | Bytes | Description |
|---|---|---|
PX/PY | 8–11 | signed 16-bit position |
COLOUR | 13 | logical colour 0–3 |
BASIC example
Tested listing: ex38.bas, run in B-em on a Master 128. Append the EGFX helpers from gfx-basic.bas (the build does this for you), and put the Breakout EGASSETS.rom (with the beta release) in slot 7 where the example draws from &81/&87.
10 MODE 1:HIMEM=&2400:PROCeginit
20 FOR p%=1 TO 2:PROCegbegin:PROCegtext("FN38 DIRTY",8,8):PROCegpresent:NEXT
30 FOR x%=2 TO 317:PROCegdirtybegin
40 PROCegpixel(x%-2,128,0):PROCegpixel(x%,128,3)
50 PROCegpresent:NEXT
60 END
Assembly
LDA #41 : STA block+5 ; function
LDA #0 : STA block+7 ; clear ACK
LDA #&C0 : LDX #block MOD 256 : LDY #block DIV 256
JSR &FFF1 ; OSWORD &C0; block+7 = &A5 on success