mainProgramming from the Ground Up Book - Support: sr #105971, First Program Won't assemble

 
 

sr #105971: First Program Won't assemble

Submitter:  None
Submitted:  Thu 16 Aug 2007 03:58:41 PM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  4 - Important Status:  None
Privacy:  Public Assigned to:  None
Originator Email:  -email is unavailable- Open/Closed:  Open
Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 03 Oct 2007 05:52:46 AM UTC, comment #1: 

Hi, I've tested the exit.s code on Debian 4.0 and Slackware 12.0 and everything seems to be working fine. It seems to me, from the output you've posted, that you're typing mov1 (mov, one) rather than movl (mov, the letter L). I hope this helped.

Regards,
  Mark

Anonymous
Thu 16 Aug 2007 03:58:41 PM UTC, original submission:  

I'm very interested in going through this book and learning what it has to teach me. I'm using a MacBook Pro. Although the book says it works with Linux, I first tried to enter the first program exit.s, into a file on my Mac. When that didn't work, I installed Ubuntu, on the Mac under the Parallels Desktop virtualization. When that didn't work, I tried using a shell account I have with my web server.

Ubuntu and the shell account (which is Linux, although I don't know which distribution) all provide the same results when I attempt to assemble the program:

exit.s: Assembler messages:
exit.s:22: Error: no such instruction: `mov1 $1,%eax'
exit.s:26: Error: no such instruction: `mov1 $0,%ebx'

Mac OS X provided similar, although additional, errors:

exit.s:20:Expected comma after segment-name
exit.s:21:Expected comma after segment-name
exit.s:21:Rest of line ignored. 1st junk character valued 32 ( ).
exit.s:23:no such instruction: `mov1 $1,%eax'
exit.s:27:no such instruction: `mov1 $0,%ebx'

Do I need to use an older version of Linux? The book says that everything was tested with Red Hat 8, but I haven't found a download of that (or Fedora 1, which seems to be from the same general era).

Any pointers would be appreciated. I do have, in addition to my Macs, an old PC box that I could conceivably use if virtualization won't work.

Thanks,
Chuck

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #13672:  exit.s added by None (862B)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follows 1 latest change.

Date Changed by Updated Field Previous Value => Replaced by
2007-08-16 None Attached File- Added exit.s, #13672

Back to the top

Powered by Savane 3.14-f13d.
Corresponding source code