summary refs log tree commit diff homepage
path: root/day01.asm
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2016-12-02 04:58:57 -0500
committerJune McEnroe <june@causal.agency>2016-12-02 04:58:57 -0500
commit5c3858a91442a331866049802fa57381e5cbb1ee (patch)
treee08b59b1e842f2bd948626c87624cee71c2d2e7f /day01.asm
parentRewrite day 1 solution (diff)
downloadaoc-5c3858a91442a331866049802fa57381e5cbb1ee.tar.gz
aoc-5c3858a91442a331866049802fa57381e5cbb1ee.zip
Add 32-bit hex formatting
Diffstat (limited to 'day01.asm')
-rw-r--r--day01.asm8
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