source: Daodan/src/beaengine/Includes/instr_set/opcodes_Grp4.c@ 1032

Last change on this file since 1032 was 984, checked in by alloc, 11 years ago

Daodan: TV code

File size: 2.0 KB
RevLine 
[984]1/* Copyright 2006-2009, BeatriX
2 * File coded by BeatriX
3 *
4 * This file is part of BeaEngine.
5 *
6 * BeaEngine is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * BeaEngine is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with BeaEngine. If not, see <http://www.gnu.org/licenses/>. */
18
19/* ====================================================================
20 * 0feh
21 * ==================================================================== */
22void __bea_callspec__ G4_Eb(PDISASM pMyDisasm)
23{
24 GV.REGOPCODE = ((*((UInt8*)(UIntPtr) (GV.EIP_+1))) >> 3) & 0x7;
25 if (GV.REGOPCODE == 0) {
26 if ((*pMyDisasm).Prefix.LockPrefix == InvalidPrefix) {
27 (*pMyDisasm).Prefix.LockPrefix = InUsePrefix;
28 }
29 (*pMyDisasm).Instruction.Category = GENERAL_PURPOSE_INSTRUCTION+ARITHMETIC_INSTRUCTION;
30 #ifndef BEA_LIGHT_DISASSEMBLY
31 (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "inc ");
32 #endif
33 Eb(pMyDisasm);
34 FillFlags(pMyDisasm, 40);
35 }
36 else if (GV.REGOPCODE == 1) {
37 if ((*pMyDisasm).Prefix.LockPrefix == InvalidPrefix) {
38 (*pMyDisasm).Prefix.LockPrefix = InUsePrefix;
39 }
40 (*pMyDisasm).Instruction.Category = GENERAL_PURPOSE_INSTRUCTION+ARITHMETIC_INSTRUCTION;
41 #ifndef BEA_LIGHT_DISASSEMBLY
42 (void) strcpy ((*pMyDisasm).Instruction.Mnemonic, "dec ");
43 #endif
44 Eb(pMyDisasm);
45 FillFlags(pMyDisasm, 30);
46 }
47 else {
48 FailDecode(pMyDisasm);
49 }
50}
51
Note: See TracBrowser for help on using the repository browser.