global _start struc ellipse major: resd 1 minor: resd 1 area: resd 1 circumference: resd 1 eccentricity: resd 1 endstruc section .data e: istruc ellipse at major, dd 0 at minor, dd 0 at area, dd 0 at circumference, dd 0 at eccentricity, dd 0 iend section .rodata noexec nowrite align=4 pi: dd 3.141592653589793238462 section .text _start: finit mov ebx, 100 ; .repeat: lea edi, [rbx + 0] call print_uint32 ; dec ebx ; jge .repeat xor edi, edi mov eax, 231 syscall ; mov rax, 60 ; mov rdi, 0 ; syscall ; void print_uint32(uint32_t edi) ; ; https://stackoverflow.com/questions/13166064/how-do-i-print-an-integer-in-assembly-level-programming-without-printf-from-the print_uint32: mov eax, edi mov ecx, 0xa push rcx mov rsi, rsp sub rsp, 16 .to_ascii_digit: xor edx, edx div ecx add edx, '0' dec rsi mov [rsi], dl test eax, eax jnz .to_ascii_digit mov eax, 1 mov edi, 1 lea edx, [rsp + 16 + 1] sub edx, esi syscall add rsp, 24 ret