home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turbo Toolbox
/
Turbo_Toolbox.iso
/
1990
/
01
/
tricks
/
b_l_save.inc
< prev
next >
Wrap
Text File
|
1989-10-10
|
1KB
|
33 lines
/* ------------------------------------------------------ */
/* B_L-SAVE.INC */
/* - bload bildet den BASIC Befehl BLOAD nach */
/* - bsave bildet den BASIC Befehl BSAVE nach */
/* beide Befehle setzen einen CGA Modus voraus, mit dem */
/* Programm B_L-DEMO.C wird die Anwendung demonstriert. */
/* (c) 1989 Kurt Windolf & TOOLBOX */
/* ------------------------------------------------------ */
void bload(char *name)
{
int i = 0;
FILE *stream;
stream = fopen(name,"r");
rewind(stream);
while(!feof(stream))
poke(0xb800, i++, fgetc(stream));
fclose(stream);
}
void bsave(char *name)
{
int j;
FILE *stream;
stream = fopen(name,"w");
rewind(stream);
for (j=0; j < 0x4000; j++)
fprintf(stream,"%c",peek(0xb800, j));
fclose(stream);
}
/* ------------------------------------------------------ */
/* Ende von B_L-SAVE.INC */