Add files via upload

This commit is contained in:
Tito Hinostroza 2018-08-09 22:07:26 -05:00 committed by GitHub
parent 8b36a3178c
commit a67d56e7ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -85,7 +85,7 @@ type //Models for RAM memory
TCPURam = array of TCPURamCell;
TCPURamPtr = ^TCPURam;
TCPURutExplorRAM = procedure(offs, bnk: byte; regPtr: TCPURamCellPtr) of object;
TCPURutExplorRAM = procedure(offs: word; regPtr: TCPURamCellPtr) of object;
type

View File

@ -16,7 +16,7 @@ unit P6502utils;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LCLProc, PicCore;
Classes, SysUtils, LCLProc, CPUCore;
type //Instructions set
TP6502Inst = (
i_ADC, //add with carry
@ -141,7 +141,7 @@ const //Constants of address and bit positions for some registers
type
{Objeto que representa al hardware de un PIC de la serie 16}
{ TP6502 }
TP6502 = class(TPicCore)
TP6502 = class(TCPUCore)
public //Campos para desensamblar instrucciones
idIns: TP6502Inst; //ID de Instrucción.
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 TotalMemRAM: word; //devuelve el total de memoria RAM
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
public //Métodos para codificar instrucciones de acuerdo a la sintaxis
procedure useRAM;
@ -1126,14 +1126,14 @@ begin
end;
end;
end;
procedure TP6502.ExploreUsed(rutExplorRAM: TPICRutExplorRAM);
procedure TP6502.ExploreUsed(rutExplorRAM: TCPURutExplorRAM);
{Genera un reporte de uso de RAM}
var
i: Integer;
begin
for i := 0 to CPUMAXRAM - 1 do begin
if ram[i].AvailGPR and (ram[i].used) then begin
rutExplorRAM(i, 0, @ram[i]);
rutExplorRAM(i, @ram[i]);
end;
end;
end;