From 88085bc91c6543bb6afcb5f22db0f13cbeb9f5d9 Mon Sep 17 00:00:00 2001 From: Tito Hinostroza Date: Sat, 13 Aug 2022 21:44:13 -0500 Subject: [PATCH] Add files via upload --- CPUCore.pas | 7 +- Cambios.txt | 2 - MiniAssembler/project1.lpi | 6 +- MiniAssembler/project1.lps | 136 +++++++++++-------------------------- MiniAssembler/project1.res | Bin 1779 -> 1825 bytes MiniAssembler/unit1.lfm | 6 +- P6502utils.pas | 2 +- 7 files changed, 50 insertions(+), 109 deletions(-) diff --git a/CPUCore.pas b/CPUCore.pas index 79d718c..a43a197 100644 --- a/CPUCore.pas +++ b/CPUCore.pas @@ -7,7 +7,7 @@ unit CPUCore; {$mode objfpc}{$H+} interface uses - Classes, SysUtils, LCLProc; + Classes, SysUtils; type //Union to access bytes of a word TWordRec = record @@ -87,7 +87,7 @@ type public //General fields Model : string; //modelo de PIC frequen : integer; //frecuencia del reloj - MaxFreq : integer; //máxima frecuencia del reloj + MaxFreq : integer; //Máxima frecuencia del reloj en Hz. //Propiedades que definen la arquitectura del CPU. MsjError: string; public //Execution control @@ -467,7 +467,8 @@ constructor TCPUCore.Create; begin dataAddr1 := -1; //Disable hexLines := TStringList.Create; - frequen := 1000000; //4MHz + MaxFreq := 10000000; //10MHz. + frequen := 1000000; // 1MHz. end; destructor TCPUCore.Destroy; begin diff --git a/Cambios.txt b/Cambios.txt index dc29ee1..6a9c2bc 100644 --- a/Cambios.txt +++ b/Cambios.txt @@ -3,8 +3,6 @@ 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(), se corrige TP6502.Decode() y se -modifica el tipo optCycles en TP6502Instruct.AddAddressMode(). 0.4 diff --git a/MiniAssembler/project1.lpi b/MiniAssembler/project1.lpi index 11c0dcf..bbe6027 100644 --- a/MiniAssembler/project1.lpi +++ b/MiniAssembler/project1.lpi @@ -1,11 +1,13 @@ - + + + + - <ResourceType Value="res"/> <UseXPManifest Value="True"/> diff --git a/MiniAssembler/project1.lps b/MiniAssembler/project1.lps index cb90bdb..9c77bf6 100644 --- a/MiniAssembler/project1.lps +++ b/MiniAssembler/project1.lps @@ -2,7 +2,7 @@ <CONFIG> <ProjectSession> <PathDelim Value="\"/> - <Version Value="11"/> + <Version Value="12"/> <BuildModes Active="Default"/> <Units Count="5"> <Unit0> @@ -22,32 +22,31 @@ <ResourceBaseClass Value="Form"/> <UnitName Value="Unit1"/> <IsVisibleTab Value="True"/> - <TopLine Value="141"/> - <CursorPos Y="170"/> + <TopLine Value="142"/> + <CursorPos X="14" Y="170"/> <UsageCount Value="75"/> <Loaded Value="True"/> + <LoadedDesigner Value="True"/> </Unit1> <Unit2> <Filename Value="..\P6502utils.pas"/> - <EditorIndex Value="1"/> - <TopLine Value="1394"/> - <CursorPos X="26" Y="1411"/> + <EditorIndex Value="-1"/> + <TopLine Value="1399"/> + <CursorPos X="19" Y="1419"/> <UsageCount Value="38"/> <Bookmarks Count="1"> <Item0 Y="1208" ID="1"/> </Bookmarks> - <Loaded Value="True"/> </Unit2> <Unit3> <Filename Value="..\CPUCore.pas"/> - <EditorIndex Value="2"/> + <EditorIndex Value="-1"/> <TopLine Value="35"/> <CursorPos X="14" Y="53"/> <UsageCount Value="31"/> <Bookmarks Count="1"> <Item0 Y="117" ID="3"/> </Bookmarks> - <Loaded Value="True"/> </Unit3> <Unit4> <Filename Value="C:\lazarus\lcl\include\control.inc"/> @@ -57,136 +56,79 @@ <UsageCount Value="9"/> </Unit4> </Units> - <JumpHistory Count="29" HistoryIndex="27"> + <JumpHistory Count="17" HistoryIndex="16"> <Position1> - <Filename Value="..\p6502utils.pas"/> - <Caret Line="1085" Column="49" TopLine="1064"/> + <Filename Value="unit1.pas"/> + <Caret Line="130" Column="25" TopLine="114"/> </Position1> <Position2> - <Filename Value="..\p6502utils.pas"/> + <Filename Value="unit1.pas"/> + <Caret Line="123" Column="17" TopLine="104"/> </Position2> <Position3> - <Filename Value="..\p6502utils.pas"/> - <Caret Line="370" Column="8" TopLine="354"/> + <Filename Value="unit1.pas"/> + <Caret Line="23" Column="10" TopLine="4"/> </Position3> <Position4> - <Filename Value="..\p6502utils.pas"/> - <Caret Line="369" Column="28" TopLine="354"/> + <Filename Value="unit1.pas"/> + <Caret Line="98" Column="10" TopLine="79"/> </Position4> <Position5> - <Filename Value="..\p6502utils.pas"/> - <Caret Line="1148" TopLine="1141"/> + <Filename Value="unit1.pas"/> + <Caret Line="123" Column="16" TopLine="104"/> </Position5> <Position6> - <Filename Value="..\p6502utils.pas"/> - <Caret Line="207" Column="33" TopLine="180"/> + <Filename Value="unit1.pas"/> + <Caret Line="170" Column="44" TopLine="140"/> </Position6> <Position7> - <Filename Value="..\p6502utils.pas"/> + <Filename Value="unit1.pas"/> + <Caret Line="171" Column="58" TopLine="141"/> </Position7> <Position8> - <Filename Value="..\p6502utils.pas"/> - <Caret Line="1077" Column="62" TopLine="957"/> + <Filename Value="unit1.pas"/> + <Caret Line="170" Column="10" TopLine="141"/> </Position8> <Position9> - <Filename Value="..\p6502utils.pas"/> - <Caret Line="1446" Column="12" TopLine="1155"/> + <Filename Value="unit1.pas"/> + <Caret Line="157" Column="38" TopLine="150"/> </Position9> <Position10> - <Filename Value="..\P6502utils.pas"/> - <Caret Line="1590" Column="22" TopLine="1571"/> + <Filename Value="unit1.pas"/> + <Caret Line="76" TopLine="59"/> </Position10> <Position11> - <Filename Value="..\P6502utils.pas"/> - <Caret Line="61" Column="10" TopLine="43"/> + <Filename Value="unit1.pas"/> + <Caret Line="80" TopLine="59"/> </Position11> <Position12> <Filename Value="unit1.pas"/> - <Caret Line="130" Column="25" TopLine="114"/> + <Caret Line="81" TopLine="59"/> </Position12> <Position13> <Filename Value="unit1.pas"/> - <Caret Line="123" Column="17" TopLine="104"/> + <Caret Line="82" TopLine="59"/> </Position13> <Position14> <Filename Value="unit1.pas"/> - <Caret Line="23" Column="10" TopLine="4"/> + <Caret Line="64" TopLine="64"/> </Position14> <Position15> <Filename Value="unit1.pas"/> - <Caret Line="98" Column="10" TopLine="79"/> + <Caret Line="76" TopLine="64"/> </Position15> <Position16> <Filename Value="unit1.pas"/> - <Caret Line="123" Column="16" TopLine="104"/> + <Caret Line="76" TopLine="64"/> </Position16> <Position17> - <Filename Value="..\P6502utils.pas"/> - <Caret Line="236" TopLine="214"/> + <Filename Value="unit1.pas"/> + <Caret Line="73" Column="7" TopLine="59"/> </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"/> + <Modes 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> diff --git a/MiniAssembler/project1.res b/MiniAssembler/project1.res index 0ad004b9d97928b9d3a42fa745f31fc0da4dfdb5..631a2cc1cb6087996c140ff6cf34669a29cb9801 100644 GIT binary patch delta 53 ycmey&yO3{!0^`GtiqqIs6l`+x^U?znOEMhG6N^&q(h_ruQ*HE71ShX$a{~Yqa}&w{ delta 16 YcmZ3;_nCKs0^{b5iqqI8KV`E405+}$JOBUy diff --git a/MiniAssembler/unit1.lfm b/MiniAssembler/unit1.lfm index 9d5bcc2..891de24 100644 --- a/MiniAssembler/unit1.lfm +++ b/MiniAssembler/unit1.lfm @@ -9,14 +9,14 @@ object Form1: TForm1 DesignTimePPI = 120 OnCreate = FormCreate OnDestroy = FormDestroy - LCLVersion = '2.0.12.0' + LCLVersion = '2.2.0.4' object Memo1: TMemo Left = 12 Height = 390 Top = 50 Width = 238 Lines.Strings = ( - 'LDA' + 'LDA $12' 'STA $10' ) ParentFont = False @@ -46,7 +46,6 @@ object Form1: TForm1 Top = 12 Width = 39 Caption = 'CODE' - ParentColor = False ParentFont = False end object Label2: TLabel @@ -55,7 +54,6 @@ object Form1: TForm1 Top = 12 Width = 58 Caption = 'HEX FILE' - ParentColor = False ParentFont = False end end diff --git a/P6502utils.pas b/P6502utils.pas index bb73cdc..96b958e 100644 --- a/P6502utils.pas +++ b/P6502utils.pas @@ -16,7 +16,7 @@ unit P6502utils; {$mode objfpc}{$H+} interface uses - Classes, SysUtils, LCLProc, CPUCore, strutils; + Classes, SysUtils, CPUCore, strutils; type //Instructions set TP6502Inst = ( i_ADC, //add with carry