From 80775aa181b7922064123d7f00f0274da5eaf9a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Schw=C3=B6rer?= Date: Thu, 11 May 2017 11:47:53 +0200 Subject: [PATCH] Indirekte addresierung --- PIC_Simulator/PIC/PICProgramm.cs | 12 ++++++++++++ Projektinformationen/Tabelle.txt | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/PIC_Simulator/PIC/PICProgramm.cs b/PIC_Simulator/PIC/PICProgramm.cs index 2ce9ce3..a741479 100644 --- a/PIC_Simulator/PIC/PICProgramm.cs +++ b/PIC_Simulator/PIC/PICProgramm.cs @@ -791,6 +791,12 @@ namespace PIC_Simulator.PIC PCCounter = (int) (high | wert) - 1; } + if (index == ADDR_INDF) // indirekte adresierung + { + if (Register[ADDR_FSR] % 0x80 != 0) SetRegister(Register[ADDR_FSR], wert); + return; + } + Register[index] = wert; } @@ -806,6 +812,12 @@ namespace PIC_Simulator.PIC if (index == ADDR_PCLATH + 0x80) index -= 0x80; if (index == ADDR_INTCON + 0x80) index -= 0x80; + if (index == ADDR_INDF) // indirekte adresierung + { + if (Register[ADDR_FSR] % 0x80 != 0) return 0; + return GetRegister(Register[ADDR_FSR]); + } + return Register[index]; } diff --git a/Projektinformationen/Tabelle.txt b/Projektinformationen/Tabelle.txt index 04372d6..e8f7fb8 100644 --- a/Projektinformationen/Tabelle.txt +++ b/Projektinformationen/Tabelle.txt @@ -1,5 +1,5 @@ -[ ] Inhaltsverz./Quellverz./Ä ußeres Ers. -[ ] Darstellung /Prog.- struktur/all.Diagr. +[ ] Inhaltsverz./Quellverz./Äußeres Ers. +[ ] Darstellung /Prog.-struktur/all.Diagr. [ ] Befehlsbeschreibung + Diagramme [X] PDF-Hilfedatei aus Prog. aufrufen [/] Bedienkomfort