NASM - The Netwide Assembler
NASM Forum => Using NASM => Topic started by: nobody on March 17, 2008, 10:17:35 PM
-
I want to print a string.
whats wrong with this code?
segment .data
msg db "abcdefg$"
segment .text
global _prog
_prog:
mov dx, msg
mov ah, 09h
int 21h
ret
pls help
-
Missing "org 100h"
Best,
Frank
-
Or... is this supposed to emit a linkable object? "global" would suggest so (doesn't do anything in "-f bin" mode)...
If so:
mov ax, data
mov ds, ax
at the beginning of your code. If it's for Linux, there's a whole lot more than that wrong with it! :) Ya really gotta tell us more about what you're trying to do, and what's happening instead...
Best,
Frank
-
no its for windows
its not working.
the output is something like...
¶?? ??¶ ? ?? ? ?!?
t???F???? ? ?¶ ?ëÍ???!<
i just want to print the string
pls help