{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

ch5-arithInstr

# ch5-arithInstr - Arithmetic instructions EE 3750 Overview...

This preview shows pages 1–5. Sign up to view the full content.

Arithmetic instructions EE 3750 2 Overview Will discuss instructions for addition subtraction comparison (based on subtraction) multiplication division BCD and ASCII arithmetic

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
3 ADD, SUB instructions ADD dest,source dest ! dest + source Examples ADD AX,BX ADD SUM, BL SUB dest,source dest ! dest " source Examples SUB AX,BX SUB DIFF, BL 4 ADC, SBB instructions ADC dest,source dest ! dest + source + CF add with carry: used for wide additions Examples ADC AX,BX ADC SUM, BL SBB dest,source dest ! dest " source " CF subtract with borrow; used for wide subtractions Examples SBB AX,BX SBB DIFF, BL
figure from Brey 5 ADC example ADD AX, CX ADC BX, DX figure from Brey 6 SBB example SUB AX, DI SBB BX, SI

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
7 CBW, CWD instructions CBW ; note: operands implicit, none specified extend sign of AL to AH convert byte to word Examples if AL = 0001 1011 before CBW, then AX = 0000 0000 0001 1011 after CBW if AL = 1001 1011 before CBW, then AX = 1111 1111 1001 1011 after CBW CWD ; note: operands implicit, none specified extend sign of AX to DX convert word to doubleword Examples if AX = 0001 0001 0001 1011 before CWD, then DX—AX = 0000 0000 0000 0000 0001 0001 0001 1011 after CWD if AX = 1101 0001 0001 1011 before CWD, then DX—AX = 1111 1111 1111 1111 1101 0001 0001 1011 after CWD 8
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 9

ch5-arithInstr - Arithmetic instructions EE 3750 Overview...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online