| 
 |  | 
                             Convert Byte to Word                             
  
    | 
       86/88  | 
    
       Y  | 
    
       186  | 
    
       Y  | 
    
       286  | 
    
       Y  | 
    
       386  | 
    
       Y  | 
    
       486  | 
    
       Y  | 
    
       CBW  | 
   
  
    | 
       Ovfl  | 
    
       N  | 
    
       Dir  | 
    
       N  | 
    
       Int  | 
    
       N  | 
    
       Trap  | 
    
       N  | 
    
       Sign  | 
    
       N  | 
    
       Zero  | 
    
       N  | 
    
       Aux  | 
    
       N  | 
    
       Prty  | 
    
       N  | 
    
       Carry  | 
    
       N  | 
   
     CBW extends the sign bit of the AL register into the AH register. This
    instruction extends a signed byte value into the equivalent signed
    word value.
       Note:          This instruction will set AH to 0FFh if the sign bit
                      (bit 7) of AL is set; if bit 7 of AL is not set, AH
                      will be set to 0. The instruction is useful for
                      generating a word from a byte prior to performing
                      byte division.
------------------------------------ Timing ----------------------------------
OpCode          Instruction             386     286     86
98              CBW                     3       2       2
------------------------------------ Logic -----------------------------------
        if (AL < 80h) then
                AH = 0
        else
                AH = FFh
See Also CDQ CWD CWDE DIV IDIV |