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

Differences Between PLC Instruction List IL and Assembly Language Programming

Differences Between PLC Instruction List IL and Assembly Language Programming

The PLC Instruction List (IL) and assembly language have significant differences in programming. Here is a detailed comparison of the two: 1. Definition and Use• PLC Instruction List (IL): • It is a commonly used text-based programming language in PLC (Programmable Logic Controller) programming. • It represents control programs in a list of instructions similar … 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

Applications of Assembly Language

Applications of Assembly Language

In the early days of programming, most applications were partially or entirely written in assembly language. They had to adapt to small memory and run efficiently on slow processors. As memory capacity increased and processor speeds rapidly improved, programs became increasingly complex. Programmers also turned to high-level languages such as C, FORTRAN, COBOL, which offered … 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

Deep Understanding of How2Heap from Assembly Language

Deep Understanding of How2Heap from Assembly Language

The management method of ptmalloc2, the chunk structure, and the bins model have been explained very clearly in the Overview of GLIBC heap exploitation techniques and ctfwiki. This article records my learning process of heap exploitation. This series will update a chapter every day, and it is expected to complete updates for glibc2.23, glibc2.27, and … Read more

Handcrafted CPU and Unix-like System with Assembly Language

Handcrafted CPU and Unix-like System with Assembly Language

Author: Anfulai Electronics, Typesetting: Xiaoyu WeChat Official Account: Chip Home (ID: chiphome-dy) Hardware Design: GR8CPU is a fully functional computer built on a breadboard. The first version, GR8CPU Rev2, has over 600 wires, 74 integrated circuits, and 79 LED lights. It is an 8-bit architecture that considers simplicity and processing power. The CPU can access … 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

Running Hello World in Assembly Language on Android

Running Hello World in Assembly Language on Android

Principle of Ximen Chui Xue This article explains how to write a GNU ARM assembly program and run it on an Android phone. (1) Why Learn ARM Assembly? If learning is only done when needed, then nothing needs to be learned in advance. The situation of “learning when needed” often exists and makes sense; your … Read more