I will be working on a large Assembly project, but now I'm just starting to learn this new language. I am trying to make some simple examples, for example, you can find for C ++ in highschool (the sum of two numbers, the number of primes, etc.).
Now I need to display all primes up to n. The problem is that the application freezes when printf is called, and I have no idea why.
Can you help me?
.section .data prime_number_str: .asciz "%d " .section .text .global _start _start: pushl $20 call .first_prime_numbers addl $4, %esp pushl $0 call exit .first_prime_numbers:
assembly printf
Davidh
source share