From 5c3858a91442a331866049802fa57381e5cbb1ee Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Fri, 2 Dec 2016 04:58:57 -0500 Subject: Add 32-bit hex formatting --- day01.asm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'day01.asm') 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 -- cgit 1.4.1