Mercurial > hg > index.cgi
diff lwasm/instab.c @ 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 | 4fd16faa4d93 |
children | bf24b8c856d1 |
line wrap: on
line diff
--- a/lwasm/instab.c Tue Jul 24 17:41:04 2018 -0600 +++ b/lwasm/instab.c Thu Nov 01 23:00:00 2018 -0600 @@ -370,6 +370,10 @@ { "negq", { -1, -1, -1, 12 }, insn_parse_conv, insn_resolve_conv, insn_emit_conv, lwasm_insn_is6309conv }, { "tstq", { 0x10ed, 0x7c, -1, 9 }, insn_parse_conv, insn_resolve_conv, insn_emit_conv, lwasm_insn_is6309conv }, + // emulator extensions + { "break", { 0x113e, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_isemuext }, + { "log", { 0x103e, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_isemuext }, + { "abx", { 0x3a, -1, -1, -1 }, insn_parse_inh, insn_resolve_inh, insn_emit_inh, lwasm_insn_normal}, { "adca", { 0x99, 0xa9, 0xb9, 0x89}, insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_normal}, { "adcb", { 0xd9, 0xe9, 0xf9, 0xc9}, insn_parse_gen8, insn_resolve_gen8, insn_emit_gen8, lwasm_insn_normal},