9

Linux x64 Assembly

view full story
linux-howto

http://stackoverflow.com – I am in the process of creating my own toy programming language called SP4RX following Jack Crenshaw's amazing compiler tutorials (translated into c++). I am building on a 64 bit Ubuntu system, and am thus learning assembly for the compiler. I am making an addition program as a start: but I get a segmentation fault and the core is dumped :( section .text global _start _start: mov rax, 0 add rax, [num1B] add rax, [num2B] mov [result], rax mov rdx, [result] mov rcx, 8 mov rax, 4 mov rbx, 1 int 80h mov rbx, 1 mov rax, 0 int 80h section .data num1B: db 0Ah num2B: db 0Ah result: db 0 s (HowTos)