Skip to content

Commit e75d1c9

Browse files
authored
PRG: add OVAL/RING BASIC commands, update KERNAL doc (#219)
* PRG: add OVAL/RING BASIC commands, update KERNAL doc * minor changes
1 parent 8251f78 commit e75d1c9

File tree

3 files changed

+39
-1
lines changed

3 files changed

+39
-1
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ jobs:
4444
"X16 Reference - Appendix B - VERA Recovery.md" \
4545
"X16 Reference - Appendix C - 65C02 Processor.md" \
4646
"X16 Reference - Appendix D - Official Expansion Cards.md" \
47+
"X16 Reference - Appendix E - Diagnostic Bank.md" \
48+
"X16 Reference - Appendix F - 65C816 Processor.md" \
4749
| md-to-pdf --config-file .gh/config.js --stylesheet .gh/markdown.css > "artifacts/Commander X16 Programmer's Reference Guide.pdf"
4850
- uses: actions/upload-artifact@v4
4951
with:

X16 Reference - 04 - BASIC.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ for GitHub's Markdown flavor. Do not remove!
9595
| `ON` | command | A GOTO/GOSUB table based on a variable value | C64 |
9696
| `OPEN` | command | Opens a logical file to disk or other device | C64 |
9797
| `OR` | operator | Bitwise or boolean "OR" | C64 |
98+
| [`OVAL`](#oval) | command | Draws a filled oval in graphics mode | X16 |
9899
| `PEEK` | function | Returns a value from a memory address | C64 |
99100
| `π` | function | Returns the constant for the value of pi | C64 |
100101
| [`POINTER`](#pointer) | function | Returns the address of a BASIC variable | C128 |
@@ -121,6 +122,7 @@ for GitHub's Markdown flavor. Do not remove!
121122
| [`RESTORE`](#restore) | command | Resets the `READ` pointer to a `DATA` constant | C64 |
122123
| `RETURN` | command | Returns from a subroutine to the statement following a GOSUB | C64 |
123124
| `RIGHT$` | function | Returns a substring from the end of a string | C64 |
125+
| [`RING`](#ring) | command | Draws an oval outline in graphics mode | X16 |
124126
| `RND` | function | Returns a floating point number 0 <= n < 1 | C64 |
125127
| [`RPT$`](#rpt) | function | Returns a string of repeated characters | X16 |
126128
| `RUN` | command | Clears the variable state and starts a BASIC program | C64 |
@@ -1031,6 +1033,23 @@ moved away from the user, and positive if it is moved towards the user. The rang
10311033
OLD
10321034
```
10331035

1036+
### OVAL
1037+
1038+
**TYPE: Command**
1039+
**FORMAT: OVAL &lt;x1&gt;,&lt;y1&gt;,&lt;x2&gt;,&lt;y2&gt;,&lt;color&gt;**
1040+
1041+
**Action:** This command draws a filled oval on the graphics screen in a given color.
1042+
1043+
The coordinate arguments define the rectangular bounding box of the oval. To draw a filled circle, make the width and height equal to each other.
1044+
1045+
**EXAMPLE of OVAL Statement:**
1046+
1047+
```BASIC
1048+
10 SCREEN $80
1049+
20 FORI=1 TO 20:OVAL RND(1)*320,RND(1)*200,RND(1)*320,RND(1)*200,RND(1)*128:NEXT
1050+
30 GOTO 20
1051+
```
1052+
10341053
### POINTER
10351054

10361055
**TYPE: Function**
@@ -1219,6 +1238,23 @@ The full set of macros is documented [here](X16%20Reference%20-%20Appendix%20A%2
12191238

12201239
This example plays a chromatic scale while applying pulse-width modulation on the voice.
12211240

1241+
### RING
1242+
1243+
**TYPE: Command**
1244+
**FORMAT: RING &lt;x1&gt;,&lt;y1&gt;,&lt;x2&gt;,&lt;y2&gt;,&lt;color&gt;**
1245+
1246+
**Action:** This command draws an oval outline on the graphics screen in a given color.
1247+
1248+
The coordinate arguments define the rectangular bounding box of the oval. To draw a circle outline, make the width and height equal to each other.
1249+
1250+
**EXAMPLE of RING Statement:**
1251+
1252+
```BASIC
1253+
10 SCREEN $80
1254+
20 FORI=1 TO 20:RING RND(1)*320,RND(1)*200,RND(1)*320,RND(1)*200,RND(1)*128:NEXT
1255+
30 GOTO 20
1256+
```
1257+
12221258
### RECT
12231259

12241260
**TYPE: Command**

X16 Reference - 05 - KERNAL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ The 16 bit ABI generally follows the following conventions:
131131
| [`GRAPH_clear`](#function-name-graph_clear) | `$FF23` | Video | Clear screen | none | r0 r1 r2 r3 A X Y P | X16
132132
| [`GRAPH_draw_image`](#function-name-graph_draw_image) | `$FF38` | Video | Draw a rectangular image | r0 r1 r2 r3 r4 | A P | X16
133133
| [`GRAPH_draw_line`](#function-name-graph_draw_line) | `$FF2C` | Video | Draw a line | r0 r1 r2 r3 | r0 r1 r2 r3 r7 r8 r9 r10 r12 r13 A X Y P | X16
134-
| [`GRAPH_draw_oval`](#function-name-graph_draw_oval) &#128683; | `$FF35` | Video | Draw an oval or circle | - | - | X16
134+
| [`GRAPH_draw_oval`](#function-name-graph_draw_oval) | `$FF35` | Video | Draw an oval or circle (optionally filled) | r0 r1 r2 r3 r4 C | A X Y P | X16
135135
| [`GRAPH_draw_rect`](#function-name-graph_draw_rect) &#8224; | `$FF2F` | Video | Draw a rectangle (optionally filled) | r0 r1 r2 r3 r4 C | A P | X16
136136
| [`GRAPH_get_char_size`](#function-name-graph_get_char_size) | `$FF3E` | Video | Get size and baseline of a character | A X | A X Y P | X16
137137
| [`GRAPH_init`](#function-name-graph_init) | `$FF20` | Video | Initialize graphics | r0 | r0 r1 r2 r3 A X Y P | X16

0 commit comments

Comments
 (0)