Sorry, pushed unsinifhs code...
This commit is contained in:
parent
51e48cd82b
commit
ccc02a33b3
@ -324,6 +324,13 @@ static void build_move (size_index size,
|
||||
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) {
|
||||
if (assemble_clean_up_queued == 0) {
|
||||
return;
|
||||
@ -418,6 +425,7 @@ void assemble (next count,
|
||||
index += 5;
|
||||
} else if (array [index] == CALL) {
|
||||
build_call (array [index + 1], array [index + 2]);
|
||||
index += 2;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
@ -6,34 +6,64 @@ segment readable executable
|
||||
|
||||
entry main
|
||||
|
||||
heyo: mov eax, 1
|
||||
heyo:
|
||||
nop
|
||||
mov eax, 1
|
||||
nop
|
||||
mov edi, 1
|
||||
nop
|
||||
mov esi, h
|
||||
nop
|
||||
mov edx, 12
|
||||
nop
|
||||
syscall
|
||||
nop
|
||||
call meme
|
||||
nop
|
||||
ret
|
||||
|
||||
cyaa: mov eax, 1
|
||||
cyaa:
|
||||
nop
|
||||
mov eax, 1
|
||||
nop
|
||||
mov edi, 1
|
||||
nop
|
||||
mov esi, c
|
||||
nop
|
||||
mov edx, 12
|
||||
nop
|
||||
syscall
|
||||
nop
|
||||
ret
|
||||
|
||||
main: call heyo
|
||||
main:
|
||||
nop
|
||||
call heyo
|
||||
nop
|
||||
call cyaa
|
||||
nop
|
||||
mov eax, 60
|
||||
nop
|
||||
mov edi, 60
|
||||
nop
|
||||
syscall
|
||||
|
||||
meme: mov eax, 1
|
||||
meme:
|
||||
nop
|
||||
mov eax, 1
|
||||
nop
|
||||
mov edi, 1
|
||||
nop
|
||||
mov esi, m
|
||||
nop
|
||||
mov edx, 12
|
||||
nop
|
||||
syscall
|
||||
nop
|
||||
ret
|
||||
|
||||
nop
|
||||
|
||||
segment readable writable
|
||||
|
||||
h: db "Heyo world!", 10
|
||||
|
Loading…
x
Reference in New Issue
Block a user