annotate proto.h @ 4:0990d9322fc8

Implement address-ranged labels. Breaks compatibility of label files.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 25 Feb 2015 04:15:07 +0200
parents ec2f8f6f1dc9
children a2a81589380d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 /*\
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
2 * dxa v0.1.1 -- symbolic 65xx disassembler
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3 *
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
4 * Copyright (C) 1993, 1994 Marko M\"akel\"a
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
5 *
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
6 * This program is free software; you can redistribute it and/or modify
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
7 * it under the terms of the GNU General Public License as published by
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
8 * the Free Software Foundation; either version 2 of the License, or
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
9 * (at your option) any later version.
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
10 *
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
11 * This program is distributed in the hope that it will be useful,
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
14 * GNU General Public License for more details.
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
15 *
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
16 * You should have received a copy of the GNU General Public License
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
17 * along with this program; if not, write to the Free Software
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
19 *
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
20 * Contacting the author:
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
21 *
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
22 * Via Internet E-mail:
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
23 * <Marko.Makela@FTP.FUNET.FI>
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
24 *
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
25 * Via Snail Mail:
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
26 * Marko M\"akel\"a
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
27 * Sillitie 10 A
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
28 * FIN-01480 VANTAA
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
29 * Finland
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
30 \*/
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
31
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
32 #include "structures.h"
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
33
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
34 /* scan.c */
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
35
2
ec2f8f6f1dc9 Cleanup pass #1: Get rid of some ancient K&R-isms.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
36 int ScanSpecified(void); /* scan all "sure" routines */
ec2f8f6f1dc9 Cleanup pass #1: Get rid of some ancient K&R-isms.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
37 void ScanPotentials(void); /* scan the "potential" routines */
ec2f8f6f1dc9 Cleanup pass #1: Get rid of some ancient K&R-isms.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
38 void ScanTheRest(void); /* scan unprocessed memory places
0
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
39 for routines */
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
40
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
41 /* table.c */
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
42
2
ec2f8f6f1dc9 Cleanup pass #1: Get rid of some ancient K&R-isms.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
43 table *FindNextEntryType(table *entry, unsigned char andmask,
ec2f8f6f1dc9 Cleanup pass #1: Get rid of some ancient K&R-isms.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
44 unsigned char eormask);
ec2f8f6f1dc9 Cleanup pass #1: Get rid of some ancient K&R-isms.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
45 table *FindNextEntryTypeParent(table *entry, ADDR_T parent,
0
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
46 unsigned char andmask,
2
ec2f8f6f1dc9 Cleanup pass #1: Get rid of some ancient K&R-isms.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
47 unsigned char eormask);
ec2f8f6f1dc9 Cleanup pass #1: Get rid of some ancient K&R-isms.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
48 table *FindNextEntry(table *entry, ADDR_T address,
ec2f8f6f1dc9 Cleanup pass #1: Get rid of some ancient K&R-isms.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
49 unsigned char andmask, unsigned char eormask);
ec2f8f6f1dc9 Cleanup pass #1: Get rid of some ancient K&R-isms.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
50 void AddEntry(ADDR_T address, ADDR_T parent, unsigned char type);
ec2f8f6f1dc9 Cleanup pass #1: Get rid of some ancient K&R-isms.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
51 void DeleteEntry(table *entry);
0
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
52
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
53 /* label.c */
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
54
4
0990d9322fc8 Implement address-ranged labels. Breaks compatibility of label files.
Matti Hamalainen <ccr@tnsp.org>
parents: 2
diff changeset
55 int IsInsideRegion(ADDR_T address);
0990d9322fc8 Implement address-ranged labels. Breaks compatibility of label files.
Matti Hamalainen <ccr@tnsp.org>
parents: 2
diff changeset
56 void AddLabel(ADDR_T address, char *name, int is_range, ADDR_T len);
0990d9322fc8 Implement address-ranged labels. Breaks compatibility of label files.
Matti Hamalainen <ccr@tnsp.org>
parents: 2
diff changeset
57 char *Label(ADDR_T address, int admode, int allow_range);
2
ec2f8f6f1dc9 Cleanup pass #1: Get rid of some ancient K&R-isms.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
58 void Collect(void); /* garbage collection */
0
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
59
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
60 /* vector.c */
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
61
2
ec2f8f6f1dc9 Cleanup pass #1: Get rid of some ancient K&R-isms.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
62 void SearchVectors(void);
ec2f8f6f1dc9 Cleanup pass #1: Get rid of some ancient K&R-isms.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
63 ADDR_T WordTableEnd(ADDR_T Start);
0
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
64
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
65 /* dump.c */
4410c9c7750d Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
66
2
ec2f8f6f1dc9 Cleanup pass #1: Get rid of some ancient K&R-isms.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
67 void Dump(void); /* dump the program */