File: loader.inc

package info (click to toggle)
mtd 20050122-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 6,244 kB
  • ctags: 9,869
  • sloc: ansic: 97,013; asm: 1,055; sh: 558; makefile: 356; cpp: 68
file content (54 lines) | stat: -rw-r--r-- 1,477 bytes parent folder | download | duplicates (2)
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
/* If the Makefile does not provide configuration options, then set
   reasonable default values.
*/

#if defined(MOVEROM)
#undef	MOVEROM
#define MOVEROM		0x80000
#endif

/* Scratch space has to be at least 10kB; but because of the relocation
   address at 0x98000 we cannot use more then 32kB for uncompressed data
   anyways, so lets give all the rest of the segment to the scratch area.
 */

#ifndef SCRATCH
#define SCRATCH         0x8000
#endif


/* We need some unique magic ID, if we defer startup thru the INT19h
   handler. This way, we can check if we have already been installed.
 */

#ifndef MAGIC
#define MAGIC           0xE44C
#endif

/* Hook into INT19h handler
 */

#define INT19VEC	0x64
#define SCRATCHVEC	0x300

/* Offsets of words containing ROM's CS and size (in 512 byte blocks)
   from start of floppy boot block at 0x7C00
 */

#define	FLOPPY_SEGMENT	0x7C0
#define	ROM_SEGMENT	506
#define	ROM_LENGTH	508

/* Do not change these values unless you really know what you are doing;
   the pre-computed lookup tables rely on the buffer size being 4kB or
   smaller. The buffer size must be a power of two. The lookahead size has
   to fit into 6 bits. If you change any of these numbers, you will also
   have to adjust the compressor accordingly.
 */

#define BUFSZ           4096
#define LOOKAHEAD       60
#define THRESHOLD       2
#define NCHAR           (256+LOOKAHEAD-THRESHOLD)
#define TABLESZ         (NCHAR+NCHAR-1)
#define ROOT            (TABLESZ-1)