Всем доброго дня!
Собственно просто для интереса решил попробовать русифицировать видеоадаптер для текстового режима. Вначале хотел для режима 0x03, но так и не понял какого там размера шрифт (8x8 или 8x16). Поэтому решил использовать режим 0x01.
Создал файл
font.asm и вставил туда описание шрифта для всех 256 символов (из сайта Фроловых):
Код:
boot_font0 db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
boot_font1 db 0x7E,0x81,0xA5,0x81,0xBD,0x99,0x81,0x7E
boot_font2 db 0x7E,0xFF,0xdb,0xFF,0xC3,0xE7,0xFF,0x7E
boot_font3 db 0x6C,0xFE,0xFE,0xFE,0x7C,0x38,0x10,0x00
boot_font4 db 0x10,0x38,0x7C,0xFE,0x7C,0x38,0x10,0x00
boot_font5 db 0x38,0x7C,0x38,0xFE,0xFE,0x7C,0x38,0x7C
boot_font6 db 0x10,0x10,0x38,0x7C,0xFE,0x7C,0x38,0x7C
boot_font7 db 0x00,0x00,0x18,0x3C,0x3C,0x18,0x00,0x00
boot_font8 db 0xFF,0xFF,0xE7,0xC3,0xC3,0xE7,0xFF,0xFF
boot_font9 db 0x00,0x3C,0x66,0x42,0x42,0x66,0x3C,0x00
boot_font10 db 0xFF,0xC3,0x99,0xBD,0xBD,0x99,0xC3,0xFF
boot_font11 db 0x0F,0x07,0x0F,0x7D,0xCC,0xCC,0xCC,0x78
boot_font12 db 0x3C,0x66,0x66,0x66,0x3C,0x18,0x7E,0x18
boot_font13 db 0x3F,0x33,0x3F,0x30,0x30,0x70,0xF0,0xE0
boot_font14 db 0x7F,0x63,0x7F,0x63,0x63,0x67,0xE6,0xC0
boot_font15 db 0x99,0x5A,0x3C,0xE7,0xE7,0x3C,0x5A,0x99
boot_font16 db 0x80,0xE0,0xF8,0xFE,0xF8,0xE0,0x80,0x00
boot_font17 db 0x02,0x0E,0x3E,0xFE,0x3E,0x0E,0x02,0x00
boot_font18 db 0x18,0x3C,0x7E,0x18,0x18,0x7E,0x3C,0x18
boot_font19 db 0x66,0x66,0x66,0x66,0x66,0x00,0x66,0x00
boot_font20 db 0x7F,0xdb,0xdb,0x7B,0x1B,0x1B,0x1B,0x00
boot_font21 db 0x3E,0x63,0x38,0x6C,0x6C,0x38,0xCC,0x78
boot_font22 db 0x00,0x00,0x00,0x00,0x7E,0x7E,0x7E,0x00
boot_font23 db 0x18,0x3C,0x7E,0x18,0x7E,0x3C,0x18,0xFF
boot_font24 db 0x18,0x3C,0x7E,0x18,0x18,0x18,0x18,0x00
boot_font25 db 0x18,0x18,0x18,0x18,0x7E,0x3C,0x18,0x00
boot_font26 db 0x00,0x18,0x0C,0xFE,0x0C,0x18,0x00,0x00
boot_font27 db 0x00,0x30,0x60,0xFE,0x60,0x30,0x00,0x00
boot_font28 db 0x00,0x00,0xC0,0xC0,0xC0,0xFE,0x00,0x00
boot_font29 db 0x00,0x24,0x66,0xFF,0x66,0x24,0x00,0x00
boot_font30 db 0x00,0x18,0x3C,0x7E,0xFF,0xFF,0x00,0x00
boot_font31 db 0x00,0xFF,0xFF,0x7E,0x3C,0x18,0x00,0x00
boot_font32 db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
boot_font33 db 0x30,0x78,0x78,0x30,0x30,0x00,0x30,0x00
boot_font34 db 0x6C,0x6C,0x6C,0x00,0x00,0x00,0x00,0x00
boot_font35 db 0x6C,0x6C,0xFE,0x6C,0xFE,0x6C,0x6C,0x00
boot_font36 db 0x30,0x7C,0xC0,0x78,0x0C,0xF8,0x30,0x00
boot_font37 db 0x00,0xC6,0xCC,0x18,0x30,0x66,0xC6,0x00
boot_font38 db 0x38,0x6C,0x38,0x76,0xDC,0xCC,0x76,0x00
boot_font39 db 0x60,0x60,0xC0,0x00,0x00,0x00,0x00,0x00
boot_font40 db 0x18,0x30,0x60,0x60,0x60,0x30,0x18,0x00
boot_font41 db 0x60,0x30,0x18,0x18,0x18,0x30,0x60,0x00
boot_font42 db 0x00,0x66,0x3C,0xFF,0x3C,0x66,0x00,0x00
boot_font43 db 0x00,0x30,0x30,0xFC,0x30,0x30,0x00,0x00
boot_font44 db 0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x60
boot_font45 db 0x00,0x00,0x00,0xFC,0x00,0x00,0x00,0x00
boot_font46 db 0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00
boot_font47 db 0x06,0x0C,0x18,0x30,0x60,0xC0,0x80,0x00
boot_font48 db 0x7C,0xC6,0xCE,0xDE,0xF6,0xE6,0x7C,0x00
boot_font49 db 0x30,0x70,0x30,0x30,0x30,0x30,0xFC,0x00
boot_font50 db 0x78,0xCC,0x0C,0x38,0x60,0xCC,0xFC,0x00
boot_font51 db 0x78,0xCC,0x0C,0x38,0x0C,0xCC,0x78,0x00
boot_font52 db 0x1C,0x3C,0x6C,0xCC,0xFE,0x0C,0x1E,0x00
boot_font53 db 0xFC,0xC0,0xF8,0x0C,0x0C,0xCC,0x78,0x00
boot_font54 db 0x38,0x60,0xC0,0xF8,0xCC,0xCC,0x78,0x00
boot_font55 db 0xFC,0xCC,0x0C,0x18,0x30,0x30,0x30,0x00
boot_font56 db 0x78,0xCC,0xCC,0x78,0xCC,0xCC,0x78,0x00
boot_font57 db 0x78,0xCC,0xCC,0x7C,0x0C,0x18,0x70,0x00
boot_font58 db 0x00,0x30,0x30,0x00,0x00,0x30,0x30,0x00
boot_font59 db 0x00,0x30,0x30,0x00,0x00,0x30,0x30,0x60
boot_font60 db 0x18,0x30,0x60,0xC0,0x60,0x30,0x18,0x00
boot_font61 db 0x00,0x00,0xFC,0x00,0x00,0xFC,0x00,0x00
boot_font62 db 0x60,0x30,0x18,0x0C,0x18,0x30,0x60,0x00
boot_font63 db 0x78,0xCC,0x0C,0x18,0x30,0x00,0x30,0x00
boot_font64 db 0x7C,0xC6,0xDE,0xDE,0xDE,0xC0,0x78,0x00
;boot_font65 db 0x30,0x78,0xCC,0xCC,0xFC,0xCC,0xCC,0x00
boot_font65 db 00000000b,01111110b,00000010b,00000010b,00000010b,00000010b,00000010b,00000000b
boot_font66 db 0xFC,0x66,0x66,0x7C,0x66,0x66,0xFC,0x00
boot_font67 db 0x3C,0x66,0xC0,0xC0,0xC0,0x66,0x3C,0x00
boot_font68 db 0xF8,0x6C,0x66,0x66,0x66,0x6C,0xF8,0x00
boot_font69 db 0xFE,0x62,0x68,0x78,0x68,0x62,0xFE,0x00
boot_font70 db 0xFE,0x62,0x68,0x78,0x68,0x60,0xF0,0x00
boot_font71 db 0x3C,0x66,0xC0,0xC0,0xCE,0x66,0x3E,0x00
boot_font72 db 0xCC,0xCC,0xCC,0xFC,0xCC,0xCC,0xCC,0x00
boot_font73 db 0x78,0x30,0x30,0x30,0x30,0x30,0x78,0x00
boot_font74 db 0x1E,0x0C,0x0C,0x0C,0xCC,0xCC,0x78,0x00
boot_font75 db 0xE6,0x66,0x6C,0x78,0x6C,0x66,0xE6,0x00
boot_font76 db 0xF0,0x60,0x60,0x60,0x62,0x66,0xFE,0x00
boot_font77 db 0xC6,0xEE,0xFE,0xFE,0xD6,0xC6,0xC6,0x00
boot_font78 db 0xC6,0xE6,0xF6,0xDE,0xCE,0xC6,0xC6,0x00
boot_font79 db 0x38,0x6C,0xC6,0xC6,0xC6,0x6C,0x38,0x00
boot_font80 db 0xFC,0x66,0x66,0x7C,0x60,0x60,0xF0,0x00
boot_font81 db 0x78,0xCC,0xCC,0xCC,0xDC,0x78,0x1C,0x00
boot_font82 db 0xFC,0x66,0x66,0x7C,0x6C,0x66,0xE6,0x00
boot_font83 db 0x78,0xCC,0xE0,0x70,0x1C,0xCC,0x78,0x00
boot_font84 db 0xFC,0xB4,0x30,0x30,0x30,0x30,0x78,0x00
boot_font85 db 0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0xFC,0x00
boot_font86 db 0xCC,0xCC,0xCC,0xCC,0xCC,0x78,0x30,0x00
boot_font87 db 0xC6,0xC6,0xC6,0xD6,0xFE,0xEE,0xC6,0x00
boot_font88 db 0xC6,0x44,0x6C,0x38,0x38,0x6C,0xC6,0x00
boot_font89 db 0xCC,0xCC,0xCC,0x78,0x30,0x30,0x78,0x00
boot_font90 db 0xFE,0xC6,0x8C,0x18,0x32,0x66,0xFE,0x00
boot_font91 db 0x78,0x60,0x60,0x60,0x60,0x60,0x78,0x00
boot_font92 db 0xC0,0x60,0x30,0x18,0x0C,0x06,0x02,0x00
boot_font93 db 0x78,0x18,0x18,0x18,0x18,0x18,0x78,0x00
boot_font94 db 0x10,0x38,0x6C,0xC6,0x00,0x00,0x00,0x00
boot_font95 db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF
boot_font96 db 0x30,0x30,0x18,0x00,0x00,0x00,0x00,0x00
boot_font97 db 0x00,0x00,0x78,0x0C,0x7C,0xCC,0x7C,0x00
boot_font98 db 0x60,0x60,0x60,0x7C,0x66,0x66,0x7C,0x00
boot_font99 db 0x00,0x00,0x78,0xCC,0xC0,0xCC,0x78,0x00
boot_font100 db 0x0C,0x0C,0x0C,0x7C,0xCC,0xCC,0x7C,0x00
boot_font101 db 0x00,0x00,0x78,0xCC,0xFC,0xC0,0x78,0x00
boot_font102 db 0x38,0x6C,0x60,0xF0,0x60,0x60,0xF0,0x00
boot_font103 db 0x00,0x00,0x7C,0xCC,0xCC,0x7C,0x0C,0xF8
boot_font104 db 0x60,0x60,0x7C,0x66,0x66,0x66,0x66,0x00
boot_font105 db 0x30,0x00,0x70,0x30,0x30,0x30,0x78,0x00
boot_font106 db 0x0C,0x00,0x0C,0x0C,0x0C,0x0C,0x6C,0x38
boot_font107 db 0x60,0x60,0x66,0x6C,0x78,0x6C,0x66,0x00
boot_font108 db 0x70,0x30,0x30,0x30,0x30,0x30,0x78,0x00
boot_font109 db 0x00,0x00,0xCC,0xFE,0xFE,0xD6,0xC6,0x00
boot_font110 db 0x00,0x00,0xF8,0xCC,0xCC,0xCC,0xCC,0x00
boot_font111 db 0x00,0x00,0x78,0xCC,0xCC,0xCC,0x78,0x00
boot_font112 db 0x00,0x00,0x7C,0x66,0x66,0x7C,0x60,0x60
boot_font113 db 0x00,0x00,0x7C,0xCC,0xCC,0x7C,0x0C,0x0C
boot_font114 db 0x00,0x00,0xDC,0x76,0x66,0x60,0xF0,0x00
boot_font115 db 0x00,0x00,0x7C,0xC0,0x78,0x0C,0xF8,0x00
boot_font116 db 0x10,0x30,0x7C,0x30,0x30,0x34,0x18,0x00
boot_font117 db 0x00,0x00,0xCC,0xCC,0xCC,0xCC,0x7C,0x00
boot_font118 db 0x00,0x00,0xCC,0xCC,0xCC,0x78,0x30,0x00
boot_font119 db 0x00,0x00,0xC6,0xD6,0xFE,0xFE,0x6C,0x00
boot_font120 db 0x00,0x00,0xC6,0x6C,0x38,0x6C,0xC6,0x00
boot_font121 db 0x00,0x00,0xCC,0xCC,0xCC,0x7C,0x0C,0xF8
boot_font122 db 0x00,0x00,0xFC,0x98,0x30,0x64,0xFC,0x00
boot_font123 db 0x1C,0x30,0x30,0xE0,0x30,0x30,0x1C,0x00
boot_font124 db 0x18,0x18,0x18,0x00,0x18,0x18,0x18,0x00
boot_font125 db 0xE0,0x30,0x30,0x1C,0x30,0x30,0xE0,0x00
boot_font126 db 0x76,0xDC,0x00,0x00,0x00,0x00,0x00,0x00
boot_font127 db 0x00,0x10,0x38,0x6C,0xC6,0xC6,0xFE,0x00
boot_font128 db 0x1E,0x36,0x66,0x66,0x7E,0x66,0x66,0x00
boot_font129 db 0x7C,0x60,0x60,0x7C,0x66,0x66,0x7C,0x00
boot_font130 db 0x7C,0x66,0x66,0x7C,0x66,0x66,0x7C,0x00
boot_font131 db 0x7E,0x60,0x60,0x60,0x60,0x60,0x60,0x00
boot_font132 db 0x38,0x6C,0x6C,0x6C,0x6C,0x6C,0xFE,0xC6
boot_font133 db 0x7E,0x60,0x60,0x7C,0x60,0x60,0x7E,0x00
boot_font134 db 0xdb,0xdb,0x7E,0x3C,0x7E,0xdb,0xdb,0x00
boot_font135 db 0x3C,0x66,0x06,0x1C,0x06,0x66,0x3C,0x00
boot_font136 db 0x66,0x66,0x6E,0x7E,0x76,0x66,0x66,0x00
boot_font137 db 0x3C,0x66,0x6E,0x7E,0x76,0x66,0x66,0x00
boot_font138 db 0x66,0x6C,0x78,0x70,0x78,0x6C,0x66,0x00
boot_font139 db 0x1E,0x36,0x66,0x66,0x66,0x66,0x66,0x00
boot_font140 db 0xC6,0xEE,0xFE,0xFE,0xD6,0xC6,0xC6,0x00
boot_font141 db 0x66,0x66,0x66,0x7E,0x66,0x66,0x66,0x00
boot_font142 db 0x3C,0x66,0x66,0x66,0x66,0x66,0x3C,0x00
boot_font143 db 0x7E,0x66,0x66,0x66,0x66,0x66,0x66,0x00
boot_font144 db 0x7C,0x66,0x66,0x66,0x7C,0x60,0x60,0x00
boot_font145 db 0x3C,0x66,0x60,0x60,0x60,0x66,0x3C,0x00
boot_font146 db 0x7E,0x18,0x18,0x18,0x18,0x18,0x18,0x00
boot_font147 db 0x66,0x66,0x66,0x3E,0x06,0x66,0x3C,0x00
boot_font148 db 0x7E,0xdb,0xdb,0xdb,0x7E,0x18,0x18,0x00
boot_font149 db 0x66,0x66,0x3C,0x18,0x3C,0x66,0x66,0x00
boot_font150 db 0x66,0x66,0x66,0x66,0x66,0x66,0x7F,0x03
boot_font151 db 0x66,0x66,0x66,0x3E,0x06,0x06,0x06,0x00
boot_font152 db 0xdb,0xdb,0xdb,0xdb,0xdb,0xdb,0xFF,0x00
boot_font153 db 0xdb,0xdb,0xdb,0xdb,0xdb,0xdb,0xFF,0x03
boot_font154 db 0xE0,0x60,0x60,0x7C,0x66,0x66,0x7C,0x00
boot_font155 db 0xC6,0xC6,0xC6,0xF6,0xDE,0xDE,0xF6,0x00
boot_font156 db 0x60,0x60,0x60,0x7C,0x66,0x66,0x7C,0x00
boot_font157 db 0x78,0x8C,0x06,0x3E,0x06,0x8C,0x78,0x00
boot_font158 db 0xCE,0xdb,0xdb,0xFB,0xdb,0xdb,0xCE,0x00
boot_font159 db 0x3E,0x66,0x66,0x66,0x3E,0x36,0x66,0x00
boot_font160 db 0x00,0x00,0x78,0x0C,0x7C,0xCC,0x76,0x00
boot_font161 db 0x00,0x3C,0x60,0x3C,0x66,0x66,0x3C,0x00
boot_font162 db 0x00,0x00,0x7C,0x66,0x7C,0x66,0x7C,0x00
boot_font163 db 0x00,0x00,0x7E,0x60,0x60,0x60,0x60,0x00
boot_font164 db 0x00,0x00,0x3C,0x6C,0x6C,0x6C,0xFE,0xC6
boot_font165 db 0x00,0x00,0x3C,0x66,0x7E,0x60,0x3C,0x00
boot_font166 db 0x00,0x00,0xdb,0x7E,0x3C,0x7E,0xdb,0x00
boot_font167 db 0x00,0x00,0x3C,0x66,0x0C,0x66,0x3C,0x00
boot_font168 db 0x00,0x00,0x66,0x6E,0x7E,0x76,0x66,0x00
boot_font169 db 0x00,0x18,0x66,0x6E,0x7E,0x76,0x66,0x00
boot_font170 db 0x00,0x00,0x66,0x6C,0x78,0x6C,0x66,0x00
boot_font171 db 0x00,0x00,0x1E,0x36,0x66,0x66,0x66,0x00
boot_font172 db 0x00,0x00,0xC6,0xFE,0xFE,0xD6,0xC6,0x00
boot_font173 db 0x00,0x00,0x66,0x66,0x7E,0x66,0x66,0x00
boot_font174 db 0x00,0x00,0x3C,0x66,0x66,0x66,0x3C,0x00
boot_font175 db 0x00,0x00,0x7E,0x66,0x66,0x66,0x66,0x00
boot_font176 db 0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44
boot_font177 db 0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA
boot_font178 db 0xDD,0x77,0xDD,0x77,0xDD,0x77,0xDD,0x77
boot_font179 db 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18
boot_font180 db 0x18,0x18,0x18,0xF8,0x18,0x18,0x18,0x18
boot_font181 db 0x18,0xF8,0x18,0xF8,0x18,0x18,0x18,0x18
boot_font182 db 0x36,0x36,0x36,0xF6,0x36,0x36,0x36,0x36
boot_font183 db 0x00,0x00,0x00,0xFE,0x36,0x36,0x36,0x36
boot_font184 db 0x00,0xF8,0x18,0xF8,0x18,0x18,0x18,0x18
boot_font185 db 0x36,0xF6,0x06,0xF6,0x36,0x36,0x36,0x36
boot_font186 db 0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36
boot_font187 db 0x00,0xFE,0x06,0xF6,0x36,0x36,0x36,0x36
boot_font188 db 0x36,0xF6,0x06,0xFE,0x00,0x00,0x00,0x00
boot_font189 db 0x36,0x36,0x36,0xFE,0x00,0x00,0x00,0x00
boot_font190 db 0x18,0xF8,0x18,0xF8,0x00,0x00,0x00,0x00
boot_font191 db 0x00,0x00,0x00,0xF8,0x18,0x18,0x18,0x18
boot_font192 db 0x18,0x18,0x18,0x1F,0x00,0x00,0x00,0x00
boot_font193 db 0x18,0x18,0x18,0xFF,0x00,0x00,0x00,0x00
boot_font194 db 0x00,0x00,0x00,0xFF,0x18,0x18,0x18,0x18
boot_font195 db 0x18,0x18,0x18,0x1F,0x18,0x18,0x18,0x18
boot_font196 db 0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00
boot_font197 db 0x18,0x18,0x18,0xFF,0x18,0x18,0x18,0x18
boot_font198 db 0x18,0x1F,0x18,0x1F,0x18,0x18,0x18,0x18
boot_font199 db 0x36,0x36,0x36,0x37,0x36,0x36,0x36,0x36
boot_font200 db 0x36,0x37,0x30,0x3F,0x00,0x00,0x00,0x00
boot_font201 db 0x00,0x3F,0x30,0x37,0x36,0x36,0x36,0x36
boot_font202 db 0x36,0xF7,0x00,0xFF,0x00,0x00,0x00,0x00
boot_font203 db 0x00,0xFF,0x00,0xF7,0x36,0x36,0x36,0x36
boot_font204 db 0x36,0x37,0x30,0x37,0x36,0x36,0x36,0x36
boot_font205 db 0x00,0xFF,0x00,0xFF,0x00,0x00,0x00,0x00
boot_font206 db 0x36,0xF7,0x00,0xF7,0x36,0x36,0x36,0x36
boot_font207 db 0x18,0xFF,0x00,0xFF,0x00,0x00,0x00,0x00
boot_font208 db 0x36,0x36,0x36,0xFF,0x00,0x00,0x00,0x00
boot_font209 db 0x00,0xFF,0x00,0xFF,0x18,0x18,0x18,0x18
boot_font210 db 0x00,0x00,0x00,0xFF,0x36,0x36,0x36,0x36
boot_font211 db 0x36,0x36,0x36,0x3F,0x00,0x00,0x00,0x00
boot_font212 db 0x18,0x1F,0x18,0x1F,0x00,0x00,0x00,0x00
boot_font213 db 0x00,0x1F,0x18,0x1F,0x18,0x18,0x18,0x18
boot_font214 db 0x00,0x00,0x00,0x3F,0x36,0x36,0x36,0x36
boot_font215 db 0x36,0x36,0x36,0xFF,0x36,0x36,0x36,0x36
boot_font216 db 0x18,0xFF,0x18,0xFF,0x18,0x18,0x18,0x18
boot_font217 db 0x18,0x18,0x18,0xF8,0x00,0x00,0x00,0x00
boot_font218 db 0x00,0x00,0x00,0x1F,0x18,0x18,0x18,0x18
boot_font219 db 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
boot_font220 db 0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF
boot_font221 db 0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0
boot_font222 db 0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F
boot_font223 db 0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00
boot_font224 db 0x00,0x00,0x7C,0x66,0x66,0x7C,0x60,0x00
boot_font225 db 0x00,0x00,0x3C,0x66,0x60,0x66,0x3C,0x00
boot_font226 db 0x00,0x00,0x7E,0x18,0x18,0x18,0x18,0x00
boot_font227 db 0x00,0x00,0x66,0x66,0x3E,0x06,0x3C,0x00
boot_font228 db 0x00,0x00,0x7E,0xdb,0xdb,0x7E,0x18,0x00
boot_font229 db 0x00,0x00,0x66,0x3C,0x18,0x3C,0x66,0x00
boot_font230 db 0x00,0x00,0x66,0x66,0x66,0x66,0x7F,0x03
boot_font231 db 0x00,0x00,0x66,0x66,0x3E,0x06,0x06,0x00
boot_font232 db 0x00,0x00,0xdb,0xdb,0xdb,0xdb,0xFF,0x00
boot_font233 db 0x00,0x00,0xdb,0xdb,0xdb,0xdb,0xFF,0x03
boot_font234 db 0x00,0x00,0xE0,0x60,0x7C,0x66,0x7C,0x00
boot_font235 db 0x00,0x00,0xC6,0xC6,0xF6,0xDE,0xF6,0x00
boot_font236 db 0x00,0x00,0x60,0x60,0x7C,0x66,0x7C,0x00
boot_font237 db 0x00,0x00,0x7C,0x06,0x3E,0x06,0x7C,0x00
boot_font238 db 0x00,0x00,0xCE,0xdb,0xFB,0xdb,0xCE,0x00
boot_font239 db 0x00,0x00,0x3E,0x66,0x3E,0x36,0x66,0x00
boot_font240 db 0x66,0x00,0x7E,0x60,0x7C,0x60,0x7E,0x00
boot_font241 db 0x24,0x00,0x3C,0x66,0x7E,0x60,0x3C,0x00
boot_font242 db 0x00,0x30,0x18,0x0C,0x06,0x0C,0x18,0x30
boot_font243 db 0x00,0x0C,0x18,0x30,0x60,0x30,0x18,0x0C
boot_font244 db 0x0E,0x1B,0x1B,0x18,0x18,0x18,0x18,0x18
boot_font245 db 0x18,0x18,0x18,0x18,0x18,0xD8,0xD8,0x70
boot_font246 db 0x00,0x18,0x18,0x00,0x7E,0x00,0x18,0x18
boot_font247 db 0x00,0x76,0xDC,0x00,0x76,0xDC,0x00,0x00
boot_font248 db 0x00,0x38,0x6C,0x6C,0x38,0x00,0x00,0x00
boot_font249 db 0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00
boot_font250 db 0x00,0x00,0x00,0x38,0x38,0x00,0x00,0x00
boot_font251 db 0xF8,0x06,0x73,0x79,0x23,0xFE,0xA0,0xA0
boot_font252 db 0x06,0x08,0xCB,0x6B,0x68,0x5B,0x58,0x8C
boot_font253 db 0x30,0x48,0x10,0x20,0x78,0x00,0x00,0x00
boot_font254 db 0xFF,0x81,0xBD,0xA5,0xA5,0xBD,0x81,0xFF
boot_font255 db 0x00,0x00,0x00,0x00,0x00,0x42,0x7E,0x00
Не знаю заметили Вы или нет, то там символ
boot_font65 (а это буква
A) мной изменённый. Я решил на него изобразить букву
Г. Далее я пишу главный файл
boot.asm:
Код:
use16
org 0x7C00
boot_code:
mov AX,CS
mov DS,AX
mov ES,AX
mov FS,AX
mov GS,AX
mov SS,AX
mov SP,0x7C00-4
mov AH,0x02
mov AL,4 ; Количество читаемых секторов
mov CL,2 ; Сектор
mov CH,0 ; Цилиндр
mov DH,0 ; Головка
mov DL,0 ; Диск
mov BX,boot_font
int 0x13
mov AH,0x11
mov AL,0x01
mov BH,8
mov BL,0
mov CX,256
mov DX,0
mov BP,boot_font
int 0x10
mov AH,0x00
mov AL,0x01
int 0x10
mov AH,0x09
mov AL,65
mov BH,0
mov BL,00001010b
mov CX,1
int 0x10
hlt
rb 510-($-$$)
db 0x55,0xAA
boot_font:
include "Font.asm"
rb (2880*512)-($-$$)-1
db 0
Вроде всё правильно. Я загружаю дополнительно 4 сектора где находится описание шрифта. Почему 4?! Каждый символ занимает 8 байт, а всего у нас 256 символов. 256 * 8 = 2048. А если перевести в сектора, то 2048 / 512 = 4.
Далее я загружаю весь шрифт. Потом переключаю режим и вывожу символ. Всё это я компилирую. Запускаю в
QEMU:
Код:
qemu -fda boot.bin -boot a
Он выводит стандартную
A и почему то тут же ломается:
Запускаю через
Bochs. Ошибок нет, но также символ
A как и обычный. Почему не работает?
И кое что заметил. Когда я убираю вот эту строчку из загрузки шрифтов в видеопамять (знакогенератор):
Код:
mov BP,boot_font
Тогда, разумеется у меня русифицировано ничего и не будет, но тогда и
QEMU не выдаёт ошибку. В чём дело?