acsim_toolbox_c
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
acsim_toolbox_c [2006/08/01 20:27] – created v.0.0.5 audiocommander | acsim_toolbox_c [2007/11/17 16:48] (current) – move acsim.zip to "acsim" namespace smashtv | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | This page is part of the [[mios_c_simulator_-_debugger]] | + | This page is part of the [[mios_c_simulator_-_debugger]] |
[[acsim_console_h|ACSim_console.h]]\\ | [[acsim_console_h|ACSim_console.h]]\\ | ||
[[acsim_console_c|ACSim_console.c]]\\ | [[acsim_console_c|ACSim_console.c]]\\ | ||
- | |||
- | **[[acsim_toolbox_c|ACSim_toolbox.c]]**\\ | ||
[[acsim_mios_h|ACSim_mios.h]]\\ | [[acsim_mios_h|ACSim_mios.h]]\\ | ||
[[acsim_mios_c|ACSim_mios.c]]\\ | [[acsim_mios_c|ACSim_mios.c]]\\ | ||
+ | [[acsim_toolbox_h|ACSim_toolbox.h]]\\ | ||
+ | **[[acsim_toolbox_c|ACSim_toolbox.c]]**\\ | ||
+ | [[acmididefines|ACMidiDefines.h]]\\ | ||
+ | \\ | ||
+ | This code is for viewing only and may not be up to date. You can download the files in a zip file {{acsim: | ||
+ | \\ | ||
\\ | \\ | ||
<code c> | <code c> | ||
Line 35: | Line 39: | ||
- | #import < | ||
+ | #import " | ||
- | #ifndef _ACSIM_TOOLBOX_C | + | #import " |
- | #define _ACSIM_TOOLBOX_C | + | |
- | #pragma mark random numbers | ||
// generate some random numbers | // generate some random numbers | ||
unsigned char ACRandomBool(void) { return (random() % 2); } | unsigned char ACRandomBool(void) { return (random() % 2); } | ||
Line 55: | Line 57: | ||
- | #pragma mark HEXVIEW | ||
// hexview output | // hexview output | ||
- | #define HEXVIEW_COLUMNS 68 | + | // maybe configure defines in header! |
- | #define HEXVIEW_CHARS ((HEXVIEW_COLUMNS-1)/4) | + | |
void hexview(unsigned char *buf, int size) { | void hexview(unsigned char *buf, int size) { | ||
Line 68: | Line 68: | ||
int i; | int i; | ||
unsigned char c; | unsigned char c; | ||
+ | unsigned char r = 0; | ||
while (size>0) { | while (size>0) { | ||
+ | printf(" | ||
for (i=0; | for (i=0; | ||
if (size-i> | if (size-i> | ||
Line 85: | Line 87: | ||
size-=HEXVIEW_CHARS; | size-=HEXVIEW_CHARS; | ||
printf(" | printf(" | ||
+ | r++; | ||
} | } | ||
} | } | ||
- | #endif /* _ACSIM_TOOLBOX_C */ | ||
</ | </ |
acsim_toolbox_c.1154464070.txt.gz · Last modified: 2006/10/15 09:35 (external edit)