Isolating remainder in nasm program
问题 I'm currently writing a NASM program on x86 Linux and I'm trying to perform a calculation that divides the first command line arg (a year) by the first leap year check. I want to check if the remainder is 0 or not but I'm struggling with how to do that. I know the div command stores the answer in a certain register and a remainder in another but right now I'm just using test. Here's the code global main extern puts extern printf extern atoi section .text main: sub rsp, 8 cmp rdi, 2 jne error1