; utils/parse.asm - decimal parsing helper. section .text ; parse_u64: read decimal digits at [RSI] into RAX, advancing RSI past them. ; Stops on the first non-digit. Clobbers RAX, RDX. parse_u64: xor rax, rax .digit: mov dl, [rsi] cmp dl, '0' jl .done cmp dl, '9' jg .done sub dl, '0' movzx rdx, dl imul rax, rax, 10 add rax, rdx inc rsi jmp .digit .done: ret