Sponsored Content
Top Forums Programming 'seg' assembly instruction in .s file Post 302461994 by shamrock on Wednesday 13th of October 2010 02:29:45 AM
Old 10-13-2010
seg es is a directive that tells the assembler which segment...code/data etc. is affected by the instructions that follow it.
 

7 More Discussions You Might Find Interesting

1. Programming

Open Suse 10 seg fault

Okay, so here is some code that when compiled on Fedora Core 6 works great, but when I compile and run it on OpenSuse 10 it gives back a seg fault when trying to join the 2nd thead. #include <pthread.h> #include <stdio.h> int print_message_function( void *ptr ); int x = 1; main() { ... (1 Reply)
Discussion started by: chrisdrobison
1 Replies

2. HP-UX

HP-UX 64 compilation causing some code to seg fault

Hello everyone, Today we are attempting to port some legacy C code to a 64 HP-UX machine at my company and there is kind of a strange error we ran into. there is a small function they have defined called zgetenv that accepts a char* and basically just does some null checking and returns ... (0 Replies)
Discussion started by: khadesh
0 Replies

3. Programming

Xlib Problem: XCloseDisplay seg fault

Hi, First of all forgive me if Xlib related problems does not go under this thread. In my main program, im using Xlib`s XImage type object which contains a regularly updating bitmap, and maps the XImage to a Xwindow using XPutImage. ( XCreateImage is used to create the XImage. ) The... (0 Replies)
Discussion started by: wolwy_pete
0 Replies

4. Programming

Seg Fault Running AIX COBOL program

Hi some help read............ I'm getting a segmentation fault when I run an AIX COBOL/Db2 program. I initiate the program from the command line, but it hangs, and then when I press enter it generates a segmantation fault and produces a core dump. The box is running AIX software level ... (5 Replies)
Discussion started by: steve_f
5 Replies

5. UNIX for Dummies Questions & Answers

Add a header to a sort file instruction

Hello, I have a header which I have to add to a sorted file, however if I use cat header sortedfile > newfile, the operation takes 2 minutes as the sorted file is over 400mb. I have noticed that when I sort the 400mb unsorted file, this only takes 14 seconds to create the output. As... (2 Replies)
Discussion started by: clarcombe
2 Replies

6. Programming

Are there any C code r instruction to see where is the creation or last edit for the file

Are there any C or termina instructin code or instruction to see where is the creation or last edit for the file (1 Reply)
Discussion started by: fwrlfo
1 Replies

7. Shell Programming and Scripting

[perl script] print the assembly instruction and count the occurence

Hi, I have a input file(text file) with the following lines. 0x000000 0x5a80 0x0060 BRA.l 0x60 ;file:UserCall.s ;function:_user_call_table ;C_sourceLine:24 0x000002 0x1bc5 RETI ;file:UserCall.s ;function:_user_call_table ;C_sourceLine:30 0x000003 0x6840 MOV R0L,R0L ;file:UserCall.s... (6 Replies)
Discussion started by: acdc
6 Replies
spim(1) 						      General Commands Manual							   spim(1)

NAME
xspim - A MIPS32 Simulator SYNTAX
xspim [-asm/-bare -exception/-noexception -quiet/-noquiet -mapped_io/-nomapped_io -delayed_branches -delayed_loads -stext size -sdata size -sstack size -sktext size -skdata size -ldata size -lstack size -lkdata size -hexgpr/-nohexgpr -hexfpr/-nohexfpr] -file file -execute file DESCRIPTION
SPIM S20 is a simulator that runs programs for the MIPS32 RISC computers. SPIM can read and immediately execute files containing assembly language or MIPS executable files. SPIM is a self-contained system for running these programs and contains a debugger and interface to a few operating system services. SPIM comes in two versions. The plain version is called spim. It runs on any type of terminal. It operates like most programs of this type: you type a line of text, hit the return key, and spim executes your command. The fancier version of SPIM is called xspim. It uses the X-window system, so you must have a bit-mapped display to run it. xspim, however, is a much easier program to learn and use because its commands are always visible on the screen and because it continually displays the machine's registers. OPTIONS
xspim has many options: -asm Simulate the virtual MIPS machine provided by the assembler. This is the default. -bare Simulate a bare MIPS machine without pseudo-instructions or the additional addressing modes provided by the assembler. Implies -quiet. -exception Load the standard exception handler and startup code. This is the default. -noexception Do not load the standard exception handler and startup code. This exception handler handles exceptions. When an exception occurs, SPIM jumps to location 0x80000080, which must contain code to service the exception. In addition, this file contains startup code that invokes the routine main. Without the startup routine, SPIM begins execution at the instruction labeled __start. -quiet Print a message when an exception occurs. This is the default. -noquiet Do not print a message at exceptions. -mapped_io Enable the memory-mapped IO facility. Programs that use SPIM syscalls to read from the terminal cannot also use memory-mapped IO. -nomapped_io Disable the memory-mapped IO facility. -delayed_branches Simulate MIPS's delayed control transfers by executing the instruction after a branch, jump, or call before transferring control. SPIM's default is to simulate non-delayed transfers, unless the -bare flag is set. -delayed_loads Simulate MIPS's original, non-interlocked load instructions. SPIM's default is to simulate non-delayed loads, unless the -bare flag is set. -stext size -sdata size -sstack size -sktext size -skdata size Sets the initial size of memory segment seg to be size bytes. The memory segments are named: text, data, stack, ktext, and kdata. The text segment contains instructions from a program. The data segment holds the program's data. The stack segment holds its runtime stack. In addition to running a program, SPIM also executes system code that handles interrupts and excep- tions. This code resides in a separate part of the address space called the kernel. The ktext segment holds this code's instructions and kdata holds its data. There is no kstack segment since the system code uses the same stack as the program. For example, the pair of arguments -sdata 2000000 starts the user data segment at 2,000,000 bytes. -ldata size -lstack size -lkdata size Sets the limit on how large memory segment seg can grow to be size bytes. The memory segments that can grow are data, stack, and kdata. -hexgpr Disply the general purpose registers (GPRs) in hexadecimal. -nohexgpr Disply the general purpose registers (GPRs) in decimal. -hexfpr Disply the floating-point registers (FPRs) in hexadecimal. -nohexfpr Disply the floating-point registers (FPRs) as floating-point values -file file 10 Load and execute the assembly code in the file. -execute file 10 Load and execute the MIPS executable (a.out) file. Only works on systems using a MIPS processors. BUGS
Instruction opcodes cannot be used as labels. SEE ALSO
spim(1) James R. Larus, ``SPIM S20: A MIPS R2000 Simulator,'' included with SPIM distribution. AUTHOR
James R. Larus, Computer Sciences Department, University of Wisconsin-Madison. Current address: James R Larus (larus@microsoft.com), Mi- crosoft Research. spim(1)
All times are GMT -4. The time now is 01:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy