diff options
author | June McEnroe <programble@gmail.com> | 2016-12-02 04:58:57 -0500 |
---|---|---|
committer | June McEnroe <programble@gmail.com> | 2016-12-02 04:58:57 -0500 |
commit | a1010618a24474e4c8253d2fc1df300474bac609 (patch) | |
tree | e08b59b1e842f2bd948626c87624cee71c2d2e7f /day01.asm | |
parent | Rewrite day 1 solution (diff) | |
download | aoc-a1010618a24474e4c8253d2fc1df300474bac609.tar.gz aoc-a1010618a24474e4c8253d2fc1df300474bac609.zip |
Add 32-bit hex formatting
Diffstat (limited to 'day01.asm')
-rw-r--r-- | day01.asm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/day01.asm b/day01.asm index 8ad4c66..fd31fce 100644 --- a/day01.asm +++ b/day01.asm @@ -1,4 +1,5 @@ %include "sys.asm" +%include "lib.asm" %define rPosX r8 %define rPosY r9 @@ -65,5 +66,10 @@ _start: xor rPosY, rax sub rPosY, rax - lea rax, [rPosX + rPosY] + lea rdi, [rPosX + rPosY] + call hex32 + push rax + syscall SYS_WRITE, FD_STDOUT, rsp, 8 + + xor rax, rax syscall SYS_EXIT, rax |