Ummm... no, I don't know why it wouldn't work if you use bx. Like so?
org 0x100
start:
xor ax, ax
xor bx, bx
xor cx, cx
mov ax, 200
mov bx, 100
xor dx, dx
div bx
cmp ax, 2
je correct
; jmp _end
jmp wrong ; no?
correct:
mov si, _c
lodsb
mov bx, 0x07
mov ah, 0x0E
int 0x10
jmp _end
wrong:
mov si, _w
lodsb
mov bx, 0x07
mov ah, 0x0E
int 0x10
jmp _end
_end:
mov ah, 0x0
int 0x16
mov ah, 0x4C
int 0x21
_c db "c", 13, 10, 0
_w db "w", 13, 10, 0
I haven't tested this, but it really "ought" to work!
If you use bl instead of bx, you've got a slightly different situation - "div" divides ax by bl (or other 8-bit register or memory) - quotient in al, remainder in ah. (doesn't care what's in dx, in this case). If the value in ah is equal or greater than bl, you'd get that same exception. ("div ah" would never work, for the same reason "div dx" would never work)...
Are you sure you've got dx zeroed before the "div"?
Best,
Frank