diff options
author | June McEnroe <june@causal.agency> | 2016-12-02 04:58:57 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2016-12-02 04:58:57 -0500 |
commit | 5c3858a91442a331866049802fa57381e5cbb1ee (patch) | |
tree | e08b59b1e842f2bd948626c87624cee71c2d2e7f /day01.asm | |
parent | Rewrite day 1 solution (diff) | |
download | aoc-5c3858a91442a331866049802fa57381e5cbb1ee.tar.gz aoc-5c3858a91442a331866049802fa57381e5cbb1ee.zip |
Add 32-bit hex formatting
Diffstat (limited to '')
-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 |