Updates...
This commit is contained in:
@ -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!
|
||||
|
@ -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");
|
||||
|
@ -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
|
||||
|
||||
/*
|
||||
|
@ -11,8 +11,8 @@ XX XX OOOOO LLLLLLL AA AA TT II LLLLLLL EEEEEEE
|
||||
#include <unistd.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#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,
|
||||
|
Reference in New Issue
Block a user