Mercurial > hg > index.cgi
comparison docs/manual.docbook.sgml @ 472:e97f9a302c6a
Add emuext pragma and associated instructions.
This provides two emulator specific instructions ("log" and "debug") enabled
by the "emuext" pragma.
This is from a patch provided by tim Lindner <tlindner@macmess.org>. From
Tim's submission:
----
I stole the whole patch from Erik Gavriluk. I hope he doesn't mind. :)
The two instructions are "debug" and "log". They are enabled with
pragmas. I also added them to the manual.
Hopefully all is well.
----
Said Erik Gavriluk <erik@bombfactory.com> in response:
...happy to see them picked up in mainline (if you choose to do so)....
author | William Astle <lost@l-w.ca> |
---|---|
date | Thu, 01 Nov 2018 23:00:00 -0600 |
parents | cad5937314cb |
children | 94bbdb2890b7 |
comparison
equal
deleted
inserted
replaced
471:ad0efd5835c3 | 472:e97f9a302c6a |
---|---|
2057 <programlisting> | 2057 <programlisting> |
2058 1D1E 7D1D1D TST WHICH1 ;.7d1d1d | 2058 1D1E 7D1D1D TST WHICH1 ;.7d1d1d |
2059 1D21 2A0139 BMI ?RTS ;.2a0139 | 2059 1D21 2A0139 BMI ?RTS ;.2a0139 |
2060 1D24 1D24 FDB * ;.1d24 | 2060 1D24 1D24 FDB * ;.1d24 |
2061 1D26 xyz INV ;.E:32 (Error 32 is "Bad opcode") | 2061 1D26 xyz INV ;.E:32 (Error 32 is "Bad opcode") |
2062 </programlisting> | |
2063 </listitem> | |
2064 </varlistentry> | |
2065 | |
2066 | |
2067 | |
2068 | |
2069 <varlistentry> | |
2070 <term>emuext</term> | |
2071 <listitem> | |
2072 <para> | |
2073 | |
2074 This pragma enables two instructions useful when running code in compatible | |
2075 emulators. Break breaks into the debugger. Log writes printf-style | |
2076 output to the debug window | |
2077 | |
2078 </para> | |
2079 <programlisting> | |
2080 LOG ; log output | |
2081 FDB FSTR ; pointer to format string | |
2082 FDB PX1 ; 16 bit pointer to 16 bit value | |
2083 FDB PY1 ; 16 bit pointer to 8 bit value (see format string!) | |
2084 FDB PX2 ; 16 bit pointer to 16 bit value | |
2085 FDB PY2 ; 16 bit pointer to 8 bit value | |
2086 ; execution continues here ... | |
2087 RTS | |
2088 | |
2089 ; format string | |
2090 FSTR FCC "%hu,%hhu - %hu,%hhu" | |
2091 FCB 10,0 | |
2062 </programlisting> | 2092 </programlisting> |
2063 </listitem> | 2093 </listitem> |
2064 </varlistentry> | 2094 </varlistentry> |
2065 | 2095 |
2066 </variablelist> | 2096 </variablelist> |