|
|
DataMuseum.dkPresents historical artifacts from the history of: Commodore CBM-900 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Commodore CBM-900 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 541 (0x21d)
Types: TextFile
Notes: UNIX file
Names: »ousave.c«
└─⟦f27320a65⟧ Bits:30001972 Commodore 900 hard disk image with partial source code
└─⟦926b8033d⟧ UNIX Filesystem
└─⟦this⟧ »u/demo/slide/ousave.c«
/*
** Save an Image off the screen
*/
#include <stdio.h>
#define STARTY 100L
#define ENDY 512L
#define SEG0 ((char *) (0x3a000000L))
#define SEG1 ((char *)( 0x3b000000L))
#define XMAX 1024
#define SIZE 62000L
#define BPB 8
#define XBYTES (XMAX/BPB)
main(argc,argv)
char **argv;
{
unsigned char *sp;
unsigned char *p,*q;
unsigned short n,ct = 0;
sp = SEG0;
printf("");
if((p = malloc((unsigned short)SIZE)) == NULL) exit();
q = p;
while(ct++ < (unsigned short)SIZE) {
if((*p++ = getchar()) == EOF) break;
}
ldir(sp,q,(ct/2));
}