PLOT numbers ============ The PLOT command is a bitmap indicating what action to perform. +---+---+---+---+---+---+---+---+ | 0 | 0 | | | | | | Draw line +---+---+---+---+---+---+---+---+ | | | | | | | | | | | | | | 0 0 Move | | | | | | 0 1 Plot in foreground colour | | | | | | 1 0 Plot in inverse colour | | | | | | 1 1 Plot in background colour | | | | | 0 Relative coordinates | | | | | 1 Absolute coordinates | | | | | | | | | 0 Last point not omitted | | | | 1 Last point omitted when inverted plotting used | | | 0 Solid line | | | 1 Dot-dash line | | 0 First point not omitted | | 1 First point omitted 0 0 Draw line +---+---+---+---+---+---+---+---+ | 0 | 1 | | | | | | Plot points +---+---+---+---+---+---+---+---+ | | | | | | | | | | | | | | 0 0 Move | | | | | | 0 1 Plot in foreground colour | | | | | | 1 0 Plot in inverse colour | | | | | | 1 1 Plot in background colour | | | | | 0 Relative coordinates | | | | | 1 Absolute coordinates | | | | | +---+---+---+---+--&40+n Plot point &48+n Fill to non-background &50+n Fill triangle &58+n Fill to background &60+n Fill rectangle &68+n Fill to foreground &70+n Fill parallelogram &78+n Fill to non-foreground +---+---+---+---+---+---+---+---+ | 1 | | | | | | | Fill area and other actions +---+---+---+---+---+---+---+---+ | | | | | | | | | | | | | | 0 0 Move | | | | | | 0 1 Plot in foreground colour | | | | | | 1 0 Plot in inverse colour | | | | | | 1 1 Plot in background colour | | | | | 0 Relative coordinates | | | | | 1 Absolute coordinates | | | | | +---+---+---+---+--&80+n Flood to non-background &88+n Flood to foreground &90+n Circle outline &98+n Circle fill &A0+n Circle arc &A8+n Circle segment &B0+n Circle sector &B8+n Block copy/move/swap: b0-b1: 00 no action 01 copy 10 move 11 swap (copy and move) &C0+n Ellipse outline &C8+n Ellipse fill &D0+n Font plot &D8+n Reserved &E0+n Reserved &E8+n Sprite plot (BBFW: block swap) &F0+n User plot &F8+n User plot BASIC commands: PLOT k,x,y -> VDU 25,k,x;y; MOVE x,y -> PLOT 4,x,y DRAW x,y -> PLOT 5,x,y On BASICs that support the commands: MOVE BY x,y -> PLOT 0,x,y DRAW BY x,y -> PLOT 1,x,y PLOT x,y -> PLOT 69,x,y PLOT BY x,y -> PLOT 65,x,y FILL x,y -> PLOT 133,x,y FILL BY x,y -> PLOT 129,x,y LINE x1,y1,x2,y2 -> MOVE x1,y1:DRAW x2,y2 CIRCLE x,y,r -> MOVE x,y:PLOT 145,r,0 CIRCLE FILL x,y,r -> MOVE x,y:PLOT 153,r,0 ELLIPSE x,y,a,b -> MOVE x,y:PLOT 0,a,0:PLOT 193,0,b ELLIPSE x,y,a,b,r ELLIPSE FILL x,y,a,b -> MOVE x,y:PLOT 0,a,0:PLOT 201,0,b ELLIPSE FILL x,y,a,b,r RECTANGLE x,y,w -> MOVE x,y:PLOT 13,x+w,y:PLOT 13,x+w,y+l:PLOT 13,x,y+w:PLOT 13,x,y RECTANGLE x,y,w,h -> MOVE x,y:PLOT 13,x+w,y:PLOT 13,x+w,y+h:PLOT 13,x,y+h:PLOT 13,x,y RECTANGLE FILL x,y,w -> MOVE x,y:PLOT 101,x+w,y+w RECTANGLE FILL x,y,w,h -> MOVE x,y:PLOT 101,x+w,y+h RECTANGLE MOVE x1,y1,w,h TO x2,y2 -> MOVE x1,y1:MOVE x1+w,y1+h:PLOT 189,x2,y2 RECTANGLE FILL x1,y1,w,h TO x2,y2 -> MOVE x1,y1:MOVE x1+w,y1+h:PLOT 190,x2,y2 RECTANGLE SWAP x1,y1,w,h TO x2,y2 -> MOVE x1,y1:MOVE x1+w,y1+h:PLOT 191,x2,y2 Other BASIC commands: CLS -> VDU 12 CLG -> VDU 16 COLOUR n -> VDU 17,n GCOL n -> VDU 18,0,n GCOL m,n -> VDU 18,m,n COLOUR l,p -> VDU 19,l,p,0,0,0 COLOUR l,r,g,b -> VDU 19,l,16,r,g,b COLOUR l,r,g,b -> VDU 19,l,24,r,g,b if l<0 MODE m -> VDU 22,m PLOT k,x,y -> VDU 25,x;y; ORIGIN x,y -> VDU 29,x;y; TAB(x,y) -> VDU 31,x,y