Articles

"Apple M1 Assembly Hello World":

"Both MacOS and Linux are based on Unix and are more similar than different. However there are a few differences of note:

Below is the simple Assembly Language program to print out “Hello World” in a terminal window.

//
// Assembler program to print "Hello World!"
// to stdout.
//
// X0-X2 - parameters to linux function services
// X16 - linux function number
//
.global _start             // Provide program starting address to linker
.align 2

// Setup the parameters to print hello world
// and then call Linux to do it.

_start: mov X0, #1     		// 1 = StdOut
        adr X1, helloworld  // string to print
		mov X2, #13     	// length of our string
        mov X16, #4     	// MacOS write system call
        svc 0    		 	// Call linux to output the string

// Setup the parameters to exit the program
// and then call Linux to do it.

        mov     X0, #0      // Use 0 return code
        mov     X16, #1     // Service command code 1 terminates this program
        svc     0           // Call MacOS to terminate the program

helloworld:      .ascii  "Hello World!\n"

Makefile:

HelloWorld: HelloWorld.o
     ld -macosx_version_min 11.0.0 -o HelloWorld HelloWorld.o -lSystem -syslibroot
             `xcrun -sdk macosx --show-sdk-path` -e _start -arch arm64 

HelloWorld.o: HelloWorld.s
     as -o HelloWorld.o HelloWorld.s

An introduction to assembly on Apple Silicon Macs.: "In this repository, I will code along with the book Programming with 64-Bit ARM Assembly Language, adjusting all sample code for Apple's ARM64 line of computers"

Code in Assembly for Apple Silicon with the AsmAttic.app

Tutorials, Courses

AArch64


Readings

Readings: Binary Analysis

See also: Software: Binary Analysis

Concurrency

Formalization, Specification, Verification

Instruction Set Architecture

Shellcode

A-profile

M-profile

Performance

Performance: Numerics

Security

Memory Tagging Extension (MTE)

Pointer Authentication

TrustZone

Simulation

Virtualization


References

Intrinsics & SIMD

NEON

Scalable Vector Extension (SVE)

SVE: LLVM Implementation

Toolchains


Software

Software: Binary Analysis

See also: Readings: Binary Analysis

Software: Debugging, Tracing

Software: Emulation, Simulation

Software: Lifting

Disassemblers, Decompilers, Recompilers

Software: Performance

See also: Performance Tools

Software: Virtualization


Talks

2019

2018

2017

2016

2015

2014

2012

2011

2010

History


Tags: language   native   object   metaobject  

Last modified 16 December 2024