Skip to content

Commit f2fcd66

Browse files
committed
修正汉化
1 parent 1b1d5d1 commit f2fcd66

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

05_day/bootpack.c

+21-21
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ void init_screen(char *vram, int x, int y);
2828

2929
void HariMain(void)
3030
{
31-
char *vram;
31+
char *vram;/* 声明变量vram、用于BYTE [...]地址 */
3232
int xsize, ysize;
3333
short *binfo_scrnx, *binfo_scrny;
3434
int *binfo_vram;
@@ -51,42 +51,42 @@ void HariMain(void)
5151
void init_palette(void)
5252
{
5353
static unsigned char table_rgb[16 * 3] = {
54-
0x00, 0x00, 0x00, /* 0:�� */
55-
0xff, 0x00, 0x00, /* 1:���邢�� */
56-
0x00, 0xff, 0x00, /* 2:���邢�� */
57-
0xff, 0xff, 0x00, /* 3:���邢���F */
58-
0x00, 0x00, 0xff, /* 4:���邢�� */
59-
0xff, 0x00, 0xff, /* 5:���邢�� */
60-
0x00, 0xff, 0xff, /* 6:���邢���F */
61-
0xff, 0xff, 0xff, /* 7:�� */
62-
0xc6, 0xc6, 0xc6, /* 8:���邢�D�F */
63-
0x84, 0x00, 0x00, /* 9:���� */
64-
0x00, 0x84, 0x00, /* 10:���� */
65-
0x84, 0x84, 0x00, /* 11:�����F */
66-
0x00, 0x00, 0x84, /* 12:���� */
67-
0x84, 0x00, 0x84, /* 13:���� */
68-
0x00, 0x84, 0x84, /* 14:�����F */
69-
0x84, 0x84, 0x84 /* 15:���D�F */
54+
0x00, 0x00, 0x00, /* 0: */
55+
0xff, 0x00, 0x00, /* 1:梁红 */
56+
0x00, 0xff, 0x00, /* 2:亮绿 */
57+
0xff, 0xff, 0x00, /* 3:亮黄 */
58+
0x00, 0x00, 0xff, /* 4:亮蓝 */
59+
0xff, 0x00, 0xff, /* 5:亮紫 */
60+
0x00, 0xff, 0xff, /* 6:浅亮蓝 */
61+
0xff, 0xff, 0xff, /* 7: */
62+
0xc6, 0xc6, 0xc6, /* 8:亮灰 */
63+
0x84, 0x00, 0x00, /* 9:暗红 */
64+
0x00, 0x84, 0x00, /* 10:暗绿 */
65+
0x84, 0x84, 0x00, /* 11:暗黄 */
66+
0x00, 0x00, 0x84, /* 12:暗青 */
67+
0x84, 0x00, 0x84, /* 13:暗紫 */
68+
0x00, 0x84, 0x84, /* 14:浅暗蓝 */
69+
0x84, 0x84, 0x84 /* 15:暗灰 */
7070
};
7171
set_palette(0, 15, table_rgb);
7272
return;
7373

74-
/* static char ���߂́A�f�[�^�ɂ����g���Ȃ�����DB���ߑ��� */
74+
/* C语言中的static char语句只能用于数据,相当于汇编中的DB指令 */
7575
}
7676

7777
void set_palette(int start, int end, unsigned char *rgb)
7878
{
7979
int i, eflags;
80-
eflags = io_load_eflags(); /* ���荞�݋��ƒt���O�̒l���L�^���� */
81-
io_cli(); /* ���ƒt���O��0�ɂ��Ċ��荞�݋֎~�ɂ��� */
80+
eflags = io_load_eflags(); /* 记录中断许可标志的值 */
81+
io_cli(); /* 将中断许可标志置为0,禁止中断 */
8282
io_out8(0x03c8, start);
8383
for (i = start; i <= end; i++) {
8484
io_out8(0x03c9, rgb[0] / 4);
8585
io_out8(0x03c9, rgb[1] / 4);
8686
io_out8(0x03c9, rgb[2] / 4);
8787
rgb += 3;
8888
}
89-
io_store_eflags(eflags); /* ���荞�݋��ƒt���O�����ɖ߂� */
89+
io_store_eflags(eflags); /* 复原中断许可标志 */
9090
return;
9191
}
9292

0 commit comments

Comments
 (0)