Mercurial > hg > index.cgi
diff 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 |
line wrap: on
line diff
--- a/docs/manual.docbook.sgml Tue Jul 24 17:41:04 2018 -0600 +++ b/docs/manual.docbook.sgml Thu Nov 01 23:00:00 2018 -0600 @@ -2063,6 +2063,36 @@ </listitem> </varlistentry> + + + +<varlistentry> +<term>emuext</term> +<listitem> +<para> + +This pragma enables two instructions useful when running code in compatible +emulators. Break breaks into the debugger. Log writes printf-style +output to the debug window + +</para> +<programlisting> + LOG ; log output + FDB FSTR ; pointer to format string + FDB PX1 ; 16 bit pointer to 16 bit value + FDB PY1 ; 16 bit pointer to 8 bit value (see format string!) + FDB PX2 ; 16 bit pointer to 16 bit value + FDB PY2 ; 16 bit pointer to 8 bit value + ; execution continues here ... + RTS + +; format string +FSTR FCC "%hu,%hhu - %hu,%hhu" + FCB 10,0 +</programlisting> +</listitem> +</varlistentry> + </variablelist> <para>As a convenience, each input file has a pragma state stack. This