something's screwed up with im im handling string variables :/
This commit is contained in:
22
out.asm
22
out.asm
@@ -1,9 +1,27 @@
|
||||
section .data
|
||||
.LC0: db "Hello, World!", 0
|
||||
.LC1: equ $ - .LC0
|
||||
|
||||
section .text
|
||||
global _start
|
||||
|
||||
_start:
|
||||
; InstructionNode(instruction='divide', parent=RootNode(statements=[...]), arguments=[])
|
||||
; FUCK
|
||||
; InstructionNode(instruction='set', parent=RootNode(statements=[..., InstructionNode(instruction='set', parent=..., arguments=[VariablePointer, Int]), InstructionNode(instruction='stdlnout', parent=..., arguments=[VariableReference]), InstructionNode(instruction='end', parent=..., arguments=[VariableReference])]), arguments=[VariablePointer, String])
|
||||
lea rax, [.LC0]
|
||||
push rax
|
||||
lea rax, .LC1
|
||||
push rax
|
||||
; InstructionNode(instruction='set', parent=RootNode(statements=[InstructionNode(instruction='set', parent=..., arguments=[VariablePointer, String]), ..., InstructionNode(instruction='stdlnout', parent=..., arguments=[VariableReference]), InstructionNode(instruction='end', parent=..., arguments=[VariableReference])]), arguments=[VariablePointer, Int])
|
||||
mov rax, 123
|
||||
push rax
|
||||
; InstructionNode(instruction='stdlnout', parent=RootNode(statements=[InstructionNode(instruction='set', parent=..., arguments=[VariablePointer, String]), InstructionNode(instruction='set', parent=..., arguments=[VariablePointer, Int]), ..., InstructionNode(instruction='end', parent=..., arguments=[VariableReference])]), arguments=[VariableReference])
|
||||
mov rsi, [rsp + 16]
|
||||
mov rdx, [rsp + 24]
|
||||
mov rax, 1
|
||||
mov rdi, 1
|
||||
syscall
|
||||
; InstructionNode(instruction='end', parent=RootNode(statements=[InstructionNode(instruction='set', parent=..., arguments=[VariablePointer, String]), InstructionNode(instruction='set', parent=..., arguments=[VariablePointer, Int]), InstructionNode(instruction='stdlnout', parent=..., arguments=[VariableReference]), ...]), arguments=[VariableReference])
|
||||
mov rax, 60
|
||||
mov rdi, [rsp + 0]
|
||||
syscall
|
||||
|
Reference in New Issue
Block a user