Created a basic binary format to help guide the disassembler.
This commit is contained in:
+6
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user