Skip to content

Commit

Permalink
Fix: BASIC disassembler, PRINT preferred to ?
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgRottensteiner committed Apr 16, 2023
1 parent 19a9d91 commit 583f690
Show file tree
Hide file tree
Showing 28 changed files with 40 additions and 22 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -312,3 +312,4 @@
/Sample Projects/MacroTest/macro_ifndef.prg
/Sample Projects/MacroTest/zone.variable in outline.prg
/Sample Projects/MacroTest/renumberwithremonly.prg
/Sample Projects/MacroTest/tsbopenmacro.prg
8 changes: 7 additions & 1 deletion C64Models/Parser/BASICDialect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ static Dialect()
BASICV2.AddOpcode( "DEF", 0x96, "dE" );
BASICV2.AddOpcode( "POKE", 0x97, "pO" );
BASICV2.AddOpcode( "PRINT#", 0x98, "pR" );
BASICV2.AddOpcode( "?", 0x99 );
BASICV2.AddOpcode( "PRINT", 0x99 );
BASICV2.AddOpcode( "?", 0x99 );
BASICV2.AddOpcode( "CONT", 0x9A, "cO" );
BASICV2.AddOpcode( "LIST", 0x9B, "lI" );
BASICV2.AddOpcode( "CLR", 0x9C, "cL" );
Expand Down Expand Up @@ -157,6 +157,9 @@ public Opcode AddOpcode( string Opcode, int ByteValue )
{
OpcodesFromByte[(ushort)ByteValue] = opcode;
}
else
{
}

return opcode;
}
Expand All @@ -171,6 +174,9 @@ public Opcode AddOpcode( string Opcode, int ByteValue, string ShortCut )
{
OpcodesFromByte[(ushort)ByteValue] = opcode;
}
else
{
}

return opcode;
}
Expand Down
2 changes: 1 addition & 1 deletion C64Studio/BASIC Dialects/BASIC 65.txt
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ POKE;97;
POLYGON;fe2f;
POS;b9;
POT;ce02;
?;99;
PRINT;99;
?;99;
PRINT#;98;
RCOLOR;cd;
RCURSOR;fe42;
Expand Down
2 changes: 1 addition & 1 deletion C64Studio/BASIC Dialects/BASIC Lightning.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ POKE;97;
P.;97;
PRINT#;98;
PR.;98;
?;99;
PRINT;99;
?;99;
CONT;9A;
C.;9A;
LIST;9B;
Expand Down
2 changes: 1 addition & 1 deletion C64Studio/BASIC Dialects/BASIC V10.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ POKE;97;
POLYGON;fe2f;
POS;b9;
POT;ce02;
?;99;
PRINT;99;
?;99;
PRINT#;98;
USING;fb;
PUDEF;dd;
Expand Down
2 changes: 1 addition & 1 deletion C64Studio/BASIC Dialects/BASIC V2 - X16.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ VERIFY;95;vE
DEF;96;dE
POKE;97;pO
PRINT#;98;pR
?;99;
PRINT;99;
?;99;
CONT;9A;cO
LIST;9B;lI
CLR;9C;cL
Expand Down
2 changes: 1 addition & 1 deletion C64Studio/BASIC Dialects/BASIC V3.5.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ VERIFY;95;vE
DEF;96;dE
POKE;97;pO
PRINT#;98;pR
?;99;
PRINT;99;
?;99;
CONT;9A;cO
LIST;9B;lI
CLR;9C;cL
Expand Down
2 changes: 1 addition & 1 deletion C64Studio/BASIC Dialects/BASIC V4.5.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ VERIFY;95;vE
DEF;96;dE
POKE;97;pO
PRINT#;98;pR
?;99;
PRINT;99;
?;99;
CONT;9A;cO
LIST;9B;lI
CLR;9C;cL
Expand Down
2 changes: 1 addition & 1 deletion C64Studio/BASIC Dialects/BASIC V7.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ SAVE;94;sA
VERIFY;95;vE
DEF;96;dE
PRINT#;98;pR
?;99;
PRINT;99;
?;99;
LIST;9B;lI
CLR;9C;cL
CMD;9D;cM
Expand Down
2 changes: 1 addition & 1 deletion C64Studio/BASIC Dialects/Laser BASIC.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ POKE;97;
P.;97;
PRINT#;98;
PR.;98;
?;99;
PRINT;99;
?;99;
CONT;9A;
C.;9A;
LIST;9B;
Expand Down
2 changes: 1 addition & 1 deletion C64Studio/BASIC Dialects/Simons' BASIC.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ VERIFY;95;vE
DEF;96;dE
POKE;97;pO
PRINT#;98;pR
?;99;
PRINT;99;
?;99;
CONT;9A;cO
LIST;9B;lI
CLR;9C;cL
Expand Down
2 changes: 1 addition & 1 deletion C64Studio/BASIC Dialects/Tuned Simons' BASIC.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ VERIFY;95;vE
DEF;96;
POKE;97;poK
PRINT#;98;prI
?;99;
PRINT;99;
?;99;
CONT;9A;coN
LIST;9B;liS
CLR;9C;cL
Expand Down
6 changes: 6 additions & 0 deletions C64Studio/Documents/LabelExplorer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,12 @@ private void RefreshNodes()
treeProject.BeginUpdate();
NodeRoot.Nodes.Clear();

if ( ActiveASMFileInfo == null )
{
treeProject.EndUpdate();
return;
}

if ( !_ExpandedNodesPerProject.ContainsKey( ActiveASMFileInfo ) )
{
_ExpandedNodesPerProject.Add( ActiveASMFileInfo, new GR.Collections.Map<string, bool>() );
Expand Down
3 changes: 2 additions & 1 deletion C64Studio/Tasks/TaskCompile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,8 @@ protected bool DebugCompiledFile( DocumentInfo DocumentToDebug, DocumentInfo Doc
Core.MainForm.SetGUIForWaitOnExternalTool( true );

if ( ( toolRun.IsInternal )
|| ( Core.Executing.RunProcess.Start() ) )
|| ( ( Core.Executing.RunProcess != null )
&& ( Core.Executing.RunProcess.Start() ) ) )
{
DateTime current = DateTime.Now;
int numConnectionAttempts = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ POKE;97;
POLYGON;fe2f;
POS;b9;
POT;ce02;
?;99;
PRINT;99;
?;99;
PRINT#;98;
RCOLOR;cd;
RCURSOR;fe42;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ POKE;97;
P.;97;
PRINT#;98;
PR.;98;
?;99;
PRINT;99;
?;99;
CONT;9A;
C.;9A;
LIST;9B;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ POKE;97;
POLYGON;fe2f;
POS;b9;
POT;ce02;
?;99;
PRINT;99;
?;99;
PRINT#;98;
USING;fb;
PUDEF;dd;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ VERIFY;95;vE
DEF;96;dE
POKE;97;pO
PRINT#;98;pR
?;99;
PRINT;99;
?;99;
CONT;9A;cO
LIST;9B;lI
CLR;9C;cL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ VERIFY;95;vE
DEF;96;dE
POKE;97;pO
PRINT#;98;pR
?;99;
PRINT;99;
?;99;
CONT;9A;cO
LIST;9B;lI
CLR;9C;cL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ VERIFY;95;vE
DEF;96;dE
POKE;97;pO
PRINT#;98;pR
?;99;
PRINT;99;
?;99;
CONT;9A;cO
LIST;9B;lI
CLR;9C;cL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ SAVE;94;sA
VERIFY;95;vE
DEF;96;dE
PRINT#;98;pR
?;99;
PRINT;99;
?;99;
LIST;9B;lI
CLR;9C;cL
CMD;9D;cM
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ POKE;97;
P.;97;
PRINT#;98;
PR.;98;
?;99;
PRINT;99;
?;99;
CONT;9A;
C.;9A;
LIST;9B;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ VERIFY;95;vE
DEF;96;dE
POKE;97;pO
PRINT#;98;pR
?;99;
PRINT;99;
?;99;
CONT;9A;cO
LIST;9B;lI
CLR;9C;cL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ VERIFY;95;vE
DEF;96;
POKE;97;poK
PRINT#;98;prI
?;99;
PRINT;99;
?;99;
CONT;9A;coN
LIST;9B;liS
CLR;9C;cL
Expand Down
Binary file modified Sample Projects/MacroTest/MacroTest.c64
Binary file not shown.
Binary file modified Sample Projects/MacroTest/MacroTest.s64
Binary file not shown.
2 changes: 2 additions & 0 deletions Sample Projects/MacroTest/testopenmacro.bas
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#RetroDevStudio.MetaData.BASIC:2049,BASIC V2
10PRINT""
2 changes: 2 additions & 0 deletions Sample Projects/MacroTest/tsbopenmacro.bas
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#RetroDevStudio.MetaData.BASIC:2049,Tuned Simons' BASIC,lowercase
10PRINT""

0 comments on commit 583f690

Please sign in to comment.