/** * Standard write function for the libc. * * @param fd file descriptor (should always be 1 or 2) * @param buf pointer to the array with the output characters * @param count number of bytes to be written * @return the number of bytes that have been written successfully */ ssize_t write(int fd, const void *buf, size_t count) { int i; char *ptr = (char *)buf; if (fd != 1 && fd != 2) return 0; for (i = 0; i < count; i++) { if (*ptr == '\n') io_putchar('\r'); io_putchar(*ptr++); } return i; }
/* This should probably be temporary until a better solution is found */ void asm_cout(long Character, long UART, long NVRAM __attribute__((unused))) { if (UART) io_putchar(Character); }
/* This should probably be temporary until a better solution is found */ void asm_cout(long Character, long UART, long NVRAM ATTRIBUTE_UNUSED) { if (UART) io_putchar(Character); }