- Timestamp:
- 08/11/09 16:20:45 (3 years ago)
- Children:
- 9c111b3eb8f35bae1f6268eaa1b5f1808acd7d66
- Parents:
- 77632adf09dbf7d4d72ce3763566f1dade3bb0e2
- git-author:
- Pierre-Alexandre Meyer <pierre@mouraf.org> / 2009-08-11T08:58:19Z-0700
- git-committer:
- Pierre-Alexandre Meyer <pierre@mouraf.org> / 2009-08-11T09:20:45Z-0700
- Files:
-
- 1 modified
-
com32/lib/sys/ansicon_write.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
com32/lib/sys/ansicon_write.c
r11c6d38 re9b317 45 45 46 46 static void ansicon_erase(const struct term_state *, int, int, int, int); 47 static void ansicon_write_char(int, int, uint8_t, const struct term_state *);47 static void ansicon_write_char(int, int, int, uint8_t, const struct term_state *); 48 48 static void ansicon_showcursor(const struct term_state *); 49 49 static void ansicon_scroll_up(const struct term_state *); 50 static void ansicon_set_cursor(int, int, int );50 static void ansicon_set_cursor(int, int, int, int); 51 51 52 52 static struct term_state ts; … … 65 65 .op = &__ansicon_ops 66 66 }; 67 68 #define BIOS_CURXY ((struct curxy *)0x450) /* Array for each page */69 #define BIOS_ROWS (*(uint8_t *)0x484) /* Minus one; if zero use 24 (= 25 lines) */70 #define BIOS_COLS (*(uint16_t *)0x44A)71 #define BIOS_PAGE (*(uint8_t *)0x462)72 67 73 68 /* Reference counter to the screen, to keep track of if we need … … 177 172 } 178 173 179 static void ansicon_set_cursor(int x, int y, int visible) 180 { 181 const int page = BIOS_PAGE; 174 static void ansicon_set_cursor(int x, int y, int page, int visible) 175 { 182 176 struct curxy xy = BIOS_CURXY[page]; 183 177 static com32sys_t ireg; … … 194 188 } 195 189 196 static void ansicon_write_char(int x, int y, uint8_t ch,190 static void ansicon_write_char(int x, int y, int page, uint8_t ch, 197 191 const struct term_state *st) 198 192 { 199 193 static com32sys_t ireg; 200 194 201 ansicon_set_cursor(x, y, 0 );195 ansicon_set_cursor(x, y, 0, page); 202 196 203 197 ireg.eax.b[1] = 0x09; 204 198 ireg.eax.b[0] = ch; 205 ireg.ebx.b[1] = BIOS_PAGE;199 ireg.ebx.b[1] = page; 206 200 ireg.ebx.b[0] = ansicon_attribute(st); 207 201 ireg.ecx.w[0] = 1;
