项目作者: jraleman

项目描述 :
A series of short assembly code files, just to refresh some of the concepts :)
高级语言: Assembly
项目地址: git://github.com/jraleman/NASM_AssemblyPractice.git
创建时间: 2018-10-30T13:59:24Z
项目社区:https://github.com/jraleman/NASM_AssemblyPractice

开源协议:

下载


NASM_AssemblyPractice

Setup

Depending on your system, follow the steps below:

Mac OS X

Make sure you have nasm installed, and follow the next steps.

Compile

  1. nasm -f macho64 asm/{file}.s

Depending on the file, you might need to run one of the following:

  1. ld -arch x86_64 -macosx_version_min 10.9.0 -no_pie -lSystem -e _start -o a.out asm/{file}.o

If there is a main label, remove the -e _start flag:

  1. ld -arch x86_64 -macosx_version_min 10.9.0 -no_pie -lSystem -o a.out asm/{file}.o

And if you wish to mix c and s, you can run the following:

  1. gcc c/{file}.c asm/{file}.o

Execute

And just execute with:

  1. ./a.out

Linux

Windows

  • See Linux

Sauce