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.

Thursday, November 19, 2009

C99 Features

Here is a simple example demonstrating some of the C99 features. It is a test program I wrote for learning from C99 standard. Although it doesn't cover all the new features for C99, I think it is at least a start for people who are not familiar to C99 like me.

Click HERE to download c99.c.

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.

Sunday, November 8, 2009

Understand Weak Symbols by Examples

Wikipedia defines the weak symbols: "In computing, a weak symbol is a symbol definition in an object file or dynamic library that may be overridden by other symbol definitions, its value will be zero if no definition found by loader." In other words, we can define a symbol that doesn't need to be resolved at link time. It is a very well-known feature and used a lot in Linux Kernel, Glibc, and so on.

Thursday, August 21, 2008

Debian Backporting

It is easy to install packages on Debian. All you have to do is "apt-get install package". But what if we would like to install a newer version package? For example, git-core version on Debian stable is 1.4.4. It is too old and does not have basic commands such as git config, init,... etc. We may install git from Debian Backports. It is a easier way than building from source for most people.

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}

Monday, August 11, 2008

交車需知大全

前陣子買車前到處爬文整理起來的交車需知大全,本來一直放在googole docs沒公開,剛看到有直接張貼到blogger的功能,拿來試用看看,有興趣的人可以拿來參考... :)


Tuesday, July 29, 2008

OpenACS Configuration

  1. Install JDK
    # apt-get install sun-java5-jdk
  2. Install mysql
    # apt-get install mysql-server