Sponsored Content
Top Forums Programming Does the assembler output differ between operating systems ? Post 302387343 by jim mcnamara on Friday 15th of January 2010 10:28:42 AM
Old 01-15-2010
Yes, it can. One reason is the structure/symbol nomenclature of runtime libraries. Another reason is entry points (names) for system calls are not prescribed by any standard, so they could be almost any name the kernel designer decides to use.

This assumes you meant for example, windoze vs unix vs xenix or something like that.
The differences between Linux Suse and Ubuntu, which I have looked at, are minimal.

One thing that can radically change the assembler code, even for the same OS and identical code, is the optimization level. Loop unrolling for example.
 

10 More Discussions You Might Find Interesting

1. News, Links, Events and Announcements

Modern Operating Systems: Tanenbaum

Chapters on Linux and Unix: http://www.prenhall.com/divisions/esm/app/author_tanenbaum/custom/mos2e/ Slides, figures, code, lots of goodies on-line! CHAPTER 10 CASE STUDY 1: UNIX AND LINUX 671 10.1. HISTORY OF UNIX 672 10.1.1. UNICS 672 ... (1 Reply)
Discussion started by: Neo
1 Replies

2. Filesystems, Disks and Memory

Operating Systems??

We are currently running two servers each with remote file systems mounted on each other. They need upgrading from Solaris 2.6 to 8. Does anyone know if there is a problem with having one server running Solaris 2.6 and the other v8?? Until we have time to upgrade them both. (2 Replies)
Discussion started by: hesmas
2 Replies

3. UNIX for Advanced & Expert Users

Opinions on db operating systems Wanted

I am interested in hearing anyones opinions on what OS they would choose to run a MySQl db and the reasons why, of course. I have a task to build a db server for a project that will be very busy if things work as the creative minds think that it will. I am running a FreeBSD box right now on... (0 Replies)
Discussion started by: smtpgeek
0 Replies

4. Shell Programming and Scripting

Unix Operating Systems Information Document

Hi all, I prepared a document on UNIX OS. Its an humble attempt to share my knowledge. Please review the document attached and correct if any mistakes and any suggestions to make it more useful and any troubleshooting information if needed to add. Please help in making the document to add... (2 Replies)
Discussion started by: gurukottur
2 Replies

5. Programming

How to use assembler (as) in UNIX? [I got errors using assembler]

Hi, folks, I have a simple program main.c. The program is very simple, just for testing purpose. The program was proven correct by using "gcc". Now I would compile it step by step from main.c to main.o. Here is what I did: cpp main.c main.i <This step succeeded> cc main.i -o... (5 Replies)
Discussion started by: meili100
5 Replies

6. UNIX for Advanced & Expert Users

Where the operating systems are going

Dear administrators I want to post the following question and, honestly, I don't know in which forum to post it since its general meaning. my question is: Where the operating system are going? Microkernel, monolithich or hybrid ? Because this question involves more forums at the same but... (2 Replies)
Discussion started by: Puntino
2 Replies

7. UNIX for Dummies Questions & Answers

unix Operating Systems 5

Hi :) I have unix Operating Systems 5 I need working for user logout befor 10 minutes,In the case that he is not active :o what do I do? :rolleyes: (4 Replies)
Discussion started by: fakhwork
4 Replies

8. Fedora

Unix-based operating systems

Hello. I own a MacBook (black) running Leopard (Mac OS X 10.5.8), and I'm curious about a few things -- any help will be very, very much appreciated. I'm pretty much a newbie to Unix, although I have some very basic command-line skills with Mac OS X's Terminal. So while I know how to work the... (13 Replies)
Discussion started by: Tron55555
13 Replies

9. Google Chrome OS

Do we need many Operating Systems?

we have windows linux- redhat ubuntu -or more i don't know unix- solares snow-lepord and recently chrome what do you think well when i sow that all has extentions like exe -dsb i felt scared (1 Reply)
Discussion started by: Anna Hussie
1 Replies

10. Shell Programming and Scripting

Store user input in differ

Hello all Can anyone help me to solve the below issue I want to take user input with space separated .The number of inputs can be variable like if user inputs 1 2 3 4 ouput will stored in as array a where i=4 and I can retreive the value like a =3 any thoughts how to do it ... (2 Replies)
Discussion started by: Pratik4891
2 Replies
gasp(1) 						       GNU Development Tools							   gasp(1)

NAME
gasp - a preprocessor for assembly programs SYNOPSIS
gasp [-a|--alternate] [-c CHAR | --commentchar CHAR] [-d|--debug] [-h|--help] [-M|--mri] [-o OUTFILE | --output OUTFILE] [-p|--print] [-s|--copysource] [-u|--unreasonable] [-v|--version] INFILE ... DESCRIPTION
The primary purpose of the GNU assembler is to assemble the output of other programs--notably compilers. When you have to hand-code spe- cialized routines in assembly, that means the GNU assembler is an unfriendly processor: it has no directives for macros, conditionals, or many other conveniences that you might expect. In some cases you can simply use the C preprocessor, or a generalized preprocessor like M4; but this can be awkward, since none of these things are designed with assembly in mind. gasp fills this need. It is expressly designed to provide the facilities you need with hand-coded assembly code. Implementing it as a preprocessor, rather than part of the assembler, allows the maximum flexibility: you can use it with hand-coded assembly, without paying a penalty of added complexity in the assembler you use for compiler output. INFILE... are the files to be preprocessed. OPTIONS
The simplest way to use GASP is to run it as a filter and assemble its output. In Unix and its ilk, you can do this, for example: $ gasp prog.asm | as -o prog.o Naturally, there are also a few command-line options to allow you to request variations on this basic theme. Here is the full set of pos- sibilities for the GASP command line. -a --alternate Use alternative macro syntax. *Note Alternate macro syntax: Alternate, for a discussion of how this syntax differs from the default GASP syntax. -c CHAR --commentchar CHAR Use CHAR as the comment character. The default comment character is `!'. For example, to use a semicolon as the comment character, specify `-c ';'' on the GASP command line. Since assembler command characters often have special significance to command shells, it is a good idea to quote or escape CHAR when you specify a comment character. For the sake of simplicity, all examples in this manual use the default comment character `!'. -d --debug Show debugging statistics. In this version of GASP, this option produces statistics about the string buffers that GASP allocates internally. For each defined buffersize S, GASP shows the number of strings N that it allocated, with a line like this: strings size S : N GASP displays these statistics on the standard error stream, when done preprocessing. -h --help Display a summary of the GASP command line options. -M --mri Use MRI compatibility mode. Using this option causes GASP to accept the syntax and pseudo-ops used by the Microtec Research `ASM68K' assembler. -o OUTFILE --output OUTFILE `-o OUTFILE' `--output OUTFILE' Write the output in a file called OUTFILE. If you do not use the `-o' option, GASP writes its out- put on the standard output stream. -p --print Print line numbers. GASP obeys this option _only_ if you also specify `-s' to copy source lines to its output. With `-s -p', GASP displays the line number of each source line copied (immediately after the comment character at the beginning of the line). -s --copysource Copy the source lines to the output file. Use this option to see the effect of each preprocessor line on the GASP output. GASP places a comment character (`!' by default) at the beginning of each source line it copies, so that you can use this option and still assemble the result. -u --unreasonable Bypass "unreasonable expansion" limit. Since you can define GASP macros inside other macro definitions, the preprocessor normally includes a sanity check. If your program requires more than 1,000 nested expansions, GASP normally exits with an error message. Use this option to turn off this check, allowing unlimited nested expansions. -v --version Display the GASP version number. INFILE ... The input file names. You must specify at least one input file; if you specify more, GASP preprocesses them all, concatenating the output in the order you list the INFILE arguments. Mark the end of each input file with the preprocessor command `.END'. SEE ALSO
`gasp' entry in info; The GNU Binary Utilities, Roland H. Pesch (October 1991); gasp(1). Debian September 1999 gasp(1)
All times are GMT -4. The time now is 09:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy