+ added the instruction opcode information strings to the compiler instruction table

git-svn-id: branches/z80@44755 -
This commit is contained in:
nickysn 2020-04-17 22:57:18 +00:00
parent c4950d1723
commit 53de231c23
3 changed files with 240 additions and 205 deletions

View File

@ -83,6 +83,41 @@ type
destructor Destroy;override;
end;
function PasEncode(const S: string): string;
var
Ch: Char;
InQuotes: Boolean;
begin
Result:='';
InQuotes:=False;
for Ch in S do
if (Ch>=#32) and (Ch<=#126) then
begin
if not InQuotes then
begin
Result:=Result+'''';
InQuotes:=True;
end;
if Ch='''' then
Result:=Result+''''''
else
Result:=Result+Ch;
end
else
begin
if InQuotes then
begin
Result:=Result+'''';
InQuotes:=False;
end;
Result:=Result+'#'+IntToStr(Ord(Ch));
end;
if InQuotes then
Result:=Result+'''';
if Result='' then
Result:='''''';
end;
constructor TZ80InsDatOutputFiles.Create;
begin
AssignFile(OpFile,'z80op.inc');
@ -176,7 +211,7 @@ begin
Write(OutputFiles.InsTabFile,'OT_NONE');
end;
Writeln(OutputFiles.InsTabFile, ');');
Writeln(OutputFiles.InsTabFile, ' code : '''';');
Writeln(OutputFiles.InsTabFile, ' code : ',PasEncode(S_Split[1]),';');
Writeln(OutputFiles.InsTabFile, ' flags : 0');
Write(OutputFiles.InsTabFile, ' )');
end;

View File

@ -39,7 +39,7 @@ uses
O_MOV_DEST = 0;
instabentries = {$i z80nop.inc}
maxinfolen = 5;
maxinfolen = 18;
type
{ Operand types }

File diff suppressed because it is too large Load Diff