Add files via upload

This commit is contained in:
Tito Hinostroza 2022-03-03 11:21:24 -05:00 committed by GitHub
parent e3cf9218c2
commit b2ceec7441
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 125 additions and 37 deletions

View File

@ -3,7 +3,8 @@
04/09/2020: Se mueve el método FindOpcode() fuera del objeto TP6502Instruct.
22/10/2020: Se agrega protección de dirección excesiva, a TCPUCore.addTopLabel().
23/10/2020: Se crea la bandera pic.disableCodegen.
03/03/2022: Se agrega TP6502Instruct.HasOpcode() y se corrige TP6502.Decode().
03/03/2022: Se agrega TP6502Instruct.HasOpcode(), se corrige TP6502.Decode() y se
modifica el tipo optCycles en TP6502Instruct.AddAddressMode().
0.4

View File

@ -22,17 +22,16 @@
<ResourceBaseClass Value="Form"/>
<UnitName Value="Unit1"/>
<IsVisibleTab Value="True"/>
<TopLine Value="114"/>
<CursorPos X="22" Y="129"/>
<TopLine Value="141"/>
<CursorPos Y="170"/>
<UsageCount Value="75"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
</Unit1>
<Unit2>
<Filename Value="..\P6502utils.pas"/>
<EditorIndex Value="1"/>
<TopLine Value="1018"/>
<CursorPos X="20" Y="1060"/>
<TopLine Value="1394"/>
<CursorPos X="26" Y="1411"/>
<UsageCount Value="38"/>
<Bookmarks Count="1">
<Item0 Y="1208" ID="1"/>
@ -42,8 +41,8 @@
<Unit3>
<Filename Value="..\CPUCore.pas"/>
<EditorIndex Value="2"/>
<TopLine Value="121"/>
<CursorPos X="6" Y="155"/>
<TopLine Value="35"/>
<CursorPos X="14" Y="53"/>
<UsageCount Value="31"/>
<Bookmarks Count="1">
<Item0 Y="117" ID="3"/>
@ -58,7 +57,7 @@
<UsageCount Value="9"/>
</Unit4>
</Units>
<JumpHistory Count="11" HistoryIndex="10">
<JumpHistory Count="29" HistoryIndex="27">
<Position1>
<Filename Value="..\p6502utils.pas"/>
<Caret Line="1085" Column="49" TopLine="1064"/>
@ -101,10 +100,93 @@
<Filename Value="..\P6502utils.pas"/>
<Caret Line="61" Column="10" TopLine="43"/>
</Position11>
<Position12>
<Filename Value="unit1.pas"/>
<Caret Line="130" Column="25" TopLine="114"/>
</Position12>
<Position13>
<Filename Value="unit1.pas"/>
<Caret Line="123" Column="17" TopLine="104"/>
</Position13>
<Position14>
<Filename Value="unit1.pas"/>
<Caret Line="23" Column="10" TopLine="4"/>
</Position14>
<Position15>
<Filename Value="unit1.pas"/>
<Caret Line="98" Column="10" TopLine="79"/>
</Position15>
<Position16>
<Filename Value="unit1.pas"/>
<Caret Line="123" Column="16" TopLine="104"/>
</Position16>
<Position17>
<Filename Value="..\P6502utils.pas"/>
<Caret Line="236" TopLine="214"/>
</Position17>
<Position18>
<Filename Value="..\P6502utils.pas"/>
<Caret Line="237" TopLine="214"/>
</Position18>
<Position19>
<Filename Value="..\P6502utils.pas"/>
<Caret Line="238" TopLine="214"/>
</Position19>
<Position20>
<Filename Value="..\P6502utils.pas"/>
<Caret Line="239" TopLine="214"/>
</Position20>
<Position21>
<Filename Value="..\P6502utils.pas"/>
<Caret Line="240" TopLine="214"/>
</Position21>
<Position22>
<Filename Value="..\P6502utils.pas"/>
<Caret Line="247" TopLine="217"/>
</Position22>
<Position23>
<Filename Value="unit1.pas"/>
<Caret Line="170" Column="44" TopLine="140"/>
</Position23>
<Position24>
<Filename Value="..\P6502utils.pas"/>
<Caret Line="255" Column="30" TopLine="235"/>
</Position24>
<Position25>
<Filename Value="..\P6502utils.pas"/>
<Caret Line="1445" Column="24" TopLine="1440"/>
</Position25>
<Position26>
<Filename Value="unit1.pas"/>
<Caret Line="171" Column="58" TopLine="141"/>
</Position26>
<Position27>
<Filename Value="unit1.pas"/>
<Caret Line="170" Column="10" TopLine="141"/>
</Position27>
<Position28>
<Filename Value="..\P6502utils.pas"/>
<Caret Line="1411" Column="26" TopLine="1382"/>
</Position28>
<Position29>
<Filename Value="..\CPUCore.pas"/>
<Caret Line="53" Column="14" TopLine="35"/>
</Position29>
</JumpHistory>
<RunParams>
<FormatVersion Value="2"/>
<Modes Count="0" ActiveMode="default"/>
</RunParams>
</ProjectSession>
<Debugging>
<BreakPoints Count="1">
<Item1>
<Kind Value="bpkSource"/>
<WatchScope Value="wpsLocal"/>
<WatchKind Value="wpkWrite"/>
<Source Value="..\P6502utils.pas"/>
<Line Value="1408"/>
</Item1>
</BreakPoints>
</Debugging>
</CONFIG>

View File

@ -1,55 +1,61 @@
object Form1: TForm1
Left = 265
Height = 368
Height = 460
Top = 159
Width = 530
Width = 662
Caption = 'Form1'
ClientHeight = 368
ClientWidth = 530
ClientHeight = 460
ClientWidth = 662
DesignTimePPI = 120
OnCreate = FormCreate
OnDestroy = FormDestroy
LCLVersion = '2.0.4.0'
LCLVersion = '2.0.12.0'
object Memo1: TMemo
Left = 10
Height = 312
Top = 40
Width = 190
Left = 12
Height = 390
Top = 50
Width = 238
Lines.Strings = (
'LDA'
'STA $10'
)
ParentFont = False
TabOrder = 0
end
object Button1: TButton
Left = 216
Height = 25
Top = 40
Width = 88
Left = 270
Height = 31
Top = 50
Width = 110
Caption = 'Assemble>>'
OnClick = Button1Click
ParentFont = False
TabOrder = 1
end
object Memo2: TMemo
Left = 320
Height = 312
Top = 40
Width = 190
Left = 400
Height = 390
Top = 50
Width = 238
ParentFont = False
TabOrder = 2
end
object Label1: TLabel
Left = 10
Height = 15
Top = 10
Width = 31
Left = 12
Height = 20
Top = 12
Width = 39
Caption = 'CODE'
ParentColor = False
ParentFont = False
end
object Label2: TLabel
Left = 328
Height = 15
Top = 10
Width = 46
Left = 410
Height = 20
Top = 12
Width = 58
Caption = 'HEX FILE'
ParentColor = False
ParentFont = False
end
end

View File

@ -120,8 +120,7 @@ begin
exit;
end;
//Find mnemonic, and parameters
idInst := pic.FindOpcode(Inst);
if idInst = i_Inval then begin
if not FindOpcode(Inst, idInst) then begin
Application.MessageBox(PChar('Invalid Opcode: '+ Inst),'');
exit;
end;
@ -169,7 +168,7 @@ begin
end;
end;
pic.GenHex(Application.ExeName + '.hex');
Memo2.Lines.LoadFromFile(Application.ExeName + '.hex');
Memo2.Lines.LoadFromFile(Application.ExeName + '.hex'); //*** This is binary. Show nothing.
end;
procedure TForm1.FormCreate(Sender: TObject);