『第 2 楼』:
使用 LLM 解释/回答一下
//获取8X8字符集的首地址
unsigned char* GetCharacterPoint()
{
unsigned short wSeg = 0;
unsigned short wOff = 0;
asm push es
asm push bp
asm mov ax, 1130H
asm mov bh, 03H //获问8*8字库首地址
asm int 10h
asm mov ax, bp
asm pop bp //非常重要,否则程序会崩溃
asm mov wOff, ax
asm mov ax, es
asm mov wSeg, ax
asm pop es
return ((unsigned char *)(unsigned long)MK_FP(wSeg, wOff));
}
Last edited by firstsail on 2010-11-8 at 10:02 ]
```c
// Get the starting address of the 8x8 character set
unsigned char* GetCharacterPoint()
{
unsigned short wSeg = 0;
unsigned short wOff = 0;
__asm push es
__asm push bp
__asm mov ax, 1130H
__asm mov bh, 03H // Get the starting address of the 8x8 font
__asm int 10h
__asm mov ax, bp
__asm pop bp // Very important, otherwise the program will crash
__asm mov wOff, ax
__asm mov ax, es
__asm mov wSeg, ax
__asm pop es
return ((unsigned char *)(unsigned long)MK_FP(wSeg, wOff));
}
Last edited by firstsail on 2010-11-8 at 10:02 ]
```
|