i everyone,
I'm trying to send data to arduino(serial) from assembler (8086 -windows).
I can read data but write doesn't work. I always receive 80H in AX, this is the code:
send proc
MOV AH,00 ; init port
MOV AL,11101011b ; 9600, N,1 bit stop, 8 bit data
MOV DX,00 ; com1
INT 14H
MOV AH, 1 ; write function
MOV AL, 'S' ; char to send
MOV DX, 00 ; com1
INT 14H
RET
send endp
This is the code to read, which works perfectly
recibir proc
push bx
MOV AH,00 ;inicializar el puerto
MOV AL,11110011b ; velocidad 9600, N,un bit de stop, 8 bit de datos....
MOV DX,00 ; puerto com1
INT 14H
Esperar:
mov dx,0000
mov ah,03h
int 14h
test ah,01h; si el bit 1(dato listo) esta puesto a cero no hay dato listo
jz Esperar ;salta y vuelve a verificar
mov dx,0000
mov ah,02h
int 14h
mov car, al
pop bx
ret
recibir endp
Regards