W
wangsea
Unregistered / Unconfirmed
GUEST, unregistred user!
一段代码如下,估计是Turbo pascal写的:
Unit BiosCrt;
interface
usesdo
s;
var BiosWriteMode : byte;
{Bios write mode to use for TFDD}
BiosTextAttr : byte;
{Bios text attribute byte}
BiosStartAttr : byte;
{Original startup attr}
LastBiosMode : byte;
{last Bios screen mode in use}
LastBiosWidth : byte;
{last Bios screen width used}
LastBiosPage : byte;
{last Bios screen page used}
.....
procedure BiosTextColor(FColor:integer);
{Set text foreground color}
inline(
$58 { pop AX}
/$24/$0f { and AL,$0F}
/$8A/$26/>BiosTextAttr { mov AH,[>BiosTextAttr]}
/$80/$E4/$F0 { and AH,$F0}
/$08/$E0 { or AL,AH}
/$A2/>BiosTextAttr);
{ mov [>BiosTextAttr],AL}
这里这个变量BiosTextAttr在inline中的引用是/$8A/$26/>BiosTextAttr
俺在TMT pascal中通不过,请教其它的写法。
Unit BiosCrt;
interface
usesdo
s;
var BiosWriteMode : byte;
{Bios write mode to use for TFDD}
BiosTextAttr : byte;
{Bios text attribute byte}
BiosStartAttr : byte;
{Original startup attr}
LastBiosMode : byte;
{last Bios screen mode in use}
LastBiosWidth : byte;
{last Bios screen width used}
LastBiosPage : byte;
{last Bios screen page used}
.....
procedure BiosTextColor(FColor:integer);
{Set text foreground color}
inline(
$58 { pop AX}
/$24/$0f { and AL,$0F}
/$8A/$26/>BiosTextAttr { mov AH,[>BiosTextAttr]}
/$80/$E4/$F0 { and AH,$F0}
/$08/$E0 { or AL,AH}
/$A2/>BiosTextAttr);
{ mov [>BiosTextAttr],AL}
这里这个变量BiosTextAttr在inline中的引用是/$8A/$26/>BiosTextAttr
俺在TMT pascal中通不过,请教其它的写法。