newlib-cygwin/newlib/libc/sys/h8300hms/write.c

17 lines
247 B
C
Raw Normal View History

2000-02-18 03:39:52 +08:00
int _write(file, ptr, len)
int file;
char *ptr;
int len;
{
int todo;
for (todo = 0; todo < len; todo++)
{
asm("mov.b #0,r1l\n mov.b %0l,r2l\njsr @@0xc4" : : "r" (*ptr++) : "r1", "r2");
}
return len;
}