xv6-cs450/user1.c

31 lines
266 B
C
Raw Normal View History

2006-06-22 22:47:23 +02:00
void
fork()
{
asm("mov $1, %eax");
asm("int $48");
}
2006-06-26 17:11:19 +02:00
void
cons_putc(int c)
{
asm("mov $4, %eax");
asm("int $48");
}
void
puts(char *s)
{
int i;
for(i = 0; s[i]; i++)
cons_putc(s[i]);
}
2006-06-22 22:47:23 +02:00
main()
{
2006-06-26 17:11:19 +02:00
// fork();
puts("hello!\n");
2006-06-22 22:47:23 +02:00
while(1)
;
}