1
0
mirror of https://github.com/cc65/cc65.git synced 2024-10-01 15:54:59 +00:00

Some more test and example code.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4790 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz 2010-08-07 13:40:16 +00:00
parent d645a797cb
commit 3eed1bffbc

View File

@ -66,6 +66,7 @@ int main (int argc, char** argv)
const char* Input;
cc65_dbginfo Info;
cc65_filelist* Files;
cc65_lineinfo* L;
unsigned I;
unsigned long Addr;
@ -92,12 +93,24 @@ int main (int argc, char** argv)
}
cc65_free_filelist (Info, Files);
/* Check one line */
printf ("Requesting line info for crt0.s(59):\n");
L = cc65_lineinfo_byname (Info, "crt0.s", 59);
if (L == 0) {
printf (" Not found\n");
} else {
printf (" Code range is $%04X-$%04X\n", L->data[0].start, L->data[0].end);
cc65_free_lineinfo (Info, L);
}
/* Output debug information for all addresses in the complete 6502 address
* space. This is also sort of a benchmark for the search algorithms.
*/
printf ("Line info:\n");
for (Addr = 0; Addr < 0x10000; ++Addr) {
cc65_lineinfo* L = cc65_lineinfo_byaddr (Info, Addr);
L = cc65_lineinfo_byaddr (Info, Addr);
if (L) {
unsigned I;
printf (" $%04lX: ", Addr);