📄 awemu.pas
字号:
end;
'T' :
begin
{Scroll down}
Cmd := eSD;
Y := emuParamInt[1];
end;
'U' :
begin
{Next page}
Cmd := eNP;
Y := emuParamInt[1];
end;
'V' :
begin
{Preceding page}
Cmd := ePP;
Y := emuParamInt[1];
end;
'W' :
begin
{Cursor tabulation control}
Cmd := eCTC;
X := emuParamInt[1];
end;
'X' :
begin
{Erase character}
Cmd := eECH;
X := emuParamInt[1];
end;
'Y' :
begin
{Cursor vertical tabulation}
Cmd := eCVT;
Y := emuParamInt[1];
end;
'Z' :
begin
{Cursor backward tabulation}
Cmd := eCBT;
X := emuParamInt[1];
end;
'b' :
begin
{Repeat}
Cmd := eREP;
X := emuParamInt[1];
end;
'c' :
begin
{Device attributes}
Cmd := eDA;
X := emuParamInt[1];
end;
'd' :
begin
{Vertical position absolute}
Cmd := eVPA;
Y := emuParamInt[1];
end;
'e' :
begin
{Vertical position relative}
Cmd := eVPR;
Y := emuParamInt[1];
end;
'f' :
begin
{Horizontal and vertical position}
Cmd := eHVP;{eGotoXY, eCUP}
X := emuParamInt[2];
Y := emuParamInt[1];
end;
'g' :
begin
{Tabulation clear}
Cmd := eTBC;
X := emuParamInt[1];
end;
'h' :
begin
{Set Mode}
Cmd := eSM; {eSetMode}
X := emuParamInt[1];
end;
'i' :
begin
{Media Copy}
Cmd := eMC;
X := emuParamInt[1];
end;
'l' :
begin
{Reset mode}
Cmd := eRM;
X := emuParamInt[1];
end;
'm' :
begin
{Select graphics rendition}
Cmd := eSGR;
for I := 1 to emuParamIndex do begin
{Process the color command}
case emuParamInt[I] of
0 :
begin
FColor := emWhite;
BColor := emBlack;
emuAttr := 0;
ExtAttr := 0;
end;
1 : SetByteFlag(emuAttr, eattrIntense);
4 : SetByteFlag(emuAttr, eattrUnderline);
5 : SetByteFlag(emuAttr, eattrBlink);
7 : SetByteFlag(emuAttr, eattrInverse);
8 : SetByteFlag(emuAttr, eattrInvisible);
22 : ClearByteFlag(emuAttr, eattrIntense);
24 : ClearByteFlag(emuAttr, eattrUnderline);
25 : ClearByteFlag(emuAttr, eattrBlink);
27 : ClearByteFlag(emuAttr, eattrInverse);
28 : ClearByteFlag(emuAttr, eattrInvisible);
30 : FColor := emBlack; {Black foreground}
31 : FColor := emRed; {Red foreground}
32 : FColor := emGreen; {Green foreground}
33 : FColor := emYellow; {Yellow forground}
34 : FColor := emBlue; {Blue foreground}
35 : FColor := emMagenta; {Magenta foreground}
36 : FColor := emCyan; {Cyan foreground}
37 : FColor := emWhite; {White foreground}
39 : FColor := aweDefForeGround;{Default foreground}
40 : BColor := emBlack; {Black background}
41 : BColor := emRed; {Red background}
42 : BColor := emGreen; {Green background}
43 : BColor := emYellow; {Yellow background}
44 : BColor := emBlue; {Blue background}
45 : BColor := emMagenta; {Magenta background}
46 : BColor := emCyan; {Cyan background}
47 : BColor := emWhite; {White background}
49 : BColor := aweDefBackGround;{Default background}
end;
end;
if ByteFlagIsSet(emuAttr, eattrIntense) and (FColor<8) then
FColor := FColor+8;
ExtAttr := emuAttr;
end;
'n' :
begin
{Device Status Report}
Cmd := eDSR;
X := emuParamInt[1];
end;
'o' :
begin
{Define area qualification}
Cmd := eDAQ;
X := emuParamInt[1];
end;
's' : Cmd := eSaveCursorPos;
'u' : Cmd := eRestoreCursorPos;
'@' :
begin
{Insert character}
Cmd := eICH;
X := emuParamInt[1];
end;
end;
end;
end;
procedure ProcessVT100Emulation(P : PAnsiEmulator; var Command: TEmuCommandLo);
var
I : Byte;
begin
with P^, Command do begin
case Ch of
'A' :
begin
{Cursor up}
Cmd := eCUU; {eUp}
Y := emuParamInt[1];
end;
'B' :
begin
{Cursor down}
Cmd := eCUD; {eDown}
Y := emuParamInt[1];
end;
'C' :
begin
{Cursor right}
Cmd := eCUF; {eRight}
X := emuParamInt[1];
end;
'D' :
begin
{Cursor left}
cmd := eCUB; {eLeft}
X := emuParamInt[1];
end;
'H' :
begin
{cursor position}
Cmd := eCUP;{eGotoXY, eHVP}
X := emuParamInt[2];
Y := emuParamInt[1];
end;
'I' :
begin
X := 0;
case emuParamInt[1] of
2 : Cmd := eKAM; {Keyboard action mode}
3 : Cmd := eCRM; {control representation mode}
4 : Cmd := eIRM; {Inseration-Replacement mode}
20 : Cmd := eLNM; {Line feed / new line mode}
end;
end;
'J' :
begin
{Erase in display}
X := emuParamInt[1];
Y := 1;
Cmd := eED;
end;
'K' :
begin
{Erase in line}
X := emuParamInt[1];
Y := 0;
Cmd := eEL;
end;
'L' :
begin
{Insert line}
Cmd := eIL;
Y := emuParamInt[1];
end;
'M' :
begin
{Delete line}
Cmd := eDL;
Y := emuParamInt[1];
end;
'R' :
begin
{Cursor position report}
Cmd := eCPR;
X := emuParamInt[2];
Y := emuParamInt[1];
end;
'c' :
begin
{Device attributes}
case emuParamInt[1] of
0 :
begin
Cmd := eDA;
X := 0;
Y := 1;
end;
end;
end;
'f' :
begin
{Horizontal-Vertical position}
Cmd := eHVP;{eGotoXY, eCUP}
X := emuParamInt[2];
Y := emuParamInt[1];
end;
'h' :
begin
X := 1;
case emuParamInt[1] of
2 : Cmd := eKAM; {Keyboard action mode}
3 : Cmd := eCRM; {control representation mode}
4 : Cmd := eIRM; {Insertation-replacement mode}
20 : Cmd := eLNM; {Line feed / New line mode}
end;
end;
'i' :
begin
{Media copy}
Cmd := eMC;
X := emuParamInt[1];
end;
'm' :
begin
{Select graphics rendition}
Cmd := eSGR;
emuAttr := 0;
for I := 1 to emuParamIndex do begin
{Process the color command}
case emuParamInt[I] of
0 :
begin
FColor := emWhite;
BColor := emBlack;
emuAttr := 0;
ExtAttr := 0;
end;
1 : SetByteFlag(emuAttr, eattrIntense);
4 : SetByteFlag(emuAttr, eattrUnderline);
5 : SetByteFlag(emuAttr, eattrBlink);
7 : SetByteFlag(emuAttr, eattrInverse);
8 : SetByteFlag(emuAttr, eattrInvisible);
22 : ClearByteFlag(emuAttr, eattrIntense);
24 : ClearByteFlag(emuAttr, eattrUnderline);
25 : ClearByteFlag(emuAttr, eattrBlink);
27 : ClearByteFlag(emuAttr, eattrInverse);
28 : ClearByteFlag(emuAttr, eattrInvisible);
30 : FColor := emBlack; {Black foreground}
31 : FColor := emRed; {Red foreground}
32 : FColor := emGreen; {Green foreground}
33 : FColor := emYellow; {Yellow forground}
34 : FColor := emBlue; {Blue foreground}
35 : FColor := emMagenta; {Magenta foreground}
36 : FColor := emCyan; {Cyan foreground}
37 : FColor := emWhite; {White foreground}
39 : FColor := aweDefForeGround;{Default foreground}
40 : BColor := emBlack; {Black background}
41 : BColor := emRed; {Red background}
42 : BColor := emGreen; {Green background}
43 : BColor := emYellow; {Yellow background}
44 : BColor := emBlue; {Blue background}
45 : BColor := emMagenta; {Magenta background}
46 : BColor := emCyan; {Cyan background}
47 : BColor := emWhite; {White background}
49 : BColor := aweDefBackGround;{Default background}
end;
end;
if ByteFlagIsSet(emuAttr, eattrIntense) and (FColor<8) then
FColor := FColor+8;
ExtAttr := emuAttr;
end;
'n' :
begin
{Device status report}
Cmd := eDSR;
X := emuParamInt[1];
end;
'q' :
begin
{LEDs -- not supported}
Cmd := eNone;
end;
'r' :
begin
{Dec private/set top/bottom margins}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -