惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

有赞技术团队
有赞技术团队
H
Hackread – Cybersecurity News, Data Breaches, AI and More
I
InfoQ
J
Java Code Geeks
Microsoft Security Blog
Microsoft Security Blog
G
Google Developers Blog
D
DataBreaches.Net
Recent Announcements
Recent Announcements
Microsoft Azure Blog
Microsoft Azure Blog
B
Blog RSS Feed
Y
Y Combinator Blog
博客园 - 【当耐特】
博客园 - 聂微东
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
大猫的无限游戏
大猫的无限游戏
P
Proofpoint News Feed
量子位
C
Check Point Blog
F
Fortinet All Blogs
罗磊的独立博客
Last Week in AI
Last Week in AI
GbyAI
GbyAI
L
LangChain Blog
博客园 - 司徒正美

博客园 - O和尚O

Time.timeScale 对 协程WaitForSeconds的影响 [转]Coroutine,你究竟干了什么? 转:Automatic Layout Groups How to Add Collider to Line Renderer in Unity [转] Edit Terrain foliage/texture at runtime [转]How to translate WORLD coordinates to TERRAIN coordinates in Unity3d [转]如何获取Untiy地形某一位置的贴图类型 Path Follow System using Waypoints C# [转]一步步使用3Dmax+Photoshop为游戏关卡设计瓦片化3D模型和无缝贴图(视频教程) [转]Unity游戏开发视频培训 [转]如何管理一个远程团队 [转]以《AI War》为例阐述AI元素概念与代码 [转]分享AI寻径设计的射线追踪法 [转]如何反推一个游戏 Physics.Raycast重载方法的参数隐式转换引发的血案 转:相机碰撞检测 转:拾起并拖拽物体(使用rigidbody.velocity) 转:如何设计一个沉浸式UI 转:如何实现一个滚动列表
mac下汇编hello world
O和尚O · 2015-11-21 · via 博客园 - O和尚O

来自:http://snipplr.com/view/29150

; Hello World in assembly for mac
; nasm -f macho hello.asm
; ld -e _start -o hello hello.o
;
section     .text
 global _start                       ;must be declared for linker (ld)

_syscall:           
     int     0x80            ;system call
     ret

_start:                         ;tell linker entry point

     push    dword len       ;message length
     push    dword msg       ;message to write
     push    dword 1         ;file descriptor (stdout)
     mov     eax,0x4         ;system call number (sys_write)
     call    _syscall        ;call kernel

                             ;the alternate way to call kernel:
                             ;push   eax
                             ;call   7:0

     add     esp,12          ;clean stack (3 arguments * 4)

     push    dword 0         ;exit code
     mov     eax,0x1         ;system call number (sys_exit)
     call    _syscall        ;call kernel

                             ;we do not return from sys_exit,
                             ;there's no need to clean stack
section .data

msg     db      "Hello, world!",0xa     ;our dear string
len     equ     $ - msg                 ;length of our dear string