diff --git a/bas.lk.in b/bas.lk.in index d0b01b8..9092496 100644 --- a/bas.lk.in +++ b/bas.lk.in @@ -97,6 +97,7 @@ SECTIONS OBJDIR/fbmem.o(.text) OBJDIR/fbmon.o(.text) OBJDIR/fbmodedb.o(.text) + OBJDIR/fnt_st_8x16.o(.text) OBJDIR/offscreen.o(.text) OBJDIR/x86emu.o(.text) diff --git a/include/font.h b/include/font.h index 2091ca3..92b9e32 100644 --- a/include/font.h +++ b/include/font.h @@ -95,6 +95,6 @@ struct font_head { void font_init(void); /* initialize BIOS font ring */ void font_set_default(void); /* choose the default font */ -extern const struct font_head *fnt_st_8x16; +extern struct font_head *fnt; #endif /* FONT_H */ diff --git a/util/bas_string.c b/util/bas_string.c index 93fb6f8..64bbe07 100644 --- a/util/bas_string.c +++ b/util/bas_string.c @@ -34,6 +34,16 @@ void *memcpy(void *dst, const void *src, size_t n) return dst; } +void *memmove(void *dst, const void *src, size_t n) +{ + uint8_t *to = dst; + + while (to < (uint8_t *) dst + n) + *to++ = * (uint8_t *) src++; + + return dst; +} + void bzero(void *s, size_t n) { size_t i; diff --git a/util/conout.c b/util/conout.c index b50e11d..6e4441a 100755 --- a/util/conout.c +++ b/util/conout.c @@ -19,15 +19,29 @@ #define plane_offset 2 /* interleaved planes */ -#define v_fnt_st fnt_st_8x16->first_ade -#define v_fnt_nd fnt_st_8x16->last_ade -#define v_off_ad fnt_st_8x16->off_table +#define v_fnt_st fnt->first_ade +#define v_fnt_nd fnt->last_ade +#define v_off_ad fnt->off_table #define v_bas_ad info_fb->screen_base uint8_t *v_cur_ad; /* cursor address */ int8_t v_stat_0; /* console status byte */ uint16_t v_cur_cx; uint16_t v_cur_cy; +int8_t v_cur_tim; +uint16_t v_cel_mx; +uint16_t v_cel_my; +uint16_t v_cel_wr; +int16_t v_cur_of; +uint16_t v_cel_ht; +int8_t v_period; +const uint16_t *v_fnt_ad; +int16_t v_fbt_wr; +int16_t v_col_bg; +int16_t v_col_fg; +uint16_t v_fnt_wr; + + const int16_t v_planes = 8; extern struct fb_info *info_fb; #define v_lin_wr (info_fb->var.width / 2) /* length of a screen line in words */ diff --git a/video/fnt_st_8x16.c b/video/fnt_st_8x16.c index 5015cca..cc29ab5 100644 --- a/video/fnt_st_8x16.c +++ b/video/fnt_st_8x16.c @@ -335,3 +335,5 @@ const struct font_head fnt_st_8x16 = { 0, /* struct font * next_font */ 0 /* UWORD next_seg */ }; + +struct font_head *fnt = &fnt_st_8x16;