/* */
/* */
/* */
-/* (C) 2001-2002 Ullrich von Bassewitz */
-/* Wacholderweg 14 */
-/* D-70597 Stuttgart */
+/* (C) 2001-2003 Ullrich von Bassewitz */
+/* Römerstrasse 52 */
+/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* */
/* */
C->RegY = UNKNOWN_REGVAL;
C->SRegLo = UNKNOWN_REGVAL;
C->SRegHi = UNKNOWN_REGVAL;
+ C->Ptr1Lo = UNKNOWN_REGVAL;
+ C->Ptr1Hi = UNKNOWN_REGVAL;
C->Tmp1 = UNKNOWN_REGVAL;
}
{
C->SRegLo = UNKNOWN_REGVAL;
C->SRegHi = UNKNOWN_REGVAL;
+ C->Ptr1Lo = UNKNOWN_REGVAL;
+ C->Ptr1Hi = UNKNOWN_REGVAL;
C->Tmp1 = UNKNOWN_REGVAL;
}
+static void RC_Dump1 (FILE* F, const char* Desc, short Val)
+/* Dump one register value */
+{
+ if (RegValIsKnown (Val)) {
+ fprintf (F, "%s=$%02X ", Desc, Val);
+ } else {
+ fprintf (F, "%s=$XX ", Desc);
+ }
+}
+
+
+
+void RC_Dump (FILE* F, const RegContents* RC)
+/* Dump the contents of the given RegContents struct */
+{
+ RC_Dump1 (F, "A", RC->RegA);
+ RC_Dump1 (F, "X", RC->RegX);
+ RC_Dump1 (F, "Y", RC->RegY);
+ RC_Dump1 (F, "SREG", RC->SRegLo);
+ RC_Dump1 (F, "SREG+1", RC->SRegHi);
+ RC_Dump1 (F, "PTR1", RC->Ptr1Lo);
+ RC_Dump1 (F, "PTR1+1", RC->Ptr1Hi);
+ RC_Dump1 (F, "TMP1", RC->Tmp1);
+ fprintf (F, "\n");
+}
+
+
+
RegInfo* NewRegInfo (const RegContents* RC)
/* Allocate a new register info, initialize and return it. If RC is not
* a NULL pointer, it is used to initialize both, the input and output
+void DumpRegInfo (const char* Desc, const RegInfo* RI)
+/* Dump the register info for debugging */
+{
+ fprintf (stdout, "%s:\n", Desc);
+ fprintf (stdout, "In: ");
+ RC_Dump (stdout, &RI->In);
+ fprintf (stdout, "Out: ");
+ RC_Dump (stdout, &RI->Out);
+}
+
+