Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
tebe6502 committed Oct 12, 2020
1 parent 13d90a7 commit bc01ebd
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 21 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
@@ -1,3 +1,6 @@
12.10.2020
- poprawione ReadDataArray, akceptuje pojedy�cze znaki jako string dla tablic jedno i dwuwymiarowych

22.09.2020
- kr�tsze nazwy prze�acznikow -zpage (-z), -stack (-s), -data (-d), -code (-c), -define (-def), -ipath (-i), -diag
- naprawione dzia�anie tablic dwuwymiarowych typu const
Expand Down
Binary file modified mp.exe
Binary file not shown.
41 changes: 20 additions & 21 deletions mp.pas
Expand Up @@ -122,7 +122,7 @@

const

title = '1.6.4';
title = '1.6.5';

TAB = ^I; // Char for a TAB
CR = ^M; // Char for a CR
Expand Down Expand Up @@ -36894,6 +36894,24 @@ procedure SaveDataSegment(DataType: Byte);
procedure SaveData;
begin

i := CompileConstExpression(i + 1, ConstVal, ActualParamType, ConstValType);

if (ConstValType = STRINGPOINTERTOK) and (ActualParamType = CHARTOK) then begin // rejestrujemy CHAR jako STRING

if StaticData then
Error(i, 'Memory overlap due conversion CHAR to STRING, use VAR instead CONST');

ch := Tok[i].Value;
DefineStaticString(i, chr(ch));

ConstVal:=Tok[i].StrAddress - CODEORIGIN + CODEORIGIN_Atari;
Tok[i].Value := ch;

ActualParamType := STRINGPOINTERTOK;

end;


if (ConstValType in StringTypes + [CHARTOK, STRINGPOINTERTOK]) and (ActualParamType in IntegerTypes + RealTypes) then
iError(i, IllegalExpression);

Expand Down Expand Up @@ -36962,8 +36980,6 @@ procedure SaveData;
inc(NumActualParams_);
if NumActualParams_ > NumAllocElements_ then Break;

i := CompileConstExpression(i + 1, ConstVal, ActualParamType, ConstValType);

SaveData;

inc(i);
Expand All @@ -36972,25 +36988,8 @@ procedure SaveData;
CheckTok(i, CPARTOK);

//inc(i);
end else begin
i := CompileConstExpression(i + 1, ConstVal, ActualParamType, ConstValType);

if (ConstValType = STRINGPOINTERTOK) and (ActualParamType = CHARTOK) then begin // rejestrujemy CHAR jako STRING

if StaticData then
Error(i, 'Memory overlap due conversion CHAR to STRING, use VAR instead CONST');

ch := Tok[i].Value;
DefineStaticString(i, chr(ch));

ConstVal:=Tok[i].StrAddress - CODEORIGIN + CODEORIGIN_Atari;
Tok[i].Value := ch;

ActualParamType := STRINGPOINTERTOK;
end;

end else
SaveData;
end;

inc(i);

Expand Down

0 comments on commit bc01ebd

Please sign in to comment.