Added dword tables, char comments etc.

git-svn-id: svn://svn.cc65.org/cc65/trunk@340 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2000-09-26 07:08:38 +00:00
parent 806461993b
commit ee084ac224
12 changed files with 200 additions and 114 deletions

View File

@@ -89,7 +89,7 @@ void LoadCode (const char* Name, unsigned long StartAddress)
Error ("Error reading from `%s': %s", Name, strerror (errno));
}
if (Count == 0) {
Error ("File `%s' contains no data", Name);
Error ("File `%s' contains no data", Name);
}
/* Set the buffer variables */
@@ -118,18 +118,36 @@ unsigned GetCodeWord (unsigned Addr)
unsigned long GetCodeDWord (unsigned Addr)
/* Get a dword from the given address */
{
unsigned long Lo = GetCodeWord (Addr);
unsigned long Hi = GetCodeWord (Addr+2);
return Lo | (Hi << 16);
}
unsigned GetRemainingBytes (void)
/* Return the number of remaining code bytes */
{
if (CodeEnd >= PC) {
return (CodeEnd - PC + 1);
return (CodeEnd - PC + 1);
} else {
return 0;
return 0;
}
}
int CodeLeft (void)
/* Return true if there are code bytes left */
{
return (PC <= CodeEnd);
}
void ResetCode (void)
/* Reset the code input to start over for the next pass */
{