μ΄ νμ΄μ§λ CμΈμ΄μ ν¨μλ€μ Assembly μ΄λ‘ λ²μν΄ λλ κ³³μ΄μ,
CμΈμ΄μ νΉμ§λ€μ μ΄ν΄λ³΄κ³ μ ν¨μ΄λ€.
(CμΈμ΄μ νΉμ§μ΄λΌκ³ νμμ§λ§, λ²μνλ μ»΄νμΌλ¬μ νΉμ§μ΄λΌκ³ ν΄μΌ μ³λ€.)
CμΈμ΄μ νΉμ§λ€μ μ΄ν΄λ³΄κ³ μ ν¨μ΄λ€.
(CμΈμ΄μ νΉμ§μ΄λΌκ³ νμμ§λ§, λ²μνλ μ»΄νμΌλ¬μ νΉμ§μ΄λΌκ³ ν΄μΌ μ³λ€.)
Spec
CPU : model name : AMD Duron(tm) Processor(800)
Linux Kernel : 2.6.12-1-386
Compiler : GNU/GCC (gcc version 4.0.1 (Debian 4.0.1-2))
CPU : model name : AMD Duron(tm) Processor(800)
Linux Kernel : 2.6.12-1-386
Compiler : GNU/GCC (gcc version 4.0.1 (Debian 4.0.1-2))
Tip
GCC Option:
-O# (# == number) Optimization Level
-fomit-frame-pointer ν¨μλ₯Ό call ν λ fpλ₯Ό μ μ§νλ μ½λ(pushl %ebp, leave)λ₯Ό μμ±νμ§ μλλ‘ νλ€.
-E Preprocess only; do not compile, assemble or link
-S Compile only; do not assemble or link
-o Compile and assemble, but do not link
Mode:
asm(".code16\n");
asm(".code32\n");
GCC Option:
-O# (# == number) Optimization Level
-fomit-frame-pointer ν¨μλ₯Ό call ν λ fpλ₯Ό μ μ§νλ μ½λ(pushl %ebp, leave)λ₯Ό μμ±νμ§ μλλ‘ νλ€.
-E Preprocess only; do not compile, assemble or link
-S Compile only; do not assemble or link
-o Compile and assemble, but do not link
Mode:
asm(".code16\n");
asm(".code32\n");
gas:
as source.s -o source.o
ld:
ld source.o
as source.s -o source.o
ld:
ld source.o