Good afternoon;:)

what is wrong in this code ,
its job to print a name in reverse order

name  dword 20 dup(' '),0
 .
.
.
.
.
 
mov edx,offset name
 mov esi,offset name
 mov ecx,lengthof name
 L7:mov edx,[esi]
    call writestring
    dec esi
    loop L7

when running programe this massege apear in the black screen:

syntex error: name

Recommended Answers

All 4 Replies

name dword 20 dup(' '),0

is wrong. Probably it should be:

name db 20 dup( ' ' ), 0

But in the highly unlikely event that you really did need 32 bit double words there, it should be:

name dd 20 dup( ' ' ), 0

name dword 20 dup(' '),0

is wrong. Probably it should be:

name db 20 dup( ' ' ), 0

But in the highly unlikely event that you really did need 32 bit double words there, it should be:

name dd 20 dup( ' ' ), 0

ya, but error still there . :X

I'm not sure if "name" is a reserved word. You could try calling it something else.

so what can i do now,
I have to submit this assi. Today !

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.