How do you test this?
Out of curiosity, I made a simple program (code below). When launched under the Windows console, it detects a shift to the left ( Result: 2 ), but never detects a shift to the right (expected Result: 1 , but only received Result: 0 ).
When launched under a clean DOS (in VMWare), it correctly displays all combinations (from 0 to 3).
Thus, it looks like an artifact of NTVDM (Windows DOS emulation), although I have no sources to quote from.
My code is:
.model small .code start: mov ax, seg msg mov ds, ax mov ah, 2 int 16h and al,3 ; get two lower bits - both SHIFTs add digit, al ; convert to decimal lea dx, msg mov ah, 9 int 21h mov ax, 4c00h int 21h .data msg db 'Result: ' digit db '0' db 13,10,'$',0 .stack db 16384 dup(?) end start
source share