EGFX · FUNCTION 42ALPHA · USE AT YOUR OWN RISK
LINE_BATCH
Draw up to eight lines in one request.
Draws up to eight lines in one colour, in the order given, using exactly the same pixels as LINE (10). The whole request is checked before anything is drawn, so one bad record leaves the screen untouched and returns status 1. Count 0 is a valid no-op. There is no BASIC helper; write the records directly as in the example.
Parameters
| Name | Bytes | Description |
|---|---|---|
COUNT | 8 | 0–8 |
COLOUR | 9 | logical colour 0–3 |
RECORDS | 16–63 | six bytes each: X low/high, Y, end X low/high, end Y; all within 320×232 |
BASIC example
Tested listing: ex42.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 PROCegbegin
30 egb%?8=4:egb%?9=2
40 FOR i%=0 TO 3:o%=16+i%*6
50 egb%?o%=40+i%*60:egb%?(o%+1)=0:egb%?(o%+2)=40
60 egb%?(o%+3)=70+i%*60:egb%?(o%+4)=0:egb%?(o%+5)=200
70 NEXT:PROCegcall(42)
80 PROCegtext("FN42 OK",8,8):PROCegpresent
90 END
Assembly
LDA #42 : 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