DIY Drone: Become a ‘Flying Master’ in the Sky

DIY Drone: Become a 'Flying Master' in the Sky

In this age of information explosion, drones have gradually entered our lives. Whether for aerial photography, exploring the unknown, or simply for the thrill of flying, drones have become tools for many to pursue their dreams. For those passionate about exploration and creation, DIY drones are an especially attractive option. Next, let us unveil the … Read more

Technical Insights on AMD SEM IP Usage in MPSoC Devices

Technical Insights on AMD SEM IP Usage in MPSoC Devices

01 Overview of SEM IP Functionality The SEM (Soft Error Mitigation) technology achieves observable soft error simulation through targeted ECC parity bit injection. This mechanism precisely selects parity bits within the Configuration RAM Frame (CRAM Frame) for controllable flipping, ensuring that injected errors are located in the redundant parity area rather than in functional logic … Read more

Analysis of C++ Features from the Perspective of Assembly Language: Starting with the New Operator

Analysis of C++ Features from the Perspective of Assembly Language: Starting with the New Operator

The “Readability Crisis” of C++ Compilation Results The assembly code generated from C++ is indeed more complex than that of C, but this complexity follows certain rules: ; C language malloc call push 16 ; allocate size call malloc add esp, 4 ; C++ new operator call push 16 ; allocate size call ??2@YAPAXI@Z ; … Read more

Kernel C++ Member Function and C Interface Adaptation Technology from an Assembly Language Perspective

Kernel C++ Member Function and C Interface Adaptation Technology from an Assembly Language Perspective

Fundamental Differences Between Member Functions and C Functions From an assembly perspective, the essential difference between member functions and ordinary C functions lies in the implicit <span>this</span> pointer passing: ; Ordinary C function call push param2 ; Parameter 2 push param1 ; Parameter 1 call CFunction ; Direct call add rsp, 10h ; Clean up … Read more

Kernel C/C++ Hybrid Programming Techniques from an Assembly Language Perspective

Kernel C/C++ Hybrid Programming Techniques from an Assembly Language Perspective

Assembly Level Analysis of Header File Declaration Issues When C++ references a C header file without adding <span>extern "C"</span>, it leads to name mangling issues: ; C-style function without processing call ?ExAllocatePoolWithTag@@YAPEAXW4_POOL_TYPE@@KPEAD@Z ; C++ mangled name ; Correct usage with extern "C" call ExAllocatePoolWithTag ; Original C name The correct approach when including <span>ntifs.h</span> is: … Read more

Basic Concepts of C Language

Basic Concepts of C Language

1. Introduction to Hello World /* Program functionality: Display a string of characters on the PC screen */ #include <stdio.h> int main(void) { printf("Hello, World\n"); return 0; } In Linux, when using GCC to compile the Hello World program, the simplest command is (assuming the source code file is named main.c): $gcc main.c $./a.out Hello … Read more

Understanding the Compilation Process of GCC

Understanding the Compilation Process of GCC

The compilation process of GCC mainly includes four stages: preprocessing, compilation, assembly, and linking. During this process, three tools are used: cc1, as, and collect2. Among them, cc1 is the compiler corresponding to the first and second stages, used to compile the source file hello.c into hello.s; as is the assembler corresponding to the third … Read more

Basics of Assembly: Hands-On with General-Purpose Registers

Basics of Assembly: Hands-On with General-Purpose Registers

In the previous article, it was mentioned that in assembly, the content of registers is modified through assembly instructions to control the CPU’s operation. Several classifications of registers were also discussed.Understanding the concepts can be a bit dry, so today we will look at several registers through debugging on a PC, and also modify the … Read more

Micro:bit | Comprehensive Project 10 – Remote-Controlled Four-Wheel Drive Car

Micro:bit | Comprehensive Project 10 - Remote-Controlled Four-Wheel Drive Car

01 Overview 1.1 Introduction Today, I will share a case of a remote-controlled four-wheel drive car. Compared to other cars: It has motors directly connected to the wheels, so it has a simple structure and is easy to assemble; It is very sturdy, and even if it flips over, there is no need to readjust … Read more

Restoration of Disassembled Code for Non-Power-of-Two Divisors

Restoration of Disassembled Code for Non-Power-of-Two Divisors

This article is a highlight from the Kanxue Forum. Author from Kanxue ForumID: TkBinary Table of Contents Series Articles 1. Supplementary Mathematical Knowledge 1.1 Introduction 1.2 Fractions 1.2.1 Fraction Addition 1.2.2 Fraction Multiplication 2. Division Optimization for Signed Non-Power-of-Two 2.1 Advanced Code and Disassembly 2.2 Restoration of Non-Power-of-Two Division 2.3 Optimization and Principles for Non-Power-of-Two … Read more