minix/lib/i86/misc/io_outsb.s

22 lines
379 B
ArmAsm
Raw Normal View History

2005-04-21 16:53:53 +02:00
! outsb() - Output a byte array Author: Kees J. Bot
! 18 Mar 1996
! void outsb(U16_t port, void *buf, size_t count);
.sect .text
.define _outsb
_outsb:
push bp
mov bp, sp
cld
push si
mov dx, 4(bp) ! port
mov si, 6(bp) ! buf
mov cx, 8(bp) ! byte count
jcxz 1f
0: lodsb ! read 1 byte
outb dx ! output 1 byte
loop 0b ! many times
1: pop si
pop bp
ret