1# Some sources from SVAsync (c) 1996, 1997, Samuel Vincent
2# 7337 Carioca Ct, Rohnert Park, Ca 94928
3# "you may freely use it in your programs without paying me anything"
4
5	.file   "isr.S"
6.text
7.align 4
8.globl _SVAsyncProtISR
9_SVAsyncProtISR:
10	pushl %eax
11	pushl %edx
12	pushw %ds
13	movw %cs:___djgpp_ds_alias, %ds
14top:
15	movw _LSR,%dx
16	inb %dx, %al
17	testb $1,%al
18	je byebye
19
20	movw _RDR,%dx
21	inb %dx, %al
22	movl _RecHead,%edx
23	incl _RecHead
24	movb %al, _RecBuffer(%edx)
25	cmpl $32768,_RecHead
26	jb inrange
27	movl $0,_RecHead
28inrange:
29	jmp top
30
31byebye:
32	popw %ds
33	popl %edx
34
35	movb $32,%al
36	outb %al, $32
37
38	popl %eax
39	iret
40