int main() {
  __asm {
    mov cx, 4000h      ; // CX=4000h (16-bit register)
    mov ax, 5000h      ; // AX=5000h
    mul cx             ; // DX:AX=1400:0000            Flags: OV=1, CY=1   
    div cx             ; // AX=5000h DX=0000h
    mov dx, 0000h      ;
    mov ax, 0002h      ; // DX:AX=0000:0002h
    mov cx, 10h        ; // CX=10h
    div cx             ; // AX=0000h DX=0002h
    mov dx, 7FFFh      ;
    mov ax, 0000h      ; // DX:AX=7FFF:0000h
    mov cx, 2h         ; // CX=2h
    div cx             ; // result does not fit in AX, throws divide error exception
  }
  return 0;
}