mirror of
https://github.com/t-edson/P65Utils.git
synced 2024-09-27 11:56:21 +00:00
Add files via upload
This commit is contained in:
parent
8b36a3178c
commit
a67d56e7ff
@ -85,7 +85,7 @@ type //Models for RAM memory
|
|||||||
|
|
||||||
TCPURam = array of TCPURamCell;
|
TCPURam = array of TCPURamCell;
|
||||||
TCPURamPtr = ^TCPURam;
|
TCPURamPtr = ^TCPURam;
|
||||||
TCPURutExplorRAM = procedure(offs, bnk: byte; regPtr: TCPURamCellPtr) of object;
|
TCPURutExplorRAM = procedure(offs: word; regPtr: TCPURamCellPtr) of object;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ unit P6502utils;
|
|||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
interface
|
interface
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, LCLProc, PicCore;
|
Classes, SysUtils, LCLProc, CPUCore;
|
||||||
type //Instructions set
|
type //Instructions set
|
||||||
TP6502Inst = (
|
TP6502Inst = (
|
||||||
i_ADC, //add with carry
|
i_ADC, //add with carry
|
||||||
@ -141,7 +141,7 @@ const //Constants of address and bit positions for some registers
|
|||||||
type
|
type
|
||||||
{Objeto que representa al hardware de un PIC de la serie 16}
|
{Objeto que representa al hardware de un PIC de la serie 16}
|
||||||
{ TP6502 }
|
{ TP6502 }
|
||||||
TP6502 = class(TPicCore)
|
TP6502 = class(TCPUCore)
|
||||||
public //Campos para desensamblar instrucciones
|
public //Campos para desensamblar instrucciones
|
||||||
idIns: TP6502Inst; //ID de Instrucción.
|
idIns: TP6502Inst; //ID de Instrucción.
|
||||||
modIns: TP6502AddMode; //Modo de direccionamiento
|
modIns: TP6502AddMode; //Modo de direccionamiento
|
||||||
@ -198,7 +198,7 @@ type
|
|||||||
function GetFreeBytes(const size: integer; var addr: word): boolean; //obtiene una dirección libre
|
function GetFreeBytes(const size: integer; var addr: word): boolean; //obtiene una dirección libre
|
||||||
function TotalMemRAM: word; //devuelve el total de memoria RAM
|
function TotalMemRAM: word; //devuelve el total de memoria RAM
|
||||||
function UsedMemRAM: word; //devuelve el total de memoria RAM usada
|
function UsedMemRAM: word; //devuelve el total de memoria RAM usada
|
||||||
procedure ExploreUsed(rutExplorRAM: TPICRutExplorRAM); //devuelve un reporte del uso de la RAM
|
procedure ExploreUsed(rutExplorRAM: TCPURutExplorRAM); //devuelve un reporte del uso de la RAM
|
||||||
function ValidRAMaddr(addr: word): boolean; //indica si una posición de memoria es válida
|
function ValidRAMaddr(addr: word): boolean; //indica si una posición de memoria es válida
|
||||||
public //Métodos para codificar instrucciones de acuerdo a la sintaxis
|
public //Métodos para codificar instrucciones de acuerdo a la sintaxis
|
||||||
procedure useRAM;
|
procedure useRAM;
|
||||||
@ -1126,14 +1126,14 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
procedure TP6502.ExploreUsed(rutExplorRAM: TPICRutExplorRAM);
|
procedure TP6502.ExploreUsed(rutExplorRAM: TCPURutExplorRAM);
|
||||||
{Genera un reporte de uso de RAM}
|
{Genera un reporte de uso de RAM}
|
||||||
var
|
var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
for i := 0 to CPUMAXRAM - 1 do begin
|
for i := 0 to CPUMAXRAM - 1 do begin
|
||||||
if ram[i].AvailGPR and (ram[i].used) then begin
|
if ram[i].AvailGPR and (ram[i].used) then begin
|
||||||
rutExplorRAM(i, 0, @ram[i]);
|
rutExplorRAM(i, @ram[i]);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user