Publish VCC Plus OSS source distribution for 3.6.2 build 60
This commit is contained in:
commit
c652a5276d
1192 files changed
+272368
No files matched your search
@@ -0,0 +1,46 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Print actual int results so the host can check them independently of CMOC.
|
||||
#include <cmoc.h>
|
||||
|
||||
static unsigned char ready = 1;
|
||||
static unsigned word;
|
||||
|
||||
static int getReady(void)
|
||||
{
|
||||
return ready;
|
||||
}
|
||||
|
||||
static int failure(void)
|
||||
{
|
||||
return !getReady();
|
||||
}
|
||||
|
||||
static unsigned getWord(void)
|
||||
{
|
||||
return word;
|
||||
}
|
||||
|
||||
static int wordIsZero(void)
|
||||
{
|
||||
return !getWord();
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
printf("NOT %d", failure());
|
||||
ready = 0;
|
||||
printf("%d", failure());
|
||||
ready = 255;
|
||||
printf("%d ", failure());
|
||||
|
||||
// Exercise zero, only B set, only A set, and both halves set.
|
||||
word = 0;
|
||||
printf("%d", wordIsZero());
|
||||
word = 0x0080;
|
||||
printf("%d", wordIsZero());
|
||||
word = 0x8000;
|
||||
printf("%d", wordIsZero());
|
||||
word = 0xFFFF;
|
||||
printf("%d END\n", wordIsZero());
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user