System Practice Learning ARMv8 Assembly – Course 4

System Practice Learning ARMv8 Assembly - Course 4

Course 4: Detailed Explanation and Practical Application of ARMv8 Assembly Pseudo Instructions Pseudo instructions (Directives) are auxiliary instructions provided by the assembler to control code generation, data allocation, segment structure, etc.,which do not directly translate into machine code. Below is a classification and example analysis of commonly used pseudo instructions in ARMv8 assembly: 1. Segment … Read more

System Practice Learning ARMv8 Assembly – Course 2

System Practice Learning ARMv8 Assembly - Course 2

Course 2: Stage 1 – Basic Preparation (Week 2) Topic: Detailed Explanation of ARMv8 Registers and Instruction Set, Bare-Metal Programming Practice 2.1 In-Depth Analysis of Registers Classification of ARMv8 Registers: General Purpose Registers (31): <span>X0</span>: Function Argument 1 / Return Value. <span>X1-X7</span>: Function Arguments 2-8. <span>X8</span>: System Call Number. <span>X29</span>: Frame Pointer (FP). <span>X30</span>: Link … Read more

System Practice Learning ARMv8 Assembly – Course 5

System Practice Learning ARMv8 Assembly - Course 5

Course 5: Phase 2 – Core Instructions and Programming Topic: Memory Operations and Complex Data Structures, Bare-Metal Programming Practice 5.1 Advanced Memory Operations Multi-Byte Memory Operations <span>LDP</span>/<span>STP</span>: Load/Store two registers at once (supports 64-bit and 32-bit modes). stp x0, x1, [sp, #-16]! // Push x0 and x1 onto the stack, SP -= 16 ldp x2, … Read more

System Practice Learning ARMv8 Assembly – Course 3

System Practice Learning ARMv8 Assembly - Course 3

Course 3: Stage 2 – Core Instructions and Programming Topic:Function Calls and Stack Operations, ARMv8 Calling Conventions, Bare-Metal Programming Practice 3.1 Basics of Function Calls Core Concepts: BL Instruction: <span>BL label</span>:Jump to<span>label</span> to execute, while saving the return address (the address of the next instruction) to<span>LR</span> (X30). After the function call, return using<span>RET</span> (<span>RET</span> is … Read more

Instruction Format and Basic Syntax of Assembly Language

Instruction Format and Basic Syntax of Assembly Language

Analysis of Assembly Errors in Microcontroller Assembly Language Currently, there are two different standards for the instruction format of assembly language: Assembly languages on Windows generally follow Intel-style syntax, such as MASM and NASM; whereas assembly languages on Unix/Linux generally follow AT&T-style syntax; 1. General Format of Assembly Language Statements [Name[:]] Opcode [First Operand][,Second Operand] … Read more

Should You Start Programming with Assembly Language?

Should You Start Programming with Assembly Language?

As a programmer, what was the first programming language you encountered and learned? According to the “2021-2022 China Developer Survey Report,” the long-established assembly language is the most disliked programming language among programmers (37%), followed by C++ (17%) and C (16%). As a machine-oriented programming language, assembly language is indeed very precise, but it is … Read more

Why Does C Language Need Stack for Function Calls While Assembly Language Does Not?

Why Does C Language Need Stack for Function Calls While Assembly Language Does Not?

Recently, I have seen many analyses about uboot, and to run C language, it is necessary to prepare the stack. In the Uboot’s start.S assembly code, regarding system initialization, I also saw the action of initializing the stack pointer. However, I have only seen people say that system initialization requires initializing the stack, that is, … Read more

Introduction to Assembly Language: Using Debug Tools

Introduction to Assembly Language: Using Debug Tools

1. Physical Memory Layout Formula When you see an address like 0B3F:0100 in debug, remember the physical address calculation formula: For example, 0B3F*10h+0100=0C3F0. This formula explains why CS:IP always points to strange memory locations (a legacy black magic of old programmers). 2. Core Command Anatomy Command Prototype: -a [address]Parameter Description: If address is not filled, … Read more

Another Expert Builds a CPU by Hand and Implements a Unix-like System in Assembly

Another Expert Builds a CPU by Hand and Implements a Unix-like System in Assembly

Previously, several showcases in this area have been posted. Unlike FPGA, this systematic design allows for a more comprehensive understanding of these things. 1. [Special Spring Festival Edition] Those Experts Who Build CPUs by Hand, Appreciating the Breathtaking Hand Wiring and Superb Skills. 2. [Build a Complete Computer System Yourself] From basic digital logic, CPU … Read more