1/*****************************************************************************/
2/* */
3/* global.c */
4/* */
5/* Global variables for the ca65 macroassembler */
6/* */
7/* */
8/* */
9/* (C) 1998-2013, Ullrich von Bassewitz */
10/* Roemerstrasse 52 */
11/* D-70794 Filderstadt */
12/* EMail: uz@cc65.org */
13/* */
14/* */
15/* This software is provided 'as-is', without any expressed or implied */
16/* warranty. In no event will the authors be held liable for any damages */
17/* arising from the use of this software. */
18/* */
19/* Permission is granted to anyone to use this software for any purpose, */
20/* including commercial applications, and to alter it and redistribute it */
21/* freely, subject to the following restrictions: */
22/* */
23/* 1. The origin of this software must not be misrepresented; you must not */
24/* claim that you wrote the original software. If you use this software */
25/* in a product, an acknowledgment in the product documentation would be */
26/* appreciated but is not required. */
27/* 2. Altered source versions must be plainly marked as such, and must not */
28/* be misrepresented as being the original software. */
29/* 3. This notice may not be removed or altered from any source */
30/* distribution. */
31/* */
32/*****************************************************************************/
33
34
35
36/* common */
37#include "addrsize.h"
38
39/* ca65 */
40#include "global.h"
41
42
43
44/*****************************************************************************/
45/* Data */
46/*****************************************************************************/
47
48
49
50/* File names */
51const char* InFile = 0; /* Name of input file */
52const char* OutFile = 0; /* Name of output file */
53StrBuf ListingName = STATIC_STRBUF_INITIALIZER; /* Name of listing file */
54StrBuf DepName = STATIC_STRBUF_INITIALIZER; /* Dependency file */
55StrBuf FullDepName = STATIC_STRBUF_INITIALIZER; /* Full dependency file */
56
57/* Default extensions */
58const char ObjExt[] = ".o";/* Default object extension */
59
60char LocalStart = '@'; /* This char starts local symbols */
61
62unsigned char IgnoreCase = 0; /* Ignore case on identifiers? */
63unsigned char AutoImport = 0; /* Mark unresolveds as import */
64unsigned char SmartMode = 0; /* Smart mode */
65unsigned char DbgSyms = 0; /* Add debug symbols */
66unsigned char LineCont = 0; /* Allow line continuation */
67unsigned char LargeAlignment = 0; /* Don't warn about large alignments */
68unsigned char RelaxChecks = 0; /* Relax a few assembler checks */
69unsigned char StringEscapes = 0; /* Allow C-style escapes in strings */
70
71/* Emulation features */
72unsigned char DollarIsPC = 0; /* Allow the $ symbol as current PC */
73unsigned char NoColonLabels = 0; /* Allow labels without a colon */
74unsigned char LooseStringTerm = 0; /* Allow ' as string terminator */
75unsigned char LooseCharTerm = 0; /* Allow " for char constants */
76unsigned char AtInIdents = 0; /* Allow '@' in identifiers */
77unsigned char DollarInIdents = 0; /* Allow '$' in identifiers */
78unsigned char LeadingDotInIdents = 0; /* Allow '.' to start an identifier */
79unsigned char PCAssignment = 0; /* Allow "* = $XXX" or "$ = $XXX" */
80unsigned char MissingCharTerm = 0; /* Allow lda #'a (no closing term) */
81unsigned char UbiquitousIdents = 0; /* Allow ubiquitous identifiers */
82unsigned char OrgPerSeg = 0; /* Make .org local to current seg */
83unsigned char CComments = 0; /* Allow C like comments */
84unsigned char ForceRange = 0; /* Force values into expected range */
85unsigned char UnderlineInNumbers = 0; /* Allow underlines in numbers */
86unsigned char AddrSize = 0; /* Allow .ADDRSIZE function */
87unsigned char BracketAsIndirect = 0; /* Use '[]' not '()' for indirection */
88