source:
trunk/minix/lib/i86/misc/io_insb.s@
9
Last change on this file since 9 was 9, checked in by , 14 years ago | |
---|---|
File size: 374 bytes |
Line | |
---|---|
1 | ! insb() - Input a byte array Author: Kees J. Bot |
2 | ! 18 Mar 1996 |
3 | ! void insb(U16_t port, void *buf, size_t count); |
4 | |
5 | .sect .text |
6 | .define _insb |
7 | _insb: |
8 | push bp |
9 | mov bp, sp |
10 | cld |
11 | push di |
12 | mov dx, 4(bp) ! port |
13 | mov di, 6(bp) ! buf |
14 | mov cx, 8(bp) ! byte count |
15 | jcxz 1f |
16 | 0: inb dx ! input 1 byte |
17 | stosb ! write 1 byte |
18 | loop 0b ! many times |
19 | 1: pop di |
20 | pop bp |
21 | ret |
Note:
See TracBrowser
for help on using the repository browser.