Showing changes from revision #5 to #6:
Added | Removed | Changed
Entry | |
---|---|
R0 | Plot command code, |
R1 | X co-ordinate |
R2 | Y co-ordinate |
Exit | |
---|---|
R0 | Corrupted |
R1 | Corrupted |
R2 | Corrupted |
The purpose of this call is to perform a direct VDU call.
# | Description | Sequence of moves |
---|---|---|
0 | Solid line including both end points | Line |
8 | Solid line excluding the final end point | Line |
16 | Dotted line including both end points (pattern restarted) | Line |
24 | Dotted line excluding the final end point (pattern restarted) | Line |
32 | Solid line excluding 1^st^ point | Line |
40 | Solid line excluding both end points | Line |
48 | Dotted line excluding 1^st^ point (pattern continued) | Line |
56 | Dotted line excluding both end points (pattern continued) | Line |
64 | Point plot | |
72 | Horizontal line fill (left and right) to non-background | |
80 | Triangle fill | Triangle |
88 | Horizontal line fill (right only) to background | |
96 | Rectangle fill | Rectangle |
104 | Horizontal line fill (left and right) to foreground | |
112 | Parallelogram fill | Parallelogram |
120 | Horizontal line fill (right only) to non-foreground | |
128 | Flood to non-background | |
136 | Floor to foreground | |
144 | Circle outline | Circle |
152 | Circle fill | Circle |
160 | Circular arc | Arc |
168 | Segment | Segment |
176 | Sector | Sector |
184 | Block copy/move | Block copy/move |
192 | Ellipse outline | Ellipse |
200 | Ellipse fill | Ellipse |
208 | Font printing (do not use) | |
216 | Reserved | |
224 | Reserved | |
232 | Sprite Plot | |
240 | Reserved | |
248 | Reserved |
Some shapes need to be defined by a sequence of points. The VDU drivers use the previous positions of the graphics cursor to define these. These can be specified by a sequence of absolute or relative moves (commands 64 or 68).
Shape | Sequence of moves |
---|---|
Arc | To plot an arc move to centre, move to start, then plot arc to a point on the line joining centre to end. The arc will be plotted anticlockwise |
Block copy/move | First define the source rectangle: move to one corner, then move to diagonally opposite corner. Then plot bottom left corner of destination |
Circle | To plot a circle, move to centre, then plot circle to a point on the circumference |
Ellipse | To plot an ellipse, move to centre, move to point on circumference with same Y co-ordinate as centre, then plot ellipse to the lowest or highest point on the circumference |
Line | To plot a line, move to one endpoint, then plot line to other endpoint |
Parallelogram | To plot a parallelogram, move to vertex, move to next vertex, then plot parallelogram to third vertex. Fourth vertex will be opposite second |
Rectangle | To plot a rectangle, move to one corner, then plot rectangle to diagonally opposite corner |
Sector | To plot a sector, move to centre, move to start, then plot sector to a point on the line joining centre to end. The sector will be plotted anticlockwise |
Segment | To plot a segment, move to centre, move to start, then plot segment to a point on the line joining centre to end. The segment will be plotted anticlockwise |
Triangle | To plot a triangle, move to vertex, move to next vertex, then plot triangle to third vertex |
The plot commands use the top 5 bits. The bottom 3 bits are used to specify the ‘modifier’. Most plot command codes use the standard modifier codes, however, a special set of modifiers are available for block copy/move commands.
# | Standard modifier type |
---|---|
0 | Move relative |
1 | Plot relative, foreground |
2 | Plot relative, inverse |
3 | Plot relative, background |
4 | Move absolute |
5 | Plot absolute, foreground |
6 | Plot absolute, inverse |
7 | Plot absolute, background |
# | Block copy/move modifier type |
---|---|
0 | Move relative |
1 | Relative rectangle move |
2 | Relative rectangle copy |
3 | Relative rectangle |
4 | Move absolute |
5 | Absolute rectangle move |
6 | Absolute rectangle copy |
7 | Absolute rectangle copy |
The action performed depends on the plot command code value in R0.
Unknown plot codes (216-231,240-255) are sent to the unknown plot vector, which by default does nothing.
The dash pattern is set with VDU 23,6? and can be read with OS_Word 10,6?OS_Word 10,6. Its length is set and read with OS_Byte 163.