on-internet
← Community

linux nasm assembly print all numbers from zero to 100

Stack Overflow ·

I am writing a program to print out all the numbers from zero to 100. The only reason I am doing this is to test out printing out multiple digit numbers. The problem that I am having is that my program is only printing out the numbers 1 and 2. I have no idea why. My compiler compiles fine, without error, as well as no linker errors. Here is my code: SECTION .data len EQU 32 NUL EQU 0 countlen EQU 8 SECTION .bss counter resb countlen strlen resb countlen SECTION .text GLOBAL _start _start: mov BYTE[counter], 1 ; set counter to 1 mov BYTE[strlen], 1 ; set string length counter to 1 mov ecx, coun

Comments

Sign in or sign up to comment and upvote.

No comments yet.