diff --git a/source/assembler.c b/source/assembler.c index 3fcffe0..dc7f04c 100644 --- a/source/assembler.c +++ b/source/assembler.c @@ -399,6 +399,10 @@ void assemble (next count, build_move (array [index + 1], array [index + 2], array [index + 3], array [index + 4], array [index + 5]); + printf ("MOV %i %i %i %i %i\n", + array [index + 1], array [index + 2], + array [index + 3], array [index + 4], + array [index + 5]); index += 5; } else { //~exit (array [index]); // For debugging only! diff --git a/source/main.c b/source/main.c index 0362906..9613cae 100644 --- a/source/main.c +++ b/source/main.c @@ -67,8 +67,8 @@ signed main(int argc, char * argv[]) { void dump (const char * file_name) { elf_main_header (1, 1, 1, 0); - elf_text_sector (34); - elf_data_sector (34, 12); + elf_text_sector (text_sector_size); + elf_data_sector (text_sector_size, 12); char meme [1024] = ""; FILE * file = fopen (file_name, "w"); diff --git a/test/heyo.eax b/test/heyo.eax index 949064e..21a6845 100644 --- a/test/heyo.eax +++ b/test/heyo.eax @@ -1,20 +1,20 @@ unix program heyo_world - s8 [] heyo = "Heyo world!\n" - s8 [] cyaa = "Cyaa world!\n" + /*s8 heyo = "Heyo world!\n" + s8 cyaa = "Cyaa world!\n"*/ begin - mov eax 1 - mov edi 1 - mov esi heyo - mov edx 12 - syscall - mov eax 1 + nop mov eax 1 + nop mov edi 1 + nop mov esi 4198610 + nop mov edx 12 + nop syscall + /*mov eax 1 mov edi 1 mov esi cyaa mov edx 12 - syscall - mov eax 60 - mov edi 60 - syscall + syscall*/ + nop mov eax 60 + nop mov edi 60 + nop syscall end program /* diff --git a/tool/xia32e.c b/tool/xia32e.c index 32070f0..9f8079b 100644 --- a/tool/xia32e.c +++ b/tool/xia32e.c @@ -11,8 +11,8 @@ XX XX OOOOO LLLLLLL AA AA TT II LLLLLLL EEEEEEE #include #include -#include "assembler.c" -#include "unix.c" +#include "../source/assembler.c" +#include "../source/unix.c" enum { token_add, token_or, token_adc, token_sbb, token_and, token_sub, token_xor, token_cmp,