linux-assembly.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Tiny pivot root for asmutils-collection ...
@ 2002-12-09  0:23 Fabian Franz
  2002-12-09 15:11 ` man x86<instruction> Claes Nyberg
  0 siblings, 1 reply; 2+ messages in thread
From: Fabian Franz @ 2002-12-09  0:23 UTC (permalink / raw)
  To: linux-assembly

I needed it for an initrd-project:

section .text           ; declaring our .text segment
        global  _start  ; telling where program execution should start

        _start:                 ; this is where code starts getting exec'ed
        pop     ebx             ; argc
        pop     ebx             ; argv[0]
        pop     ebx             ; the first real arg, new_root
        pop     ecx             ; the first real arg, put_old


        mov     eax,217         ; the syscall number for pivot_root
                                ; we already have the new_root in ebx and 
put_old in ecx

        int     80h             ; call the kernel

        mov     ebx,eax         ; save the errno in ebx
        mov     eax,1           ; put the exit syscall number in eax
        int     80h             ; bail out

It was pretty easy to program; thx to the great tutorials on 
linuxassembly.org. Perhaps you have a use for it ? Its GPL, so feel free to 
add it ...

cu

Fabian

^ permalink raw reply	[flat|nested] 2+ messages in thread

* man x86<instruction>
  2002-12-09  0:23 Tiny pivot root for asmutils-collection Fabian Franz
@ 2002-12-09 15:11 ` Claes Nyberg
  0 siblings, 0 replies; 2+ messages in thread
From: Claes Nyberg @ 2002-12-09 15:11 UTC (permalink / raw)
  To: linux-assembly


Hi list,
Is there UNIX man pages available for x86/avr/mips/sparc instructions
somwhere?
It would be nice to be able to write for example 'man x86lea' instead of
scanning the instruction set reference file.


// Claes

------------------------------------------------------------------------------
Home: http://www.mdstud.chalmers.se/~md0claes/
------------------------------------------------------------------------------
Citation :
The number of UNIX installations has grown to 10, with more expected.
_The UNIX Programmer's Manual_, Second Edition, June, 1972
------------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-12-09 15:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-09  0:23 Tiny pivot root for asmutils-collection Fabian Franz
2002-12-09 15:11 ` man x86<instruction> Claes Nyberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).