Comments (1)
Currently preferring AzTec's C compiler:
- Fewer files.
- Seems to work under emulation.
- Have built working code with it.
We'll see if it's as good on real hardware, and then choose.
Links:
- https://hackaday.io/project/173479-my-cpm-version-1a/log/181039-adding-a-native-c-compiler
- https://www.aztecmuseum.ca/compilers.htm#cpm
Sample code:
/* WRITE.c - Steve Kemp 2021
*
* Write some text to the specified file, arguments are space-separated,
* with a trailing newline.
*
* Usage:
*
* WRITE TEST.TXT This is a test
*
* Compilation:
*
* CC WRITE
* AS WRITE
* LN WRITE.O T.LIB C.LIB
*
*/
#include <stdio.h>
FILE *fp=NULL;
FILE *fp2=NULL;
#define TRUE 1
#define FALSE 0
main(argc, argv)
int argc;
char *argv[];
{
int i = 0;
FILE *fp=NULL;
/* need at least prog + file + one argument */
if ( argc < 3 ) {
printf("Usage: %s path.ext text to write ..\n");
exit(1);
}
/* open output file */
fp = fopen( argv[1] );
if ( fp == NULL ) {
printf("Failed to open file for writing.\n");
exit(1);
}
/* write each argument out */
for( i = 2; i < argc; i++ ){
fprintf(fp, "%s%s", argv[i], (i+1 < argc) ? " " : "\n" );
}
/* All done */
fclose(fp);
exit(0);
}
from z80-playground-cpm-fat.
Related Issues (11)
- SRCH built-in doesn't really work so well
- Implement CLS as a built-in
- Add paging to `type` HOT 1
- Ctrl-c should reboot
- Alternative CCP - CCPZ HOT 2
- Future plan comment re: optimisation with xor HOT 1
- Your Domain would appear closed, where is hware info? HOT 1
- Remove second copy of wordstar
- Drop `F:STAT.COM`
- Turbo pascal works, but is incomplete
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from z80-playground-cpm-fat.