80 likes | 207 Vues
This guide covers essential concepts in Microsoft Assembler, focusing on internal and external procedures, initialization, and effective code importation. Learn about key calling conventions for procedures like ReadString and ReadInt, and understand how registers relate to variable sizes. Explore how to compare objects using CMP instructions, implement conditional jumps, and the significance of fall-through statements. Practical assignments provide hands-on experience using skeleton programs to reinforce learning and apply these concepts in real-world applications.
E N D
Computer Architecture Microsoft Assembler
Procedures • Internal • External • Speeds learning • Importing .code extrn Clrf:proc, Readstring:proc main proc
Cont.. procedures • Calling call Readstring call Readint • Initialization • What do you ask ?
Cont.. procedures • Which registers? • Reg sizes = var sizes? • Data saved?
“if” • Compare 2 objects • 2 outcomes cmp ax, bx cmp ax, 97
“hop-a-long” • Goto • Jump to labels jmp looplabel • 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! • Use the skeleton program (1st prac) • Cut relevant code from 2nd prac eg.