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;
procedure TCPUCore.addTopLabel(lbl: string);
begin
if iRam>=CPUMAXRAM then exit;
ram[iRam].topLabel := lbl;
end;
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.
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
===

View File

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