Showing posts with label assembly. Show all posts
Showing posts with label assembly. Show all posts

Friday, March 14, 2014

STM32F429I Discovery SMS Emulator on Linux

1 Introduction

Alessandro Rocchegiani released some interesting projects on STM32 series MCUs. This article introduces the adding support to be built and burned under Linux, with the project STM32F429 Discovery Sega Master System Emulator as an example.

Wednesday, April 6, 2011

MIPS Exceptions Initialization and Handling on Linux

Exceptions and interrupts are un-expected events that disrupt the normal flow of execution. Interrupts are unexpected events from outside the CPU core. Exceptions are from within the CPU, including memory translation exceptions, cache misses, unusual program conditions such as unaligned loads, system calls and traps, and so on.

MIPS architecture adopts precise exception mechanisms, and make it easy for the software to deal with the exceptions. After any exception, CP0 EPC register points to the correct place to restart execution after the exception is dealt with.

Monday, June 21, 2010

Step by step to MIPS assembly

In this article, I am going to introduce how to write MIPS assembly. All the examples introduced will able to be assembled or compiled into actual executable programs. They can be executed on a MIPS machine running Linux. So, let's forget the simulator and come to real world :-P. The first is the most simple program.

Friday, December 4, 2009

MIPS calling convention with GCC

In this article, we are going to learn MIPS calling conventions by examples. And we will focus on the one used by GCC. All the examples will be compiled with GCC flag -mno-abicalls not generating SVR4-style position-independent code. Normally -mabicalls should be used, we disable it for the simplification of assembly codes.

Monday, November 16, 2009

Learning x86 Calling Conventions by Examples

The x86 architecture features many different calling conventions. There are three major calling conventions in use: __cdecl, __stdcall, and __fastcall. We are going to force the compiler to generate assembly with different calling conventions in order to see how they work.

Wednesday, August 20, 2008

Remove allow_branch_to_undefined from U-boot

Old U-boot (v1.1.3 in my example, too old hum?) needs a option -mips_allow_branch_to_undefined for ELDK AS to assemble. We have to modify cpu/mips/start.S so that AS of other toolchains could assemble it without an error - Error: can't resolve `_GLOBAL_OFFSET_TABLE_' {*UND* section} - `L16' {.text section}