100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace

ARM Assembly Cheat Sheet

ARM Assembly Cheat Sheet

AArch64 register conventions, common instructions, addressing modes, and a full function-call example for systems programming.

3 PagesAdvancedFeb 5, 2026

AArch64 Registers

The general-purpose and special register set (64-bit names, x0-x30).

  • x0-x7- argument/result registers for function calls (AAPCS64)
  • x8- indirect result register / Linux syscall number
  • x9-x15- caller-saved temporary registers
  • x16-x17 (IP0/IP1)- intra-procedure-call temp registers, used by linkers
  • x18- platform register, reserved on some OSes (don't use)
  • x19-x28- callee-saved registers, must be preserved across calls
  • x29 (FP)- frame pointer
  • x30 (LR)- link register, holds return address after bl
  • sp- stack pointer, must stay 16-byte aligned
  • wN- 32-bit view of register xN (w0 is low 32 bits of x0)

Data Processing

Arithmetic, logical, and move instructions.

asm
mov  x0, #5           // x0 = 5mov  x1, x0            // x1 = x0add  x2, x0, x1         // x2 = x0 + x1sub  x3, x2, #1          // x3 = x2 - 1mul  x4, x2, x3            // x4 = x2 * x3udiv x5, x4, x2              // x5 = x4 / x2 (unsigned)and  x6, x0, #0xF               // bitwise ANDorr  x7, x0, x1                  // bitwise OReor  x8, x0, x1                   // bitwise XORlsl  x9, x0, #2                    // logical shift left by 2 (x0 * 4)lsr  x10, x0, #1                    // logical shift right by 1cmp  x0, x1                          // compare (sets NZCV flags)

Load/Store & Addressing

Moving data between registers and memory.

asm
ldr  x0, [x1]              // x0 = *(int64_t*)x1str  x0, [x1]               // *(int64_t*)x1 = x0ldr  x0, [x1, #8]            // load from x1 + 8 (offset)ldr  x0, [x1, #8]!            // pre-index: x1 += 8, then loadldr  x0, [x1], #8              // post-index: load, then x1 += 8ldp  x0, x1, [sp]               // load pair (common for prologue/epilogue)stp  x0, x1, [sp, #-16]!         // store pair, pre-decrement sp by 16ldrb w0, [x1]                     // load byte, zero-extend into w0ldrsw x0, [x1]                      // load 32-bit signed, sign-extend to x0adr  x0, label                        // PC-relative address of labeladrp x0, label                         // page address (paired with add for full addr)

Branches & Function Calls

Conditional branches and the call/return pattern.

asm
cmp x0, x1b.eq equal_label      // branch if equalb.lt less_label         // branch if less than (signed)b.ne not_equal_label      // branch if not equalb   loop_start              // unconditional branchbl  my_function                // branch and link: x30 = return addr, jumpret                              // return: jumps to address in x30 (LR)my_function:    stp  x29, x30, [sp, #-16]!    // save frame pointer + link register    mov  x29, sp                    // set up frame pointer    // ... body, x0-x7 hold args, x0 holds return value ...    ldp  x29, x30, [sp], #16          // restore    ret

Linux Syscall Convention

How to invoke a Linux syscall directly on AArch64.

  • x8- syscall number goes here
  • x0-x5- syscall arguments, in order
  • svc #0- the instruction that triggers the syscall
  • x0 (return)- syscall return value (or negative errno)
  • exit example- mov x8,#93; mov x0,#0; svc #0

NEON / SIMD Vector Instructions

Vector registers v0-v31 overlay the FP register file for parallel data processing.

asm
// NEON vector registers overlay the FP regs: v0-v31, viewed as 8b/16b/4h/8h/2s/4s/1d/2dld1  {v0.4s}, [x0]              // load four 32-bit floats from [x0] into v0ld1  {v1.4s}, [x1]fadd v2.4s, v0.4s, v1.4s          // element-wise add, 4 lanes at oncefmul v3.4s, v0.4s, v1.4s            // element-wise multiplyst1  {v2.4s}, [x2]                    // store the result vector// Multiply-accumulate: v4 += v0 * v1, per lanefmla v4.4s, v0.4s, v1.4s// Horizontal reduce: sum all 4 lanes of v0 into scalar s0faddp v5.4s, v0.4s, v0.4sfaddp s0, v5.2s// Integer SIMD: add 16 bytes at onceadd  v6.16b, v0.16b, v1.16b

Atomics & Memory Barriers

Exclusive-access loops, ARMv8.1 LSE atomics, and the barrier instructions that order them.

asm
// Classic load-linked/store-conditional loop (works on all ARMv8-A)retry:    ldxr    w0, [x1]           // exclusive load    add     w0, w0, #1          // increment    stxr    w2, w0, [x1]         // exclusive store; w2 = 0 on success    cbnz    w2, retry              // retry if another core interfered// LSE atomics (ARMv8.1+) do the same in one instruction, no retry loopldadd   w0, w2, [x1]           // *x1 += w0 (atomic add), old value returned in w2swp     w0, w2, [x1]            // atomic swapcas     w0, w3, [x1]             // compare-and-swap: if [x1]==w0, store w3// Memory barriersdmb ish        // data memory barrier, inner-shareable: order loads/storesdsb sy           // data sync barrier: wait for all memory ops to completeisb                // instruction sync barrier: flush pipeline (e.g. after self-modifying code)

Conditional Select & Bitfield Ops

Branch-free conditionals and instructions for packing/unpacking bitfields.

asm
// Conditional select avoids branches entirelycmp   x0, x1csel  x2, x3, x4, gt      // x2 = (x0 > x1) ? x3 : x4cset  x5, eq                // x5 = 1 if last compare was equal, else 0csinc x6, x7, xzr, ne         // x6 = ne ? x7 : (xzr + 1) -- conditional incrementccmp  x0, #0, #4, ne           // conditional compare: only evaluated if previous flag was ne// Bitfield instructionsubfx  x0, x1, #8, #4      // unsigned bitfield extract: bits [11:8] of x1 into x0sbfx  x0, x1, #8, #4        // same but sign-extendedbfi   x0, x1, #4, #8          // bitfield insert: 8 bits of x1 into x0 starting at bit 4bfxil x0, x1, #0, #16           // bitfield extract and insert at the low bits

Scalar Floating Point

s (32-bit) and d (64-bit) registers share the same file as NEON vectors.

asm
// Scalar floating point uses s (32-bit) and d (64-bit) registersfmov  s0, #1.0             // load an FP immediatescvtf d1, x0                 // signed int64 -> doublefcvtzs x2, d1                  // double -> signed int64, round toward zerofcvt  s3, d1                     // narrow double -> singlefadd  d0, d1, d2              // d0 = d1 + d2fdiv  s0, s1, s2                // single precision dividefcmp  d0, d1                      // compare, sets NZCVfcsel d2, d0, d1, gt                // conditional select on FP compare resultldr   d0, [x0]                        // load a double from memorystr   s0, [x1, #4]                      // store a float at offset 4

System Registers & Privileged State

Registers accessed via mrs/msr, relevant when writing kernel or low-level runtime code.

  • mrs/msr- move a value from/to a system register, e.g. mrs x0, TPIDR_EL0
  • TPIDR_EL0- thread-local storage pointer, read by userspace TLS accessors
  • NZCV- condition flags register, readable/writable via mrs/msr to save/restore flags
  • SP_EL0 / SP_EL1- per-exception-level stack pointers
  • CurrentEL- reports the current exception level (EL0-EL3)
  • DAIF- interrupt/exception mask bits (Debug, Abort, IRQ, FIQ)
  • ESR_ELx- exception syndrome register, decoded by exception handlers
  • CNTVCT_EL0- virtual counter register, used for cycle-accurate timing
Pro Tip

Remember AAPCS64 requires the stack pointer to be 16-byte aligned at every public function boundary — misaligned sp on a call to libc or the kernel is a classic, hard-to-debug crash source.

Was this cheat sheet helpful?

Explore Topics

#ARMAssembly#ARMAssemblyCheatSheet#Programming#Advanced#AArch64Registers#DataProcessing#LoadStoreAddressing#BranchesFunctionCalls#Functions#CheatSheet#SkillVeris

Frequently Asked Questions

21 categories · pick one to explore

Does SkillVeris have a tech blog, and what does it cover?
Yes, the SkillVeris blog has over 500 articles covering AI and machine learning, programming, web development, DevOps, cloud, security, databases and career guidance. Articles are practical and answer-first, and many use the Learn Through Hobbies approach, teaching technical concepts through cricket, music, gaming or cooking analogies. Everything is free to read.
What is the SkillVeris tech glossary and how big is it?
The SkillVeris glossary is a free reference of roughly 2,000-plus technology terms, each with a clear plain-language definition. It spans AI, programming, web, DevOps, cloud, security and database vocabulary, so whenever a lesson, article or job description uses jargon you do not recognise, the glossary gives you a fast, reliable answer.
Are the developer cheat sheets on SkillVeris free to download?
The cheat sheets are completely free to use, like everything else on SkillVeris. Each sheet condenses a language or tool into its essential syntax, commands and patterns for quick reference while coding. They are designed for rapid lookup during real work, complementing the deeper explanations found in study notes and courses.
Which programming references and cheat sheets are available?
Cheat sheets cover the platform's main domains, including programming languages, AI and ML tooling, web development, DevOps, cloud, security and databases, matching the topics of the 37 live courses. Each sheet lists related reading links and hashtags, so you can jump from a quick reference into fuller study notes or blog articles.
How do I find the meaning of a technical term quickly?
Search the SkillVeris glossary, which holds around 2,000-plus terms with concise, plain-language definitions. Each entry gets to the point in its first sentence, then links to related reading like blog posts or study notes for deeper context. It is faster and more consistent than sifting through scattered search results.
Is the SkillVeris blog good for beginners learning to code?
Yes, many blog articles are written specifically for beginners, and the Learn Through Hobbies style makes them unusually approachable: you might learn Python concepts through cricket or understand APIs through cooking. With 500-plus articles across skill levels, beginners can start with fundamentals and keep reading as they advance, entirely free.
Can cheat sheets replace full courses for learning a language?
No, cheat sheets are references, not teaching tools; they assume you already understand the concepts and just need syntax or commands fast. To actually learn a language, take a structured SkillVeris course with its 24–40 lessons and assessments, then keep the cheat sheet beside you while practising in Code Lab.
How often are new blog articles published on SkillVeris?
The blog grows regularly and already exceeds 500 articles, with new posts added as courses launch and technologies evolve. Topics track the platform's catalogue across AI, programming, web development, DevOps, cloud and security, so checking the Blog section periodically surfaces fresh tutorials, explainers and career-focused pieces, all free to read.
Does the glossary cover AI and machine learning terms?
Yes, AI and machine learning vocabulary is a major part of the roughly 2,000-plus term glossary, covering everything from foundational terms to modern concepts around LLMs, RAG and MLOps. Definitions are plain-language and answer-first, which helps when dense AI papers or course lessons throw unfamiliar jargon at you.
Are there cheat sheets for interview preparation?
Cheat sheets work well as interview-day refreshers because they compress syntax, commands and key concepts into scannable references. For dedicated preparation, combine them with the SkillVeris interview questions feature, which includes readiness scoring, plus study notes for depth. Reviewing a relevant cheat sheet just before an interview steadies recall under pressure.
Can I read the tech blog without signing up?
Yes, the blog is freely readable, and SkillVeris never charges for content. All 500-plus articles are open, covering tutorials, concept explainers and career advice. Creating a free account adds value elsewhere on the platform, like course progress tracking and certificates, but reading the blog requires no commitment at all.
How is the SkillVeris glossary different from Wikipedia?
The glossary is purpose-built for learners: definitions are short, plain-language and answer-first, sized for a quick lookup mid-lesson rather than a deep encyclopedic read. Entries also cross-link to related SkillVeris study notes, blog posts and courses, so a definition becomes a doorway into structured learning instead of a dead end.
Do blog articles use the Learn Through Hobbies method?
Many blog articles teach technical topics through hobby analogies, a hallmark of the SkillVeris blog, so you will find articles explaining programming through cricket, machine learning through music, or system design through cooking. The analogy is the teaching device; the article still delivers the real technical concept underneath.
Where can I find quick programming references while coding?
Open the SkillVeris cheat sheets, which are built exactly for that moment: compact, scannable references for syntax, commands and common patterns across languages and tools. Keep the relevant sheet in a browser tab while you work in Code Lab or your own editor, and dip into the glossary for terminology.
Is there a glossary entry for terms I meet in job descriptions?
Very likely yes, with roughly 2,000-plus terms across AI, programming, web, DevOps, cloud, security and databases, the glossary covers most jargon that appears in tech job descriptions. Decoding a listing this way helps you judge role fit honestly and prepares you to discuss those terms in interviews.
Are the blog articles written for the Indian tech audience?
The blog serves Indian learners plus a worldwide audience. Content stays globally relevant while acknowledging realities that matter in India, such as free access being essential for students and freshers, and career guidance that connects naturally to the SkillVeris jobs portal, which aggregates roles across India, UK, USA, Germany and Remote.
Can I suggest a topic for the blog or glossary?
SkillVeris content grows in response to what learners need, so feedback is welcome through the platform's support channels. If a term is missing from the glossary or a topic deserves an article, telling the team helps prioritise it. Meanwhile, the AI Mentor can answer the question immediately, 24/7, at any depth.
Do cheat sheets and glossary entries link to deeper learning?
Yes, every cheat sheet and glossary entry carries related reading links into study notes, blog articles and courses, plus concept hashtags for discovering similar content. This cross-linking means a thirty-second lookup can smoothly become a structured learning session whenever you decide you want more than a quick answer.
What makes SkillVeris programming references trustworthy?
The references are written to strict internal quality standards, kept consistent with the platform's 37 live courses, and never padded with invented statistics or hype. Definitions and cheat sheets are reviewed against the same content contracts that govern courses, and the answer-first style makes any inaccuracy easy to spot and correct.
How do the blog, glossary and cheat sheets fit into my learning routine?
Use them as satellites around your main course: read blog articles for context and motivation, hit the glossary the instant jargon appears, and keep cheat sheets open while coding. Together with study notes, Code Lab and the 24/7 AI Mentor, they turn passive reading into a complete, free learning system.

What Learners Say

Real journeys from the SkillVeris community — swipe for more.

SkillVeris taught me Python through Cricket. Now I’m building real projects and feeling confident!
Arjun S. · B.Tech Student
The best platform for hobby-based learning. Concepts finally stick.
Priya R. · Data Analyst
I went from zero coding to a portfolio of projects — all by learning through my love for gaming. Landed my first internship!
Kabir M. · CS Undergraduate
Trending Topics50 popular tags — tap to explore
Trending CoursesAll 37 free courses — tap to browse