Fork() in C: (sys_fork.c)

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h> int main(void)
{
fork();
printf("Hello Landpack\n");
return ;
}

Fork() in AT&T for Linux:(sys_fork.s)

.section .rodata
msg: .ascii "Hello Landpack\n"
len = .-msg .section .bass .section .text
.globl _start
_start:
movl $,%eax # sys_fork number ()
int $0x80 # As we know,if we fork() in C
# we will run the double process
# They almost have the same code and data movl $,%eax # sys_write number ()
movl $,%ebx # STDOUT_FILENO == ()
movl $msg,%ecx # The head address of msg
movl $len,%edx # The offset of addr
int $0x80 movl $,%eax
movl $,%ebx
int $0x80

AT&T ASSEMBLY FOR LINUX AND MAC (SYS_FORK)的更多相关文章

  1. AT&T Assembly for Linux and Mac (sys_write)

    Write() in C : (sys_write.c) #include <stdio.h> int main(void) { printf("Hello Landpack\n ...

  2. AT&T Assembly for Linux and Mac (sys_exit)

    Exit() in C : (sys_exit.c) int main(void) { ; } Exit() in AT&T for Linux: (sys_exit.s) .section ...

  3. remote desktop connect btw Mac, Windows, Linux(Ubuntu) Mac,Windows,Linux之间的远程桌面连接

    目录 I. 预备 II. Mac连接Windows III. Windows连接Mac IV. Windows连接Ubuntu V. Mac连接Ubuntu VI. Ubuntu连接Mac VII, ...

  4. 常用Linux/Unix/Mac Os命令

    常用Linux/Unix/Mac OS命令 参考: 1.50 Most Frequently Used UNIX / Linux Commands (With Examples)

  5. MonoDevelop with Visual Studio to Linux and Mac OSX maintaining a single code base for all platforms.

    Home | Screenshots | Download | Contact | FAQ | Documentation | Development | Search   MonoDevelop i ...

  6. Python编程软件的安装与使用——Windows、Linux和Mac

    Python版本:3.6.2  操作系统:Windows  作者:SmallWZQ 最近,有读者透露:Python软件如何安装?为什么自己安装的软件会有各种"奇怪"的问题?据此,本 ...

  7. Linux修改MAC地址方法

    Linux修改MAC地址方法 - Linux modifies MAC address method ifconfig wlan0 down ifconfig wlan0 hw ether MAC地址 ...

  8. Linux根据MAC地址自动设置IP

    Linux根据MAC地址自动设置IP #!/bin/sh #============config============ route_defa=60.12.70.65 addr_ip= link_ma ...

  9. git core.autocrlf配置 解决Windows和Linux(Mac)换行问题

    格式化 格式化是许多开发人员在协作时,特别是在跨平台情况下,遇到的令人头疼的细小问题. 由于编辑器的不同或者Windows程序员在跨平台项目中的文件行尾加入了回车换行符, 一些细微的空格变化会不经意地 ...

随机推荐

  1. win 7安装 linux

    http://blog.csdn.net/wuwenxiang91322/article/details/23528619

  2. scala 学习: case class

    case class: 1.定义为case class 的类在实例化时,可以不使用new 关键字. case class People(name:String, age:Int) val zhangs ...

  3. HashedWheelTimer 原理

    HashedWheelTimer 是根据 Hashed and Hierarchical Timing Wheels: Data Structuresfor the Efficient Impleme ...

  4. zabbix使用sendEmail发送邮件报警

    sendEmail是一个轻量级,命令行的SMTP邮件客户端.如果你需要使用命令行发送邮件,那么sendEmail是非常完美的选择:使用简单并且功能强大.这个被设计用在php.bashperl和web站 ...

  5. c++垃圾回收代码练习 引用计数

    学习实践垃圾回收的一个小代码 采用引用计数 每次多一个指针指向这个分配内存的地址时候 则引用计数加1 当计数为0 则释放内存 他的难点在于指针之间的复制 所有权交换 计数的变化 #include &l ...

  6. java获取系统信息

    public class SystemInfo { public static void main(String[] args) { //系统属性 Properties prop = System.g ...

  7. CoreLocation框架的使用---定位,求两地距离

    前言: 在iOS开发中,有关导航,周边的开发,必须基于2个框架: Map Kit :用于地图展示 Core Location :用于地理定位   用户隐私的保护 从iOS 6开始,苹果在保护用户隐私方 ...

  8. andorid lint

    (一)Lint简介 Android SDK提供了一个代码扫描工具,称为lint.可以帮助您轻松地识别并纠正问题与结构质量的代码,不必执行应用程序或编写任何测试用例.每个问题检测到该工具报告的一个描述消 ...

  9. Highcharts图形报表的简单使用

    Highcharts是一个纯JavaScript框架,与MSChart完全不一样,可以在网页中使用,所以php.asp.net.jsp等等页面中都可以使用.Highcharts官网:http://ww ...

  10. JS无缝滚动

    p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 31.0px Consolas; color: #2b7ec3 } p.p2 { margin: 0.0px ...