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,29 @@
|
||||
/* Earth or Mars -- one key chooses the greeting on a 40-column CoCo 3. */
|
||||
#include <cmoc.h>
|
||||
#include <coco.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
byte choice;
|
||||
|
||||
width(40);
|
||||
printf("What planet do you live on?\n1) Earth\n2) Mars\n");
|
||||
do
|
||||
{
|
||||
choice = inkey(); /* No Enter needed. Ignore other keys. */
|
||||
} while (choice != '1' && choice != '2');
|
||||
|
||||
attr(3, 6, FALSE, FALSE); /* White text on background slot 6. */
|
||||
if (choice == '1')
|
||||
{
|
||||
palette(6, 10); /* Blue */
|
||||
printf("Hello Nice Blue Dot World!\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
palette(6, 37); /* Red */
|
||||
printf("Hello Cold Red Dot World!\n");
|
||||
}
|
||||
attr(0, 0, FALSE, FALSE); /* Back to BASIC's usual colors. */
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user