2009-02-27から1日間の記事一覧

アセンブラ関数をCからリンクする

http://homepage1.nifty.com/herumi/prog/prog10.html を見てやってみる。 gas(linux) リンカに拘ると前に進めない。 gas仕様のsum.Sを写経してリンクする。 $ gcc -c main.c $ as sum.S -o sum.o $ ld -o sum main.o sum.o -e main undefined reference to …

Hello World

nasm(linux) とりあえず伝統に則ってHello Worldをやってみる。 参考ソースはこちら。http://www.csee.umbc.edu/help/nasm/sample.shtml コメント満載でわかりやすい。対象アセンブラはnasm。インデントの流儀はラベルを0列からはじめて、 それ以外をインデ…