diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-03-06 17:41:36 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-03-06 17:42:17 -0800 |
commit | 5c26afb1de61dc650f0f7523c92143747c960432 (patch) | |
tree | 22c00a6ba562cbd80e2432201399ee800c5247da /subx_opcodes | |
parent | 0743b981a823049bfe0a24f9204e629ce375af39 (diff) | |
download | mu-5c26afb1de61dc650f0f7523c92143747c960432.tar.gz |
6088 - start using setCC instructions
Diffstat (limited to 'subx_opcodes')
-rw-r--r-- | subx_opcodes | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/subx_opcodes b/subx_opcodes index a44e2aba..688a6e26 100644 --- a/subx_opcodes +++ b/subx_opcodes @@ -80,7 +80,7 @@ Opcodes currently supported by SubX: c1: shift rm32 by imm8 bits depending on subop (sal/sar/shl/shr) c3: return from most recent unfinished call (ret) c6: copy imm8 to r8/m8-at-r32 (mov) - c7: copy imm32 to rm32 (mov) + c7: copy imm32 to rm32 with subop 0 (mov) cd: software interrupt (int) d3: shift rm32 by CL bits depending on subop (sal/sar/shl/shr) e8: call disp32 (call) @@ -99,6 +99,16 @@ Opcodes currently supported by SubX: 0f 8d: jump disp32 bytes away if greater or equal (signed), if SF == OF (jcc/jge/jnl) 0f 8e: jump disp32 bytes away if lesser or equal (signed), if ZF is set or SF != OF (jcc/jle/jng) 0f 8f: jump disp32 bytes away if greater (signed), if ZF is unset and SF == OF (jcc/jg/jnle) + 0f 92: set rm32 to 1 if lesser (unsigned), if CF is set, 0 otherwise (setcc/setb/setnae) + 0f 93: set rm32 to 1 if greater or equal (unsigned), if CF is unset, 0 otherwise (setcc/setae/setnb) + 0f 94: set rm32 to 1 if equal, if ZF is set, 0 otherwise (setcc/setz/sete) + 0f 95: set rm32 to 1 if not equal, if ZF is not set, 0 otherwise (setcc/setnz/setne) + 0f 96: set rm32 to 1 if lesser or equal (unsigned), if ZF is set or CF is set, 0 otherwise (setcc/setbe/setna) + 0f 97: set rm32 to 1 if greater (unsigned), if ZF is unset and CF is unset, 0 otherwise (setcc/seta/setnbe) + 0f 9c: set rm32 to 1 if lesser (signed), if SF != OF, 0 otherwise (setcc/setl/setnge) + 0f 9d: set rm32 to 1 if greater or equal (signed), if SF == OF, 0 otherwise (setcc/setge/setnl) + 0f 9e: set rm32 to 1 if lesser or equal (signed), if ZF is set or SF != OF, 0 otherwise (setcc/setle/setng) + 0f 9f: set rm32 to 1 if greater (signed), if ZF is unset and SF == OF, 0 otherwise (setcc/setg/setnle) 0f af: multiply rm32 into r32 (imul) Run `bootstrap help instructions` for details on words like 'r32' and 'disp8'. For complete details on these instructions, consult the IA-32 manual (volume 2). |