Building A C# Compiler: Lexical Analysis To Code Generation

Building A C# Compiler: Lexical Analysis To Code Generation

C# Compiler Tutorial (1): Exploring Lexical Analysis Hello everyone! Today I want to explore a super interesting topic with you all — developing a simple compiler in C#! As the first tutorial, we will start with the basics of lexical analysis. Don’t be intimidated by the word “compiler”; follow me step by step, and you’ll … Read more

Implicit Type Conversion in C Language

Implicit Type Conversion in C Language

1.1 Definition Implicit type conversion, also known as automatic type conversion, is performed automatically by the compiler during the compilation process, without the need for the programmer to explicitly perform operations. 1.2 Type Conversion in Arithmetic Operations 1.2.1 Definition When values of different types participate in arithmetic operations, the compiler promotes the operand of the … Read more

Some Issues Regarding Stacks in Microcontroller Programming

Some Issues Regarding Stacks in Microcontroller Programming

Wu Jianying Microcontroller Development Board Address Store:【Wu Jianying’s Shop】 Address:【https://item.taobao.com/item.htm?_u=ukgdp5a7629&id=524088004171】 The compiler uses two stacks: one is the hardware stack for subroutine calls and interrupt operations, and the other is the software stack for temporary variables and local variables passed in a stack structure. The hardware stack is allocated starting from the top of the … Read more

Scientists Decomposing C Language for Rust Code Conversion

Scientists Decomposing C Language for Rust Code Conversion

Introduction: Computer scientists from the French National Institute for Research in Computer Science and Automation (Inria) and Microsoft have designed a method to automatically convert a subset of C code into safe Rust code to meet the growing demand for memory safety. The C programming language was born in the early 1970s and is used … Read more

What Happens After main() Exits in Microcontroller?

What Happens After main() Exits in Microcontroller?

For embedded systems, if there is no RTOS running, the main function main() in program development needs to ensure it runs happily forever through some mechanism; it has no endpoint. If you want to exit from the main function, what happens afterwards is determined by the C language compiler being used. 1. Question Raised In … Read more

Why Does Hex Change While Code Remains the Same?

Why Does Hex Change While Code Remains the Same?

Follow+Star Public Account, don’t miss out on exciting content Author | strongerHuang WeChat Public Account | strongerHuang Today in the technical exchange group, I saw such a question, which roughly means: the same code project (source code unchanged), but the program (hex) changes due to different Keil versions. For many beginners, it’s definitely puzzling why … Read more