From 7e822819b7788bd926b14f68c85bca66b812d43e Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Sat, 11 Jan 2020 21:58:21 -0600 Subject: [PATCH] Allow the WDM instruction to be used in the mini-assembler. This can be useful under emulators that may implement special functionality using WDM. It is implemented as taking a one-byte numeric operand. --- Asm.pas | 7 +++++++ CCommon.pas | 2 +- Table.asm | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Asm.pas b/Asm.pas index 81f0f24..f05c9c5 100644 --- a/Asm.pas +++ b/Asm.pas @@ -584,6 +584,13 @@ while not (token.kind in [rbracech,eofsy]) do begin code^.s := 0; end {if opc = o_brk} + {handle the wdm instruction (treated as having a one-byte operand)} + else if opc = o_wdm then begin + Exp([semicolonch], true); + code^.r := ord(direct); + code^.s := $42; + end {if opc = o_wdm} + {handle moves} else if opc in [o_mvn,o_mvp] then begin if opc = o_mvn then diff --git a/CCommon.pas b/CCommon.pas index 80fc429..2ecb8fe 100644 --- a/CCommon.pas +++ b/CCommon.pas @@ -355,7 +355,7 @@ type o_dcb,o_dcw,o_dcl, - o_brk, + o_brk,o_wdm, o_mvn,o_mvp, diff --git a/Table.asm b/Table.asm index 2120516..a8f71dd 100644 --- a/Table.asm +++ b/Table.asm @@ -639,7 +639,7 @@ names start mini-assembler op code names dc c'peapeireprolrorsbcsepstastxsty' dc c'stztrbtsb' dc c'dcbdcwdcl' - dc c'brk' + dc c'brkwdm' dc c'mvnmvp' dc c'bccbcsbeqbmibnebplbrabrlperbvc' dc c'bvs'