主题:文本方式下显示汉字的源程序
'$INCLUDE: 'qb.bi'
CLS
DIM SHARED ax AS INTEGER, bx AS INTEGER, cx AS INTEGER, dx AS INTEGER, es AS INTEGER, bp AS INTEGER
DIM test%(64)
es = VARSEG(test%(32)) '获得缓冲区的段址
DEF SEG = es
FOR i = 1 TO 96
READ t
POKE i, t
NEXT i
DEF SEG
bp = 1
ax = &H1100
bx = &H1000
cx = 6
dx = &HCC
int10
FOR i = 0 TO 5
PRINT CHR$(&HCC + i);
NEXT i
END
DATA 0 , 32 , 19 , 16 , 0 , 7 , 240 , 16 , 17 , 16 , 23 , 16 , 20 , 24 , 16 , 3
DATA 32 , 40 , 252 , 32 , 32 , 254 , 146 , 84 , 16 , 148 , 254 , 32 , 32 , 80 , 140 , 4
DATA 2 , 1 , 63 , 32 , 64 , 31 , 0 , 0 , 1 , 255 , 1 , 1 , 1 , 1 , 5 , 2
DATA 0 , 0 , 252 , 4 , 8 , 224 , 64 , 128 , 4 , 254 , 0 , 0 , 0 , 0 , 0 , 0
DATA 16 , 16 , 35 , 34 , 74 , 251 , 18 , 34 , 67 , 246 , 74 , 3 , 26 , 226 , 66 , 2
DATA 128 , 72 , 252 , 8 , 8 , 248 , 0 , 4 , 254 , 148 , 148 , 252 , 148 , 148 , 148 , 12
SUB int10
DIM InRegs AS RegTypeX
DIM OutRegs AS RegTypeX
InRegs.ax = ax
InRegs.bx = bx
InRegs.cx = cx
InRegs.dx = dx
InRegs.es = es
InRegs.bp = bp
INTERRUPTX &H10, InRegs, OutRegs
ax = OutRegs.ax
bx = OutRegs.bx
cx = OutRegs.cx
dx = OutRegs.dx
es = OutRegs.es
bp = OutRegs.bp
END SUB
CLS
DIM SHARED ax AS INTEGER, bx AS INTEGER, cx AS INTEGER, dx AS INTEGER, es AS INTEGER, bp AS INTEGER
DIM test%(64)
es = VARSEG(test%(32)) '获得缓冲区的段址
DEF SEG = es
FOR i = 1 TO 96
READ t
POKE i, t
NEXT i
DEF SEG
bp = 1
ax = &H1100
bx = &H1000
cx = 6
dx = &HCC
int10
FOR i = 0 TO 5
PRINT CHR$(&HCC + i);
NEXT i
END
DATA 0 , 32 , 19 , 16 , 0 , 7 , 240 , 16 , 17 , 16 , 23 , 16 , 20 , 24 , 16 , 3
DATA 32 , 40 , 252 , 32 , 32 , 254 , 146 , 84 , 16 , 148 , 254 , 32 , 32 , 80 , 140 , 4
DATA 2 , 1 , 63 , 32 , 64 , 31 , 0 , 0 , 1 , 255 , 1 , 1 , 1 , 1 , 5 , 2
DATA 0 , 0 , 252 , 4 , 8 , 224 , 64 , 128 , 4 , 254 , 0 , 0 , 0 , 0 , 0 , 0
DATA 16 , 16 , 35 , 34 , 74 , 251 , 18 , 34 , 67 , 246 , 74 , 3 , 26 , 226 , 66 , 2
DATA 128 , 72 , 252 , 8 , 8 , 248 , 0 , 4 , 254 , 148 , 148 , 252 , 148 , 148 , 148 , 12
SUB int10
DIM InRegs AS RegTypeX
DIM OutRegs AS RegTypeX
InRegs.ax = ax
InRegs.bx = bx
InRegs.cx = cx
InRegs.dx = dx
InRegs.es = es
InRegs.bp = bp
INTERRUPTX &H10, InRegs, OutRegs
ax = OutRegs.ax
bx = OutRegs.bx
cx = OutRegs.cx
dx = OutRegs.dx
es = OutRegs.es
bp = OutRegs.bp
END SUB