summaryrefslogtreecommitdiff
path: root/sysspec.h
blob: 8d49640cde31205b86ceebeb79fa1eea89824515 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/*
** sysspec.h
** Header file for sysspec.c
** BYTEmark (tm)
** BYTE's Native Mode Benchmarks
** Rick Grehan, BYTE Magazine
**
** Creation:
** Revision: 3/95
**
** DISCLAIMER
** The source, executable, and documentation files that comprise
** the BYTEmark benchmarks are made available on an "as is" basis.
** This means that we at BYTE Magazine have made every reasonable
** effort to verify that the there are no errors in the source and
** executable code.  We cannot, however, guarantee that the programs
** are error-free.  Consequently, McGraw-HIll and BYTE Magazine make
** no claims in regard to the fitness of the source code, executable
** code, and documentation of the BYTEmark.
**  Furthermore, BYTE Magazine, McGraw-Hill, and all employees
** of McGraw-Hill cannot be held responsible for any damages resulting
** from the use of this code or the results obtained from using
** this code.
*/

/*
** Standard includes
*/
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <string.h>

#include "nmglobal.h"

#if !defined(MAC) && !defined(OSX)
#include <malloc.h>
#endif


/*
** System-specific includes
*/

/**************
** EXTERNALS **
**************/
extern unsigned long mem_array[2][MEM_ARRAY_SIZE];
extern int mem_array_ents;
extern int global_align;

/****************************
**   FUNCTION PROTOTYPES   **
****************************/

void InitMemArray(void);

int AddMemArray(unsigned long true_addr, unsigned long adj_addr);

int RemoveMemArray(unsigned long adj_addr,unsigned long *true_addr);

void CreateFile(char *filename,
                int *errorcode);

FILE *bmOpenFile(char *fname,
                int *errorcode);

void CloseFile(FILE *fhandle,
                int *errorcode);

void readfile(FILE *fhandle,
                unsigned long offset,
                unsigned long nbytes,
                void *buffer,
                int *errorcode);

void writefile(FILE *fhandle,
                unsigned long offset,
                unsigned long nbytes,
                void *buffer,
                int *errorcode);

unsigned long StartStopwatch();

unsigned long StopStopwatch(unsigned long startticks);

unsigned long TicksToSecs(unsigned long tickamount);

double TicksToFracSecs(unsigned long tickamount);