asmに関するmakenowjustのブックマーク (2)

  • セクションとか.textとか

    キーワード セクション, オブジェクトファイルフォーマット, .text, プログラムローダ, ELF(Executable and Linkable Format) これだけは覚えよう プログラムは複数のセクションという単位に分割されている 原因と原理 私たちが日ごろ作っているプログラムは、ノイマン型コンピュータ上で動きます。ノイマン型コンピュータというのは、プログラムをメモリに蓄えているタイプのコンピュータ(Program stored computer)を指し、プロセッサとメモリを持ったものは大体ノイマン型です。当然私たちのプログラムもメモリにロードされて動いています。 プログラムが動くとき、さまざまな用途でメモリが使用されます。その用途は、機械語をおくためや、変数として値を格納しておくため、またC言語などでは関数呼び出しを行うためのスタックとして使用するため、mallocなどで動的

  • Native 64-bit “Hello World” With NASM on FreeBSD

    In yet another effort to fend off boredom, I tried to write a “hello world” in assembly, on FreeBSD 7.2/amd64. I wanted it to be a native 64-bit (more fun that way), so the developer’s handbook was not too helpful. And since by the logic of the Internet, there’s someone somewhere right now is looking exactly for this, I thought I’d share it here. Aside: The Assembler used here is NASM. I grew up o

    Native 64-bit “Hello World” With NASM on FreeBSD
  • 1