使用TASM进行8086编程:pc到pc通信

时间:2010-05-04 15:40:11

标签: tasm

.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的含义?

3 个答案:

答案 0 :(得分:3)

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

答案 1 :(得分:2)

根据我在14h中找到的docs

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

答案 2 :(得分: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波特率

相关问题