Rewriting Examples of Modern X86 Assembly Language Programming in C Language and AT&T Assembly Format (Part 15)

Rewriting Examples of Modern X86 Assembly Language Programming in C Language and AT&T Assembly Format (Part 15)

1. Writing the C program ch03_05_01.c /* * This program constructs a structure TestStruct with members of different lengths. * It sums the structure members using both C functions and assembly functions to verify the correctness of the assembly code. * The focus is on the Pad8 member, which does not participate in calculations, but … Read more

Understanding Assembly Language: Key Concepts and Syntax

Understanding Assembly Language: Key Concepts and Syntax

Several Questions Before getting to the main topic, let me ask a few questions: What is the English abbreviation that represents the function of instructions in local code? What does segment definition refer to in assembly language programs? In fact, everyone may have different answers; there is no need to strictly adhere to standard answers, … Read more

C Programming on Linux

C Programming on Linux

Introduction First of all, I believe that foundational knowledge in computer science is timeless, while trendy “practical skills” may quickly become obsolete. This is why, during the major selection process in my sophomore year, I chose the Computer Science and Technology major instead of other flashy fields. In my junior and senior years, when studying … Read more

In-Depth Comparison of MCU Assembly Language and C Language: From Principles to Practice

In-Depth Comparison of MCU Assembly Language and C Language: From Principles to Practice

1. Essential Differences: Low-Level Control vs High-Level Abstraction 1.1 Assembly Language: Direct Mapping to Hardware Assembly language is a mnemonic representation of machine instructions, closely coupled with the MCU architecture. Taking the assembly of ARM Cortex-M as an example: ; Add registers R1 and R2, store the result in R0 ADD R0, R1, R2 ; … Read more

Introduction to Li Zhong X64 Architecture Assembly Language and Operating System Basics

Introduction to Li Zhong X64 Architecture Assembly Language and Operating System Basics

Reply to the public account:Course 🎓【In-Depth Recommendation】Introduction to Li Zhong X64 Architecture Assembly Language and Operating System Basics, Easy to Get Started! 🌟Dear friends, are you feeling confused about learning assembly language and the basics of operating systems? Don’t worry, today I will introduce you to these topics, making it easy for you to get … Read more

10 Major Challenges in Microcontroller Programming and Their Solutions

10 Major Challenges in Microcontroller Programming and Their Solutions

1. What are the advantages and disadvantages of C language and assembly language in microcontroller development? Answer: Assembly language is a symbolic language that uses mnemonic codes to represent machine instructions, making it the closest language to machine code. Its main advantages are low resource usage and high program execution efficiency. However, assembly languages can … Read more

How Compilers Convert High-Level Languages to Assembly Language

How Compilers Convert High-Level Languages to Assembly Language

For programmers who work daily with high-level programming languages such as Java, C++, C#, and Python, understanding how compilers convert high-level languages into assembly language helps us better comprehend computer programming. Compilers convert high-level languages into assembly language primarily through three steps: lexical analysis, syntax analysis, and syntax tree parsing. This article describes this process … Read more

What is the Purpose of Microcontroller Programs? How to Write Them? How to Upload to a Microcontroller?

What is the Purpose of Microcontroller Programs? How to Write Them? How to Upload to a Microcontroller?

The purpose of a microcontroller program is to make the microcontroller “obey” and perform a series of actions as designed by humans to achieve a specific function. For example, using a microcontroller to control a running light: after powering on, the first light turns on, then after a delay, the second light turns on, followed … Read more

How to Choose Microcontroller Languages for Hardware, Software, and IoT Engineers?

How to Choose Microcontroller Languages for Hardware, Software, and IoT Engineers?

Microcontroller assembly language is a fundamental language in embedded system development, gaining attention for its efficiency and direct control over hardware. However, different types of engineers may be unsure which microcontroller assembly languages to choose based on their work requirements and background knowledge. 1. Hardware Engineers Recommended Microcontrollers: AVR Series, PIC Series Reason: These microcontrollers … Read more

The Role of Stack in Assembly Language: Similar to a Handbag

The Role of Stack in Assembly Language: Similar to a Handbag

The concept of a stack in assembly language is not easy to understand. In the previous article, the usage of the stack was introduced, and in this article, I will briefly discuss my understanding of the role of the stack. In life, a stack can be likened to a temporary residence for travelers. In assembly … Read more