Instruction Set
4-25
CBW
CBW
This example converts an 8-bit integer to its 16-bit equivalent before dividing it by an 8-bit
integer.
Tips
To convert an 8-bit unsigned number in AL to its 16-bit equivalent, use MOV to copy 0 to AH.
Related Instructions
If you want to
See
Add two numbers with the value of CF
ADC
Add two numbers
ADD
Convert a 16-bit integer to its 32-bit equivalent
CWD
Divide an integer by another integer
IDIV
Subtract a number and the value of CF from another number
SBB
Subtract a number from another number
SUB
SDIVIDEND
DB
101
; 65h
SDIVISOR
DB
-3
; FDh
; divide byte integers
MOV
AL,SDIVIDEND
; AL = 65h = 101
CBW
; AX = 0065h = 101
IDIV
SDIVISOR
; AL = DFh = -33, the quotient
, AH = 02h = 2, the remainder
Содержание Am186 Series
Страница 1: ...Am186 and Am188 Family Instruction Set Manual February 1997...
Страница 10: ...Table of Contents x...
Страница 18: ...Programming 1 8...
Страница 40: ...Instruction Set Listing 3 14...