Sorry, pushed unsinifhs code...
This commit is contained in:
@ -324,6 +324,13 @@ static void build_move (size_index size,
|
|||||||
input_at ((to == REG) && (from == REL), D32, source);
|
input_at ((to == REG) && (from == REL), D32, source);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void build_call (type_index from,
|
||||||
|
next source) {
|
||||||
|
// call
|
||||||
|
(void) from;
|
||||||
|
(void) source;
|
||||||
|
}
|
||||||
|
|
||||||
static void assemble_clean_up (void) {
|
static void assemble_clean_up (void) {
|
||||||
if (assemble_clean_up_queued == 0) {
|
if (assemble_clean_up_queued == 0) {
|
||||||
return;
|
return;
|
||||||
@ -418,6 +425,7 @@ void assemble (next count,
|
|||||||
index += 5;
|
index += 5;
|
||||||
} else if (array [index] == CALL) {
|
} else if (array [index] == CALL) {
|
||||||
build_call (array [index + 1], array [index + 2]);
|
build_call (array [index + 1], array [index + 2]);
|
||||||
|
index += 2;
|
||||||
} else {
|
} else {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -6,34 +6,64 @@ segment readable executable
|
|||||||
|
|
||||||
entry main
|
entry main
|
||||||
|
|
||||||
heyo: mov eax, 1
|
heyo:
|
||||||
|
nop
|
||||||
|
mov eax, 1
|
||||||
|
nop
|
||||||
mov edi, 1
|
mov edi, 1
|
||||||
|
nop
|
||||||
mov esi, h
|
mov esi, h
|
||||||
|
nop
|
||||||
mov edx, 12
|
mov edx, 12
|
||||||
|
nop
|
||||||
syscall
|
syscall
|
||||||
|
nop
|
||||||
call meme
|
call meme
|
||||||
|
nop
|
||||||
ret
|
ret
|
||||||
|
|
||||||
cyaa: mov eax, 1
|
cyaa:
|
||||||
|
nop
|
||||||
|
mov eax, 1
|
||||||
|
nop
|
||||||
mov edi, 1
|
mov edi, 1
|
||||||
|
nop
|
||||||
mov esi, c
|
mov esi, c
|
||||||
|
nop
|
||||||
mov edx, 12
|
mov edx, 12
|
||||||
|
nop
|
||||||
syscall
|
syscall
|
||||||
|
nop
|
||||||
ret
|
ret
|
||||||
|
|
||||||
main: call heyo
|
main:
|
||||||
|
nop
|
||||||
|
call heyo
|
||||||
|
nop
|
||||||
call cyaa
|
call cyaa
|
||||||
|
nop
|
||||||
mov eax, 60
|
mov eax, 60
|
||||||
|
nop
|
||||||
mov edi, 60
|
mov edi, 60
|
||||||
|
nop
|
||||||
syscall
|
syscall
|
||||||
|
|
||||||
meme: mov eax, 1
|
meme:
|
||||||
|
nop
|
||||||
|
mov eax, 1
|
||||||
|
nop
|
||||||
mov edi, 1
|
mov edi, 1
|
||||||
|
nop
|
||||||
mov esi, m
|
mov esi, m
|
||||||
|
nop
|
||||||
mov edx, 12
|
mov edx, 12
|
||||||
|
nop
|
||||||
syscall
|
syscall
|
||||||
|
nop
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
nop
|
||||||
|
|
||||||
segment readable writable
|
segment readable writable
|
||||||
|
|
||||||
h: db "Heyo world!", 10
|
h: db "Heyo world!", 10
|
||||||
|
Reference in New Issue
Block a user