1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-25 17:29:50 +00:00
cc65/samples/sym1/symTiny.c

43 lines
785 B
C
Raw Normal View History

// --------------------------------------------------------------------------
// Hello World for Sym-1
//
// Uses only getchar, putchar and puts, generating smaller code than printf
//
// Wayne Parham
//
// wayne@parhamdata.com
// --------------------------------------------------------------------------
2021-06-07 16:50:47 +00:00
#include <stdio.h>
#include <sym1.h>
2021-06-16 21:47:38 +00:00
int main (void) {
char c = 0x00;
int d = 0x00;
int l = 0x00;
2021-06-16 21:47:38 +00:00
puts ("Hello World!\n");
2021-06-16 21:47:38 +00:00
puts ("Type a line and press ENTER, please:\n");
for ( l = 0; l < 2; l++ ) {
beep();
for ( d = 0; d < 10 ; d++ ) {
}
}
while ( c != '\n' ) {
c = getchar();
}
2021-06-16 21:47:38 +00:00
puts ("\n\nThanks!\n");
for ( l = 0; l < 5; l++ ) {
beep();
for ( d = 0; d < 10 ; d++ ) {
}
}
return 0;
}