LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 06-01-2006, 02:00 AM   #1
omerlh
LQ Newbie
 
Registered: Oct 2005
Location: Israel
Distribution: Mandriva
Posts: 14

Rep: Reputation: 0
assembly code on linux


Hello!
I just start learning assembly. I learn it at school on windows. I also want run it on my linux box, with nasm, and it had problems. this is the code:
Code:
cseg        segment
assume      cs:segment
start:      mov ax, 4000
            mov ds, ax
            mov si, 1000
            mov ch, 88
            mov ds:[si], ch
cseg        ends
end         start
nasm output was:
Code:
irst.asm:1: error: parser: instruction expected
irst.asm:2: error: parser: instruction expected
irst.asm:8: error: symbol `cseg' redefined
irst.asm:8: error: parser: instruction expected
irst.asm:9: error: parser: instruction expected
I don't know what the problem is, but on widows it worked. Someone told me the I need to change some orders to unix. Does it true? What to change?
And another question: I try install the ald assembly debugger. It a good debugger? There is something better?
Omer.
 
Old 06-01-2006, 03:25 AM   #2
cupubboy
Member
 
Registered: May 2003
Location: Bucharest,Romania
Distribution: Fedora Core 7
Posts: 109

Rep: Reputation: 15
Quote:
Originally Posted by omerlh
Hello!
I just start learning assembly. I learn it at school on windows. I also want run it on my linux box, with nasm, and it had problems. this is the code:
Code:
cseg        segment
assume      cs:segment
start:      mov ax, 4000
            mov ds, ax
            mov si, 1000
            mov ch, 88
            mov ds:[si], ch
cseg        ends
end         start
nasm output was:
Code:
irst.asm:1: error: parser: instruction expected
irst.asm:2: error: parser: instruction expected
irst.asm:8: error: symbol `cseg' redefined
irst.asm:8: error: parser: instruction expected
irst.asm:9: error: parser: instruction expected
I don't know what the problem is, but on widows it worked. Someone told me the I need to change some orders to unix. Does it true? What to change?
And another question: I try install the ald assembly debugger. It a good debugger? There is something better?
Omer.
One thingi rememberfromthe nasm manual is "NASM does not ASSUME"

Anyway your syntaxis wrong... you needto use nasm syntax
 
  


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
gcc/Assembly code gigantas1985 Programming 0 02-28-2006 05:52 AM
Reading Assembly code max_rsr Programming 4 07-22-2005 08:06 AM
Need Assembly Code Reference Table marky782 Linux - General 6 02-16-2004 06:53 PM
Command for getting assembly code aizkorri Programming 1 06-18-2002 05:04 AM

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

All times are GMT -5. The time now is 05:46 AM.

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