* Write the character string pointed to by 's', whose maximum length * is 'len' at location (x,y) using the 'colour' colour. * */
| 1112 | * |
| 1113 | */ |
| 1114 | static void |
| 1115 | vga_WriteStr(char *s, int len, int col, int row, int colour) |
| 1116 | { |
| 1117 | unsigned char *us; |
| 1118 | int i = 0; |
| 1119 | |
| 1120 | /* protection from callers */ |
| 1121 | if (row > (LI - 1)) |
| 1122 | return; |
| 1123 | |
| 1124 | i = 0; |
| 1125 | us = (unsigned char *) s; |
| 1126 | while ((*us != 0) && (i < len) && (col < (CO - 1))) { |
| 1127 | vga_WriteChar((uchar) *us, col, row, colour); |
| 1128 | ++us; |
| 1129 | ++i; |
| 1130 | ++col; |
| 1131 | } |
| 1132 | } |
| 1133 | |
| 1134 | /* |
| 1135 | * Initialize the VGA palette with the desired colours. This |
no test coverage detected