Paste: aaa
Author: | aaa |
Mode: | assembly-x86 |
Date: | Sat, 17 Jan 2009 17:19:20 |
Plain Text |
lee_puertoCOM proc near
push es ax
mov ax,40h
mov es,ax
mov ax,es:[0]
mov puerto,ax
pop ax es
ret
lee_puertoCOM endp
inhabilita_ints proc near
push ax dx
mov dx,puerto
inc dx
in al,dx
mov interrs,al
pop dx ax
ret
inhabilita_ints endp
restaura_ints proc near
push ax,dx
mov dx,puerto
inc dx
mov al,interrs
out dx,al
pop dx ax
ret
restaura_ints endp
sacar_bloqueCOM proc near
push ax cx dx si
xor si,si
mov cx,tam_leido
seg
sacar_bloqueCOM endp
lee_bloque proc
push ax cx dx si ds
mov ax,data
mov ds,ax
xor si,si
mov dx,puerto
add dx,5
seg6:
in al,dx
test al,00100000b
jz seg6
mov dx,puerto
mov al,CTRL_Q
out dx,al
mov cx,a_escribir
dec cx
mov dx,puerto
seg7:
add dx,5
seg8:
in al,dx
test al,00000001b
jz seg8
mov dx,puerto
in al,dx
mov ds:[si],al
inc si
loop seg7
mov dx,puerto
add dx,5
seg9:
in al,dx
test al,00100000b
jz seg9
mov dx,puerto
mov al, ctrl_s
out dx,al
mov dx,puerto
add dx,5
segA:
in al,dx
test al,0000001b
jz segA
mov dx,puerto
in al,dx
mov ds:[si],al
pop ds si dx cx ax
ret
lee_bloque endp
New Annotation