Created a basic binary format to help guide the disassembler.

This commit is contained in:
2022-08-29 15:57:14 +00:00
parent 0d3f8a460e
commit 7385a807a5
3 changed files with 65 additions and 20 deletions
+6 -3
View File
@@ -17,14 +17,17 @@ void GetParameter(unsigned char instruction, char* text);
void Disassemble(unsigned char image[HIGHMEMORY]) {
Image = image;
int position = 0;
int position = image[0] + image[1];
int end = image[2] + image[3];
printf("Start: %d and End: %d\n", position, end);
char* parameter1 = calloc(32, sizeof(char));
char* parameter2 = calloc(32, sizeof(char));
unsigned char instruction = image[position];
while(instruction != 0) {
while(end >= position) {//(instruction != 0) {
// printf("%d\n", position);
// printf("%#04X\n", instruction);
@@ -119,7 +122,7 @@ int IsRegisterPattern(unsigned char pattern, char* lexeme) {
return 1;
}
/*
//REG XXX0 0XXX 1010 1111
//REG XXX0 0XXX
//Constant XXX0 1XXX
//Address XXX1 0XXX
NOP - 0000 0000 NOP