1
0
mirror of https://github.com/t-edson/P65Utils.git synced 2024-06-25 19:29:40 +00:00

Add files via upload

This commit is contained in:
Tito Hinostroza 2020-10-23 12:00:07 -05:00 committed by GitHub
parent 09fe8183f8
commit f5aa2ad82c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 0 deletions

View File

@ -427,6 +427,7 @@ begin
end; end;
procedure TCPUCore.addTopLabel(lbl: string); procedure TCPUCore.addTopLabel(lbl: string);
begin begin
if iRam>=CPUMAXRAM then exit;
ram[iRam].topLabel := lbl; ram[iRam].topLabel := lbl;
end; end;
procedure TCPUCore.addTopComm(comm: string; replace: boolean); procedure TCPUCore.addTopComm(comm: string; replace: boolean);

View File

@ -2,6 +2,8 @@
=== ===
04/09/2020: Se mueve el método FindOpcode() fuera del objeto TP6502Instruct. 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(). 22/10/2020: Se agrega protección de dirección excesiva, a TCPUCore.addTopLabel().
23/10/2020: Se crea la bandera pic.disableCodegen.
0.4 0.4
=== ===

View File

@ -196,6 +196,7 @@ type
procedure ExploreUsed(rutExplorRAM: TCPURutExplorRAM); //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 //Methods to code instructions according to syntax public //Methods to code instructions according to syntax
disableCodegen: boolean; //Flag to disable the Code generation.
procedure useRAMCode; procedure useRAMCode;
procedure codByte(const value: byte; isData: boolean); procedure codByte(const value: byte; isData: boolean);
procedure codAsm(const inst: TP6502Inst; addMode: TP6502AddMode; param: word); procedure codAsm(const inst: TP6502Inst; addMode: TP6502AddMode; param: word);
@ -293,6 +294,7 @@ procedure TP6502.codAsm(const inst: TP6502Inst; addMode: TP6502AddMode; param: w
var var
rInst: TP6502Instruct; rInst: TP6502Instruct;
begin begin
if disableCodegen then exit; //Test flag
rInst := PIC16InstName[inst]; rInst := PIC16InstName[inst];
//Overflow protection //Overflow protection
if iRam >= CPUMAXRAM then begin if iRam >= CPUMAXRAM then begin