adventofcode2023/06/main.s

24 lines
344 B
ArmAsm
Raw Normal View History

2023-12-06 00:10:38 -06:00
global _start
[bits 64]
[section .text]
_start:
mov rsi, 53837288
mov rdi, 0x12F02ACD6888C
xor rbp, rbp ; poss
mov rcx, 1 ; test ms
check_strat:
mov rax, rsi
sub rax, rcx ; remaining time
mul rcx
cmp rax, rdi ; low part
jbe .cont
inc rbp
.cont:
inc rcx
cmp rcx, rsi
jl check_strat
game_over:
2023-12-06 00:32:01 -06:00
jmp $ ; result in rbp go grab a debugger lol