楼主,还可以再省2字节!
in al,71h
ROR al, cl ; change to SHR al, cl
and al, 3 ; delete this line
add al, '0'
int 10h ; write char al, teletype mode
In the above program segment, "ROR al, cl" is to rotate right by 6 bits, and "and al, 3" only takes the last 2 bits. But AL is an 8-bit register, 6 + 2 = 8. If it is changed to SHR to shift right by 6 bits, the first 6 bits of AL will be naturally cleared, that is, there is no need for "and al, 3" to limit to the last 2 bits! In this way, 2 bytes can be saved.
my major is english----my love is dos----my teacher is the buddha----my friends--how about U