Remove the driver before exiting
git-svn-id: svn://svn.cc65.org/cc65/trunk@3655 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
47944aac55
commit
245fc0b43f
1 changed files with 10 additions and 1 deletions
|
@ -16,6 +16,14 @@ static unsigned buf[BUF_SIZE];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static void cleanup (void)
|
||||||
|
/* Remove the driver on exit */
|
||||||
|
{
|
||||||
|
em_unload ();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void fill (register unsigned* page, register unsigned char count, register unsigned num)
|
static void fill (register unsigned* page, register unsigned char count, register unsigned num)
|
||||||
{
|
{
|
||||||
register unsigned char i;
|
register unsigned char i;
|
||||||
|
@ -58,6 +66,7 @@ int main (void)
|
||||||
cprintf ("os: %u, %s\r\n", _oserror, _stroserror (_oserror));
|
cprintf ("os: %u, %s\r\n", _oserror, _stroserror (_oserror));
|
||||||
exit (EXIT_FAILURE);
|
exit (EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
atexit (cleanup);
|
||||||
|
|
||||||
/* Get the number of available pages */
|
/* Get the number of available pages */
|
||||||
PageCount = em_pagecount ();
|
PageCount = em_pagecount ();
|
||||||
|
@ -100,7 +109,7 @@ int main (void)
|
||||||
cputhex16 (I);
|
cputhex16 (I);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TEST #1: em_copyfrom/em_copyto. */
|
/* TEST #2: em_copyfrom/em_copyto. */
|
||||||
cputs ("\r\nTesting em_copyfrom/em_copyto");
|
cputs ("\r\nTesting em_copyfrom/em_copyto");
|
||||||
|
|
||||||
/* We're filling now 384 bytes per run to test the copy routines with
|
/* We're filling now 384 bytes per run to test the copy routines with
|
||||||
|
|
Loading…
Add table
Reference in a new issue