65816-llvm-mos/demos/gnoCat.c
Scott Duensing 9e53e5fd38 GNO Support
2026-05-29 15:43:28 -05:00

15 lines
432 B
C

// gnoCat.c — read one line from stdin (GNO console) and echo it.
#include <stdint.h>
#include <stdio.h>
int main(int argc, char **argv) {
char line[80];
printf("Type a line:\n");
if (fgets(line, sizeof(line), stdin))
printf("You typed: %s", line);
else
printf("(EOF)\n");
*(volatile uint16_t *)0x025000UL = 0xC0DE;
for (volatile unsigned long i = 0; i < 300000UL; i++) {}
return 0;
}