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
AS(1)							      General Commands Manual							     AS(1)

NAME
as - Mac OS X Mach-O GNU-based assemblers SYNOPSIS
as [ option ... ] [ file ... ] DESCRIPTION
The as command translates assembly code in the named files to object code. If no files are specified, as reads from stdin. All undefined symbols in the assembly are treated as global. The output of the assembly is left in the file a.out by default. The program /usr/bin/as is actually a driver that executes assemblers for specific target architectures. If no target architecture is specified, it defaults to the architecture of the host it is running on. OPTIONS
-o name Name the output file name instead of a.out. -arch arch_type Specifies the target architecture, arch_type, of the assembler to be executed. The target assemblers for each architecture are in /usr/libexec/gcc/darwin/arch_type/as or /usr/local/libexec/gcc/darwin/arch_type/as. There is only one assembler for an architecture family. If the specified target architecture is a machine-specific implementation, the assembler for that architecture family is executed (e.g., /usr/libexec/gcc/darwin/ppc/as for -arch ppc604e). See arch(3) for the currently known arch_types. -arch_multiple Precede any displayed messages with a line stating the program name (as) and the architecture (from the -arch arch_type flag), to distinguish which architecture the error messages refer to. When the cc(1) driver program is run with multiple -arch flags, it invokes as with the -arch_multiple option. -force_cpusubtype_ALL By default, the assembler will produce the CPU subtype ALL for the object file it is assembling if it finds no implementation-spe- cific instructions. Also by default, the assembler will allow implementation-specific instructions and will combine the CPU subtype for those specific implementations. The combining of specific implementations is architecture-dependent; if some combination of instructions is not allowed, an error is generated. With the optional -force_cpusubtype_ALL flag, all instructions are allowed and the object file's CPU subtype will be the ALL subtype. If the target architecture specified is a machine-specific implementation (e.g., -arch ppc603, -arch i486), the assembler will flag as errors instructions that are not supported on that architecture, and it will produce an object file with the CPU subtype for that specific implementation (even if no implementation-specific instructions are used). -dynamic Enables dynamic linking features. This is the default. -static Causes the assembler to treat as an error any features for dynamic linking. Also causes the .text directive to not include the pure_instructions section attribute. -- Use stdin for the assembly source input. -n Instructs the assembler not to assume that the assembly file starts with a .text directive. Use this option when an output file is not to contain a (__TEXT,__text) section or this section is not to be first one in the output file. -f Fast; no need for the assembler preprocessor (``app''). The assembler preprocessor can also be turned off by starting the assembly file with "#NO_APP ". This is intended for use by compilers which produce assembly code in a strict "clean" format that specifies exactly where whitespace can go. The assembler preprocessor needs to be run on hand-written assembly files and/or files that have been preprocessed by the C preprocessor cpp. This is typically needed when assembler files are assembled through the use of the cc(1) command, which automatically runs the C preprocessor on assembly source files. The assembler preprocessor strips out excess spaces, turns single-quoted characters into a decimal constants, and turns # <number> <filename> <level> into .line <number>;.file <filename> pairs. When the assembler preprocessor has been turned off by a "#NO_APP " at the start of a file, it can be turned back on and off again with pairs of "#APP " and "#NO_APP " at the beginnings of lines. This is used by the compiler to wrap assembly statements produced from asm() statements. -g Produce debugging information for the symbolic debugger gdb(1) so that the assembly source can be debugged symbolically. The debug- ger depends on correct use of the C preprocessor's #include directive or the assembler's .include directive: Any include file that produces instructions in the (__TEXT,__text) section must be included while a .text directive is in effect. In other words, there must be a .text directive before the include, and the .text directive must still be in effect at the end of the include file. Oth- erwise, the debugger will get confused when in that assembly file. -v Display the version of the assembler (both the Mac OS X version and the GNU version it is based on). -V Print the path and the command line of the assembler the assembler driver is using. -Idir Add the directory dir to the list of directories to search for files included with the .include directive. The default place to search is the current directory. -W Suppress warnings. -L Save non-global defined labels beginning with an 'L'; these labels are normally discarded to save space in the resultant symbol ta- ble. The compiler generates such temporary labels. Assembler options for the PowerPC processors -static_branch_prediction_Y_bit Treat a single trailing '+' or '-' after a conditional PowerPC branch instruction as a static branch prediction that sets the Y-bit in the opcode. Pairs of trailing "++" or "--" always set the AT-bits. This is the default for Mac OS X. -static_branch_prediction_AT_bits Treat a single trailing '+' or '-' after a conditional PowerPC branch instruction as a static branch prediction that sets the AT- bits in the opcode. Pairs of trailing "++" or "--" always set the AT-bits but with this option a warning is issued if this syntax is used. With this flag the assembler behaves like the IBM tools. -no_ppc601 Treat any PowerPC 601 instructions as an error. Assembler options for the mc680x0 processors -mc68000 and -mc68010 Generate branches that the mc68000 and mc68010 can use (that don't use 32-bit pc-relative jumps and branches, since they are not implemented on these two processors). Not applicable on NeXT machines. -mc68020 Generate branches that use 32-bit pc-relative displacements. This is the default. FILES
a.out output file SEE ALSO
The assembler manual on line in /Developer/Documentation/DeveloperTools/Assembler The assembler source in the cctools module of the Darwin sources. cc(1), ld(1), nm(1), otool(1), arch(3), Mach-O(5) Apple Computer, Inc. May 21, 2003 AS(1)
All times are GMT -4. The time now is 03:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy