/* */
/* */
/* */
-/* (C) 2000 Ullrich von Bassewitz */
-/* Wacholderweg 14 */
-/* D-70597 Stuttgart */
-/* EMail: uz@musoftware.de */
+/* (C) 2000-2003 Ullrich von Bassewitz */
+/* Römerstrasse 52 */
+/* D-70794 Filderstadt */
+/* EMail: uz@cc65.org */
/* */
/* */
/* This software is provided 'as-is', without any expressed or implied */
/*****************************************************************************/
-/* Code */
+/* Data */
/*****************************************************************************/
-void LoadCode (const char* Name, unsigned long StartAddress);
+extern unsigned char CodeBuf [0x10000]; /* Code buffer */
+extern unsigned long CodeStart; /* Start address */
+extern unsigned long CodeEnd; /* End address */
+extern unsigned long PC; /* Current PC */
+
+
+
+/*****************************************************************************/
+/* Code */
+/*****************************************************************************/
+
+
+
+void LoadCode (void);
/* Load the code from the given file */
-unsigned GetPC (void);
-/* Get the current program counter */
+unsigned char GetCodeByte (unsigned Addr);
+/* Get a byte from the given address */
-unsigned char PeekCodeByte (void);
-/* Peek at the byte at the current PC */
+unsigned GetCodeDByte (unsigned Addr);
+/* Get a dbyte from the given address */
-unsigned char GetCodeByte (void);
-/* Get a byte from the PC and increment it */
+unsigned GetCodeWord (unsigned Addr);
+/* Get a word from the given address */
-unsigned GetCodeWord (void);
-/* Get a word from the current PC and increment it */
+unsigned long GetCodeDWord (unsigned Addr);
+/* Get a dword from the given address */
unsigned GetRemainingBytes (void);
/* Return the number of remaining code bytes */
+int CodeLeft (void);
+/* Return true if there are code bytes left */
+
void ResetCode (void);
/* Reset the code input to start over for the next pass */