xv6/user1.c

31 lines
266 B
C
Raw Normal View History

2006-06-22 20:47:23 +00:00
void
fork()
{
asm("mov $1, %eax");
asm("int $48");
}
2006-06-26 15:11:19 +00: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 20:47:23 +00:00
main()
{
2006-06-26 15:11:19 +00:00
// fork();
puts("hello!\n");
2006-06-22 20:47:23 +00:00
while(1)
;
}