@@ -122,15 +122,15 @@ is only updated if there is an error.
122122
123123Some operations return strings or structures on the stack. You must pull the
124124entire stack before the next call. However, tail call optimizations are
125- possible. For example, you can chain `` read_xstack() `` and `` write_xstack() `` to
125+ possible. For example, you can chain `read_xstack() < READ_XSTACK _>`_ and `write_xstack() < WRITE_XSTACK _>`_ to
126126copy a file without using any RAM or XRAM.
127127
128128Short Stacking
129129---------------
130130
131131In the pursuit of saving every cycle, you can save a few on the stack
132132push when you don't need the full range. This only applies to the first
133- stack argument pushed. For example:
133+ stack argument pushed. For example, in ` LSEEK `_ :
134134
135135.. code-block :: C
136136
@@ -168,7 +168,7 @@ the type and direction (to or from the OS) of this data. Let's look at some exam
168168 int open(const char *path, int oflag);
169169
170170 Send ``oflag `` in ``RIA_A ``. ``RIA_X `` doesn't need to be set according to the
171- docs below . Send the path on XSTACK by pushing the string starting with the last
171+ ` OPEN `_ docs . Send the path on XSTACK by pushing the string starting with the last
172172character. You may omit pushing the terminating zero, but strings are
173173limited to a length of 255. Calling this from the C SDK will "just work"
174174because there's an implementation that pushes the string for you.
@@ -178,7 +178,7 @@ because there's an implementation that pushes the string for you.
178178 int read_xstack(void *buf, unsigned count, int fildes)
179179
180180 Send ``count `` as a short stack and ``fildes `` in ``RIA_A ``. ``RIA_X `` doesn't
181- need to be set according to the docs below . The returned value in AX indicates how
181+ need to be set according to the ` READ_XSTACK `_ docs . The returned value in AX indicates how
182182many values must be pulled from the stack. If you call this from the C SDK
183183then it will copy XSTACK to buf[] for you.
184184
@@ -187,7 +187,7 @@ then it will copy XSTACK to buf[] for you.
187187 int write_xstack(const void *buf, unsigned count, int fildes)
188188
189189 Send ``fildes `` in ``RIA_A ``. ``RIA_X `` doesn't need to be set according to the
190- docs below . Push the buf data to XSTACK. Do not send ``count ``, the OS knows this
190+ ` WRITE_XSTACK `_ docs . Push the buf data to XSTACK. Do not send ``count ``, the OS knows this
191191from its internal stack pointer. If you call this from the C SDK then it
192192will copy count bytes of buf[] to XSTACK for you.
193193
@@ -198,7 +198,7 @@ implementation makes multiple OS calls as necessary.
198198Bulk XRAM Operations
199199~~~~~~~~~~~~~~~~~~~~
200200
201- These load and save XRAM directly. You can load game assets without
201+ These load and save XRAM directly via ` READ_XRAM `_ and ` WRITE_XRAM `_ . You can load game assets without
202202going through 6502 RAM or capture a screenshot with ease.
203203
204204.. code-block :: C
554554
555555
556556 Read `count ` bytes from a file to a buffer. This is implemented in the
557- compiler library as a series of calls to read_xstack() .
557+ compiler library as a series of calls to ` READ_XSTACK `_ .
558558
559559 :Op code: None
560560 :C proto: unistd.h
@@ -614,7 +614,7 @@ WRITE
614614
615615
616616 Write `count ` bytes from buffer to a file. This is implemented in the
617- compiler library as a series of calls to write_xstack() .
617+ compiler library as a series of calls to ` WRITE_XSTACK `_ .
618618
619619 :Op code: None
620620 :C proto: unistd.h
@@ -1169,7 +1169,7 @@ get-only attribute also returns -1 with ``EINVAL``.
11691169 * - | 0x02
11701170 | ``RIA_ATTR_CODE_PAGE``
11711171 - Active OEM code page used by the filesystem, console, and default
1172- VGA font. Reverts to the system setting when the 6502 stops. If the
1172+ :doc: ` VGA < vga >` font. Reverts to the system setting when the 6502 stops. If the
11731173 requested page is unavailable, the console setting is selected;
11741174 follow a set with a get to confirm the result.
11751175 One of: 437, 720, 737, 771, 775, 850, 852, 855, 857, 860, 861, 862,
0 commit comments