/* * console_outbyte_polled * * This routine transmits a character using polling. */ void console_outbyte_polled( int port, char ch ) { TRAP0(SYS_write, 1, &ch, 1); }
int _lseek (int file, int ptr, int dir) { return TRAP0 (SYS_lseek, file, ptr, dir); }
int _write ( int file, char *ptr, size_t len) { return TRAP0 (SYS_write, file, ptr, len); }
void _exit (n) { /* Destructors should be done earlier because they need to be done before the files are closed, but here is better than nowhere (and this balances the constructors done in crt1.c. */ _do_dtors(); TRAP0 (SYS_exit, n, 0, 0); }
int execv (const char *path, char *const argv[]) { return TRAP0 (SYS_execv, path, argv, 0); }
void bsp_reset( void ) { TRAP0(SYS_exit, 0, 0, 0); }
int rename (const char *oldpath, const char *newpath) { return TRAP0 (SYS_rename, oldpath, newpath, 0); }
_read (int file, char *ptr, size_t len) { return TRAP0 (SYS_read, file, ptr, len); }
int creat (const char *path, int mode) { return TRAP0 (SYS_creat, path, mode, 0); }
clock_t _times (struct tms *buffer) { return TRAP0 (SYS_times, buffer, 0, 0); }
int _close (int file) { return TRAP0 (SYS_close, file, 0, 0); }
time_t time (time_t *tloc) { return TRAP0 (SYS_time, tloc, 0, 0); }
int _open (const char *path, int flags) { return TRAP0 (SYS_open, path, flags, 0); }
int _fork () { return TRAP0 (SYS_fork, 0, 0, 0); }
void sys_exit(void) { TRAP0(SYS_exit, 0, 0, 0); }
int chown (const char *path, short owner, short group) { return TRAP0 (SYS_chown, path, owner, group); }
_kill (n, m) { return TRAP0 (SYS_exit, 0xdead, 0, 0); }
int open (const char *path, int flags, int mode) { return TRAP0 (SYS_open, path, flags, mode); }