Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e45028b65d | |||
| e28ad4de5a | |||
| 890f884cce | |||
| 9dc7f61ed7 | |||
| f881b9b4e7 | |||
| 00b0368f03 | |||
| 6eec4d8d3d | |||
| 7ab4540201 | |||
| 7615546f9e |
34
README.md
34
README.md
@@ -25,8 +25,8 @@ operations:
|
||||
SR R1 R2 R3
|
||||
MUL R1 R2 R3
|
||||
io:
|
||||
STR R1 R2 R3
|
||||
LD R1 R2 R3
|
||||
STR R1 R2
|
||||
LD R1 R2
|
||||
sauts:
|
||||
JMP controle
|
||||
JEQU R1 R2 io
|
||||
@@ -42,22 +42,22 @@ Produces
|
||||
|
||||
```
|
||||
00000100 10100000 00000000 00000001
|
||||
00010000 10100110 00000000 00000000
|
||||
00100100 10100000 00000000 00100001
|
||||
01000000 10100110 00000000 00000000
|
||||
00001000 10100110 00000000 00000000
|
||||
00010100 10100000 00000000 00100001
|
||||
00100000 10100110 00000000 00000000
|
||||
00011000 10100110 00000000 00000000
|
||||
00101000 10100110 00000000 00000000
|
||||
00110000 10100110 00000000 00000000
|
||||
01010000 10100110 00000000 00000000
|
||||
01100000 10100110 00000000 00000000
|
||||
01110000 10100110 00000000 00000000
|
||||
01000000 10100110 00000000 00000000
|
||||
01010000 10100110 00000000 00000000
|
||||
11000000 00000000 00000000 00010000
|
||||
11010000 10100000 00000000 00001001
|
||||
11100000 10100000 00000000 00001011
|
||||
11110000 10100000 00000000 00000001
|
||||
11000000 10100000 00000000 00010000
|
||||
11010000 00000000 00000000 00001001
|
||||
11100000 00000000 00000000 00000000
|
||||
00111000 10100110 00000000 00000000
|
||||
01000000 10100000 00000000 00000000
|
||||
01001000 10100000 00000000 00000000
|
||||
11000000 00000000 00000000 00001111
|
||||
11001000 10100000 00000000 00001000
|
||||
11010000 10100000 00000000 00001010
|
||||
11011000 10100000 00000000 00000000
|
||||
11100000 10100000 00000000 00001111
|
||||
11101000 00000000 00000000 00001000
|
||||
11111000 00000000 00000000 00000000
|
||||
```
|
||||
|
||||
## Releases
|
||||
|
||||
@@ -28,7 +28,7 @@ enum TypeSautControle {
|
||||
Jsup,
|
||||
Jinf,
|
||||
Call,
|
||||
Ret,
|
||||
Ret = 7,
|
||||
};
|
||||
|
||||
static std::map<std::string, Instruction> INSTRUCTION_KEYS = {
|
||||
@@ -53,7 +53,7 @@ static std::map<std::string, Instruction> INSTRUCTION_KEYS = {
|
||||
|
||||
constexpr int LINE_LENGTH = 32;
|
||||
constexpr int INSTRUCTION_BITS_COUNT = 2;
|
||||
constexpr int OPERATION_BITS_COUNT = 2;
|
||||
constexpr int OPERATION_BITS_COUNT = 3;
|
||||
constexpr int IMMEDIATE_BITS_COUNT = 1;
|
||||
constexpr int INSTRUCTION_BLOCK_SIZE = INSTRUCTION_BITS_COUNT + OPERATION_BITS_COUNT + IMMEDIATE_BITS_COUNT;
|
||||
constexpr int REGISTRY_BITS_COUNT = 3;
|
||||
@@ -205,8 +205,8 @@ std::uint32_t Assembleur::ParseInstruction(const std::string& a_Str, std::uint32
|
||||
}
|
||||
}
|
||||
|
||||
} catch (std::invalid_argument& e) {
|
||||
throw std::invalid_argument("[Line " + std::to_string(a_RealLine) + "] " + e.what());
|
||||
} catch (std::exception& e) {
|
||||
throw std::invalid_argument(" [Line " + std::to_string(a_RealLine) + "] " + e.what() + "\n" + a_Str);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "IO.h"
|
||||
|
||||
#define ASSEMBLEUR_VERSION "1.7"
|
||||
#define ASSEMBLEUR_VERSION "1.9"
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user