38,6 → 38,8 |
#include <unistd.h> |
#include <fcntl.h> |
|
#include "../../app/iloader/pcb.h" |
|
static void kputint(unsigned i) |
{ |
unsigned dummy; |
60,11 → 62,9 |
int fd, rc; |
char buf[5]; |
|
kputint(-1); |
kputint(z); |
printf("Hello, world! (from rtld)\n"); |
|
fd = open("/test", O_RDONLY); |
fd = open("/tetris", O_RDONLY); |
if (fd < 0) { printf("fd<0 ("); _putint(fd); printf(")\n"); } |
fd = 0; |
|
76,26 → 76,21 |
|
printf("x\n"); |
while(1); |
|
asm ( |
"movl $253, %%eax;" |
"int $0x30" |
: /* output */ |
: /* input */ |
: "%eax","%ecx","%edx" /* all scratch registers clobbered */ |
); |
} |
|
|
void _rtld_main(void) |
{ |
kputint(-1); |
// test_func(); |
|
kputint(32); |
pcb_t *pcb; |
|
test_func(); |
printf("Hello, world! (from rtld)\n"); |
getchar(); |
printf("Run program..\n"); |
|
kputint(46); |
pcb = (pcb_t *)PCB_ADDRESS; |
pcb->entry(); |
} |
|
/** @} |