LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-08-2004, 08:31 AM   #1
devit
Member
 
Registered: Jan 2004
Distribution: Slackware 9.1
Posts: 82

Rep: Reputation: 15
Hello world problem


I wrote this assembly code(a program that should print Hello, world! on the screen):

Code:
.data
msg:
	.string	"Hello, world!\n"
.text
.globl _start
_start:

        mov     $13,%edx
        mov     msg,%ecx
        mov     $1,%ebx
        mov     $4,%eax
        int     $0x80

        mov     $1,%eax
        int     $0x80
and compiled it using this commands:
Code:
as -o hello.o hello.s
ld -s -o hello hello.o
but when I run it I see nothing on the screen.
Could you help me find the problem and fix it!

Thanks!
 
Old 05-08-2004, 09:24 AM   #2
arvind_sv
Member
 
Registered: Oct 2002
Location: Bangalore
Distribution: Gentoo Linux
Posts: 96

Rep: Reputation: 16
mov $msg,%ecx

Arvind
 
Old 05-08-2004, 12:28 PM   #3
devit
Member
 
Registered: Jan 2004
Distribution: Slackware 9.1
Posts: 82

Original Poster
Rep: Reputation: 15
Thanks for your reply!
Could you tell me how could I modify it to make it write numbers on the screen!

Thanks!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Another World of Warcraft question/problem... Bokathebard Linux - Games 0 10-23-2005 03:48 AM
Hello World problem tayolinux Programming 5 07-28-2004 03:17 PM
QT Hello world linker problem digitized_funk Programming 0 10-19-2003 01:30 AM
RH8 - Quake World Problem cricket Linux - Software 0 01-17-2003 01:34 PM
Small hello world problem, again!, sorry. scatcat Programming 4 04-05-2002 01:45 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration