aicasm.h revision 23934
1160814Ssimon/*
2160814Ssimon * Assembler for the sequencer program downloaded to Aic7xxx SCSI host adapters
3160814Ssimon *
4160814Ssimon * Copyright (c) 1997 Justin T. Gibbs.
5160814Ssimon * All rights reserved.
6160814Ssimon *
7160814Ssimon * Redistribution and use in source and binary forms, with or without
8160814Ssimon * modification, are permitted provided that the following conditions
9160814Ssimon * are met:
10160814Ssimon * 1. Redistributions of source code must retain the above copyright
11160814Ssimon *    notice immediately at the beginning of the file, without modification,
12160814Ssimon *    this list of conditions, and the following disclaimer.
13296341Sdelphij * 2. Redistributions in binary form must reproduce the above copyright
14160814Ssimon *    notice, this list of conditions and the following disclaimer in the
15160814Ssimon *    documentation and/or other materials provided with the distribution.
16160814Ssimon * 3. The name of the author may not be used to endorse or promote products
17160814Ssimon *    derived from this software without specific prior written permission.
18160814Ssimon *
19160814Ssimon * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
20160814Ssimon * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21160814Ssimon * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22160814Ssimon * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
23160814Ssimon * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24160814Ssimon * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25160814Ssimon * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26160814Ssimon * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27160814Ssimon * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28160814Ssimon * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29160814Ssimon * SUCH DAMAGE.
30160814Ssimon *
31160814Ssimon *      $Id: aic7xxx_asm.h,v 1.1.2.1 1997/03/16 07:21:32 gibbs Exp $
32160814Ssimon */
33160814Ssimon
34160814Ssimon#include <sys/queue.h>
35160814Ssimon
36160814Ssimon#ifndef TRUE
37160814Ssimon#define TRUE 1
38160814Ssimon#endif
39160814Ssimon
40160814Ssimon#ifndef FALSE
41160814Ssimon#define FALSE 0
42160814Ssimon#endif
43160814Ssimon
44160814Ssimontypedef struct path_entry {
45160814Ssimon	char	*directory;
46160814Ssimon	int	quoted_includes_only;
47160814Ssimon	SLIST_ENTRY(path_entry) links;
48160814Ssimon} *path_entry_t;
49160814Ssimon
50160814Ssimontypedef enum {
51160814Ssimon	QUOTED_INCLUDE,
52160814Ssimon	BRACKETED_INCLUDE,
53160814Ssimon	SOURCE_FILE
54160814Ssimon} include_type;
55160814Ssimon
56160814SsimonSLIST_HEAD(path_list, path_entry);
57160814Ssimon
58160814Ssimonextern struct path_list search_path;
59160814Ssimonextern struct symlist patch_options;
60160814Ssimonextern int includes_search_curdir;		/* False if we've seen -I- */
61160814Ssimonextern char *appname;
62296341Sdelphijextern int yylineno;
63296341Sdelphijextern char *yyfilename;
64296341Sdelphij
65296341Sdelphijvoid stop __P((const char *errstring, int err_code));
66296341Sdelphijvoid include_file __P((char *file_name, include_type type));
67194206Ssimonstruct instruction *seq_alloc __P((void));
68194206Ssimonstruct patch *patch_alloc __P((void));
69160814Ssimon