I want to print a message 10 times
My compiler : NASM
OS : Debian

I think I need to create a loop :(
Posted on 2009-05-07 03:13:09 by federal
i db 0

inc i
cmp i,10
jne aa

Tell me if this helps
Posted on 2009-05-07 03:32:19 by karthikeyanck
Good reply :)

Only suggestion is that we should not keep the counter in data variable.
Instead we should keep the counter in a register.
This way we can perform the loop more quickly by avoiding needless memory access of counter.
Posted on 2009-05-07 03:43:18 by Homer

thats where you should put code to print your message, its not actual sourcecode!
Posted on 2009-05-07 04:00:21 by Homer
section .text

global _start

mov cx,10 
dec cx     
cmp cx,10 
jnz dongu

.... ???
.... ???
.... ?????

section .data
msg db "www.asmcommunity.net",0xA
Posted on 2009-05-07 09:20:32 by federal

Seriously? Compare yours to karthikeyanck's and answer the following questions:

What value will cx have after the first dec?
Does yours loop? Why not?
How do you print a message?
Posted on 2009-05-07 11:13:43 by JimmyClif
code 10 times to print only the message

missing code
Posted on 2009-05-07 11:26:31 by federal

code 10 times to print only the message

missing code

The Linux Assembly site has various documents, tutorials and examples. One particular example, Hello, world!, has all of the "missing" information you need to achieve your goal.
Posted on 2009-05-07 13:22:49 by SpooK