static void print(char *str) { char *dest = (char *)cur_pos; while(*str) { *dest++ = *str++; dest++; if(++x >= 80) { x = 0; ++y; } } mov_cur(); return; } static inline void mov_cur(void) { calc_offset(); outportb(CRTC_INDEX, 14); /* MSB of offset to CRTC reg 14 */ outportb(CRTC_DATA, (char)cur_pos >> 8); outportb(CRTC_INDEX, 15); /* LSB of offset to CRTC reg 15 */ outportb(CRTC_DATA, (char)cur_pos); return; }