2000-09-24 15:55:57 +00:00
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/* */
|
|
|
|
|
/* global.c */
|
|
|
|
|
/* */
|
|
|
|
|
/* Global variables for the da65 disassembler */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* */
|
2005-02-17 17:37:17 +00:00
|
|
|
|
/* (C) 2000-2005 Ullrich von Bassewitz */
|
2003-08-08 11:12:04 +00:00
|
|
|
|
/* R<>merstrasse 52 */
|
|
|
|
|
/* D-70794 Filderstadt */
|
|
|
|
|
/* EMail: uz@cc65.org */
|
2000-09-24 15:55:57 +00:00
|
|
|
|
/* */
|
|
|
|
|
/* */
|
|
|
|
|
/* This software is provided 'as-is', without any expressed or implied */
|
|
|
|
|
/* warranty. In no event will the authors be held liable for any damages */
|
|
|
|
|
/* arising from the use of this software. */
|
|
|
|
|
/* */
|
|
|
|
|
/* Permission is granted to anyone to use this software for any purpose, */
|
|
|
|
|
/* including commercial applications, and to alter it and redistribute it */
|
|
|
|
|
/* freely, subject to the following restrictions: */
|
|
|
|
|
/* */
|
|
|
|
|
/* 1. The origin of this software must not be misrepresented; you must not */
|
|
|
|
|
/* claim that you wrote the original software. If you use this software */
|
|
|
|
|
/* in a product, an acknowledgment in the product documentation would be */
|
|
|
|
|
/* appreciated but is not required. */
|
|
|
|
|
/* 2. Altered source versions must be plainly marked as such, and must not */
|
|
|
|
|
/* be misrepresented as being the original software. */
|
|
|
|
|
/* 3. This notice may not be removed or altered from any source */
|
|
|
|
|
/* distribution. */
|
|
|
|
|
/* */
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "global.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/* Data */
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* File names */
|
|
|
|
|
const char* InFile = 0; /* Name of input file */
|
|
|
|
|
const char* OutFile = 0; /* Name of output file */
|
|
|
|
|
|
|
|
|
|
/* Default extensions */
|
2000-09-24 19:06:59 +00:00
|
|
|
|
const char OutExt[] = ".dis"; /* Output file extension */
|
|
|
|
|
const char CfgExt[] = ".cfg"; /* Config file extension */
|
2000-09-24 15:55:57 +00:00
|
|
|
|
|
|
|
|
|
/* Flags and other command line stuff */
|
2003-08-08 11:12:04 +00:00
|
|
|
|
unsigned char DebugInfo = 0; /* Add debug info to the object file */
|
2003-08-23 16:03:58 +00:00
|
|
|
|
unsigned char FormFeeds = 0; /* Add form feeds to the output? */
|
2003-09-11 20:19:09 +00:00
|
|
|
|
unsigned char UseHexOffs = 0; /* Use hexadecimal label offsets */
|
2003-08-23 16:03:58 +00:00
|
|
|
|
unsigned char PassCount = 2; /* How many passed do we do? */
|
|
|
|
|
long StartAddr = -1L; /* Start/load address of the program */
|
|
|
|
|
long InputOffs = -1L; /* Offset into input file */
|
|
|
|
|
long InputSize = -1L; /* Number of bytes to read from input */
|
2000-09-26 07:08:38 +00:00
|
|
|
|
|
2000-09-24 15:55:57 +00:00
|
|
|
|
/* Stuff needed by many routines */
|
2003-08-23 16:03:58 +00:00
|
|
|
|
unsigned Pass = 0; /* Disassembler pass */
|
2005-02-17 17:37:17 +00:00
|
|
|
|
char Now[128]; /* Current time as string */
|
2000-09-24 15:55:57 +00:00
|
|
|
|
|
2003-08-23 09:20:33 +00:00
|
|
|
|
/* Comments */
|
2003-08-23 16:03:58 +00:00
|
|
|
|
unsigned Comments = 0; /* Add which comments to the output? */
|
2003-08-23 09:20:33 +00:00
|
|
|
|
|
2000-09-24 15:55:57 +00:00
|
|
|
|
/* Page formatting */
|
2001-09-15 13:36:59 +00:00
|
|
|
|
unsigned PageLength = 0; /* Length of a listing page */
|
2000-09-24 15:55:57 +00:00
|
|
|
|
unsigned MIndent = 9; /* Mnemonic indent */
|
|
|
|
|
unsigned AIndent = 17; /* Argument indent */
|
2000-09-24 20:54:49 +00:00
|
|
|
|
unsigned CIndent = 49; /* Comment indent */
|
2000-09-26 07:08:38 +00:00
|
|
|
|
unsigned TIndent = 81; /* Text bytes indent */
|
2000-09-24 20:54:49 +00:00
|
|
|
|
unsigned BytesPerLine = 8; /* Max. number of data bytes per line */
|
2000-09-24 15:55:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|