DataMuseum.dk

Presents historical artifacts from the history of:

Commodore CBM-900

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Commodore CBM-900

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦7944dfc87⟧ TextFile

    Length: 372 (0x174)
    Types: TextFile
    Notes: UNIX file
    Names: »ioc.c«

Derivation

└─⟦f27320a65⟧ Bits:30001972 Commodore 900 hard disk image with partial source code
    └─⟦2d53db1df⟧ UNIX V7 Filesystem
        └─ ⟦this⟧ »frankh/tmp/ioc.c« 

TextFile

#include	<stdio.h>
#include	<types.h>
#include	<sgtty.h>

main()
{
	register int ii, i, j, fd;

	printf("Begin.\n");

	if ((fd = open("/dev/rfd1", 1)) < 0)
		printf("Can't open device.\n");

	printf("File = %d\n", fd);

	j = 0x181 ;		/* Floppy format command	*/
	for ( ii = 0; ii < 10000; ii++)
		i = ioctl(fd, j, NULL);

	printf(" i = %d\n", i);

	printf("Done\n");
}