2010-05-04 72 views
0
.model small 
.stack 100 
.data 
.code 

mov ah,00h 
mov al,0e3h 
mov dx,00h 
int 14h 

back: nop 

l1: mov ah,03h 
    mov dx,00h 
    int 14h 

    and ah,01h 
    cmp ah,01h 
    jne l1 

    mov ah,02h 
    mov dx,00h 
    int 21h 

mov dl,al 
mov ah,02h 
int 21h 

jmb back 
mov ah,4ch 
int 21h 

end 

这是一个pc到pc的通信接收器程序。我想知道 为什么它使用mov dx,00h命令和mov al,0e3h是什么意思?8086使用TASM编程:pc到pc通信

回答

3

看一看here。 AX将包含传输参数(波特率等),DX选择端口号。 E3 = 9600速率,无奇偶校验,两个停止位,8位字符大小。

+0

嘿感谢了很多 – Komal 2010-05-05 03:16:31

2

按照docs我能找到的INT 14H,

DX确定端口numbber。所以如果你使用的是端口1,你可以把00h放入dx。 al用于串行通信的参数。查看文档以获取有关参数的更多详细信息。

0

dx用于选择com端口。 00=com1, 01=com2al用于选择字符size(0 and 1 bit)stop bit(2nd bit)parity bits (3rd and 4th bit)baud rate(5,6,7 bit no.)

al=11100011=e3=8bits:无奇偶校验,一个停止位,9600波特率