-
January 26th, 2004, 09:56 PM
#1
Member
NASM Not Working
i wrote a simple hello world program in NASM and when i compiled it and tried to run it it said "permision denied". im running linux and the code follows:
section .data ;declare data here
msg db "Hello, World!!!", 0xa ;declare msg as the string 'hello, world!'
len equ $ - msg ;declare len as the length of msg
section .text ;declare code here
global _start ;declare where to start
_start:
;sys_write msg to stdout and stop writing at len
mov edx, len; length
mov ecx, msg; string
mov ebx, 1; stdout
mov eax, 4; sys_write
int 0x80; interupt 80h
mov ebx, 0;
mov eax, 1;
int 0x80; exit
when i compiled it i typed in
nasm helloworld.asm -o helloworld
what could be wrong???
You laugh because im different, i laugh because your all the same.
-
January 26th, 2004, 10:34 PM
#2
Do you have permissions set so you can execute the file. Since you're the owner i'm assuming, just a quick chmod +x should do the trick for you.
Is there a sum of an inifinite geometric series? Well, that all depends on what you consider a negligible amount.
-
January 27th, 2004, 12:26 AM
#3
Member
I did that, and now it says "bash: ./helloworld: cannot execute binary file"
what should i do now??
You laugh because im different, i laugh because your all the same.
-
January 27th, 2004, 12:53 AM
#4
Member
i figured out the problem... sorry...
You laugh because im different, i laugh because your all the same.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|