First round of requested code changes

This commit is contained in:
Wayne Parham
2021-06-06 23:20:54 +01:00
parent ae9434e02e
commit 69e2313a63
18 changed files with 96 additions and 84 deletions

42
targettest/sym1/symTiny.c Normal file
View File

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