Runge-Kutta-Simulation/AppleX/GRAPHICS/BLOAD.C

35 lines
922 B
C
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* ------------------------------------------------------------------------
System : Manx Aztec C65 Version 3.2b
MS-DOS cross-development environment
Platform : Apple IIe 128K PRODOS 8
Program : bload.c
Description : G2 Library Routine
For Hi-Res Mode
Written by : Bill Buckels
Creation Date: June 6, 1991
Revised : January 2013
Licence : You may use this code for whatever you wish as long
as you agree that Bill Buckels has no warranty or
liability obligations whatsoever from said use.
------------------------------------------------------------------------ */
#include <fcntl.h>
extern unsigned HB[];
int bload(name)
char *name;
{
int fh, c=-1;
if ((fh = open(name,O_RDONLY,0xc3))!=-1) {
c = read(fh,(char *)HB[0],0x2000);
close(fh);
if (c > 8183 && c < 8193) c = 0;
else c = -2;
}
return c;
}