forked from klei1984/le_disasm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
55e46af
commit ffa4feb
Showing
6 changed files
with
101 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* swdisasm - LE disassembler for Syndicate Wars | ||
* | ||
* Copyright (C) 2010 Unavowed <unavowed@vexillium.org> | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
#include "instruction.h" | ||
|
||
Instruction::Type | ||
Instruction::get_type (void) | ||
{ | ||
return this->type; | ||
} | ||
|
||
std::string | ||
Instruction::get_string (void) | ||
{ | ||
return this->string; | ||
} | ||
|
||
uint32_t | ||
Instruction::get_target (void) | ||
{ | ||
return this->target; | ||
} | ||
|
||
size_t | ||
Instruction::get_size (void) | ||
{ | ||
return this->size; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* | ||
* swdisasm - LE disassembler for Syndicate Wars | ||
* | ||
* Copyright (C) 2010 Unavowed <unavowed@vexillium.org> | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
#ifndef LEDISASM_INSTRUCTION_H | ||
#define LEDISASM_INSTRUCTION_H | ||
|
||
#include <inttypes.h> | ||
#include <string> | ||
|
||
struct Instruction | ||
{ | ||
protected: | ||
friend class Disassembler; | ||
|
||
public: | ||
enum Type | ||
{ | ||
MISC, | ||
COND_JUMP, | ||
JUMP, | ||
CALL, | ||
RET | ||
}; | ||
|
||
protected: | ||
Type type; | ||
std::string string; | ||
uint32_t target; | ||
size_t size; | ||
|
||
public: | ||
Type get_type (void); | ||
std::string get_string (void); | ||
uint32_t get_target (void); | ||
size_t get_size (void); | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters