Computer Architecture Microsoft Assembler
Procedures Internal Internal External External Speeds learning Speeds learning Importing Importing.code extrn Clrf:proc, Readstring:proc main proc
Cont.. procedures Calling Calling call Readstring call Readint Initialization Initialization What do you ask ? What do you ask ?
Cont.. procedures Which registers? Which registers? Reg sizes = var sizes? Reg sizes = var sizes? Data saved? Data saved?
“if” Compare 2 objects Compare 2 objects 2 outcomes 2 outcomes cmp ax, bx cmp ax, 97
“hop-a-long” Goto Goto Jump to labels Jump to labels jmp looplabel Conditional jumps Conditional jumps –a jump that needs a condition –condition …cmp statement –“fall through”
Conditional Statements Explain! mov ax, 5 mov bx, 7 cmp ax, bx jg lessthan jmp greaterthan
Practical Assignment Plan! Plan! Use the skeleton program (1 st prac) Use the skeleton program (1 st prac) Cut relevant code from 2 nd prac eg. Cut relevant code from 2 nd prac eg.