2010-05-04 69 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波特率