Title

第7講 C語言轉成組合語言

Syllabus

章節大綱

C語言轉成組合語言(From C to Assembly )


L7_A
         電腦系統
         (Computer system overview)
         組合語言的基本概念
         (Basic concepts of assembly code)
         Q1: 如何把C程式碼轉成x86組合語言程式碼?
         (Q1: How to convert C to x86 assembly code ?)

         Q2: 全域變數轉成組語後的型式
         (Q2: Glogal variables in assembly)
          - Object file 的不同區段 : TEXT、DATA、BSS
          (- Different sections of object file : TEXT、DATA、BSS)


L7_B
         Q2: 全域變數轉成組語後的型式
         (Q2: Glogal variables in assembly)
         - mov的語法
         (- mov syntax)

         Q3: 局部變數轉成組語後的型式
         (Q3: Local variables in assembly)
         - 堆疊、暫存器
         (- Stack、Register)

         Q4: 加法運算轉成組語後的型式  
         (Q4: Addition in assembly )

         Q5: 條件判斷轉成組語 
         (Q5: Control statements in assembly)
         <=不知道翻得對不對???
         - Compare two operands(cmp) 和 Conditional jump
         (- Compare two operands(cmp) & Conditional jump)

L7_C
         Q6:指標轉成組語後的型式
         (Q6: Pointers in assembly)
         - Load effective address(lea)
         (- Load effective address(lea))  

         Q7: 函數呼叫轉成組語後的型式
         (Q7: Calling C Functions in assembly)
          - call、ret和leave
          (- call、ret & leave) 


L7_D
         Q7: C語言的函數呼叫轉成組語後的型式
         (Q7: Calling C Functions in assembly)
         - call、ret和leave
         (- call、ret & leave) 

         Q8: C語言的遞迴轉成組語後的型式
         (Q8: Recursion in assembly)
          - call_f
         (- call_f)
          -Tail call elimination
         (-Tail call elimination)
 

 陳煥宗教授-程式設計二講義
               Teaching  Materials