mirror of
https://github.com/cc65/cc65.git
synced 2025-01-26 17:36:57 +00:00
Added two new global options, NewlineAfterJMP and NewlineAfterRTS.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4963 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
ae8f3d1f37
commit
7c1cd6c8d8
@ -365,6 +365,16 @@ following attributes are recognized:
|
||||
<tt><ref id="option--mnemonic-column" name="--mnemonic-column"></tt>.
|
||||
|
||||
|
||||
<tag><tt/NEWLINEAFTERJMP/</tag>
|
||||
This attribute is followed by a boolean value. When true, a newline is
|
||||
inserted after each <tt/JMP/ instruction. The default is false.
|
||||
|
||||
|
||||
<tag><tt/NEWLINEAFTERRTS/</tag>
|
||||
This attribute is followed by a boolean value. When true, a newline is
|
||||
inserted after each <tt/RTS/ instruction. The default is false.
|
||||
|
||||
|
||||
<label id="OUTPUTNAME">
|
||||
<tag><tt/OUTPUTNAME/</tag>
|
||||
The attribute is followed by string value, which gives the name of the
|
||||
|
@ -56,6 +56,8 @@ unsigned char DebugInfo = 0; /* Add debug info to the object file */
|
||||
unsigned char FormFeeds = 0; /* Add form feeds to the output? */
|
||||
unsigned char UseHexOffs = 0; /* Use hexadecimal label offsets */
|
||||
unsigned char PassCount = 2; /* How many passed do we do? */
|
||||
signed char NewlineAfterJMP = -1; /* Add a newline after a JMP insn? */
|
||||
signed char NewlineAfterRTS = -1; /* Add a newline after a RTS insn? */
|
||||
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 */
|
||||
|
@ -6,10 +6,10 @@
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* (C) 2000-2006 Ullrich von Bassewitz */
|
||||
/* Römerstrasse 52 */
|
||||
/* D-70794 Filderstadt */
|
||||
/* EMail: uz@cc65.org */
|
||||
/* (C) 2000-2011, Ullrich von Bassewitz */
|
||||
/* Roemerstrasse 52 */
|
||||
/* D-70794 Filderstadt */
|
||||
/* EMail: uz@cc65.org */
|
||||
/* */
|
||||
/* */
|
||||
/* This software is provided 'as-is', without any expressed or implied */
|
||||
@ -57,6 +57,8 @@ extern unsigned char DebugInfo; /* Add debug info to the object file */
|
||||
extern unsigned char FormFeeds; /* Add form feeds to the output? */
|
||||
extern unsigned char UseHexOffs; /* Use hexadecimal label offsets */
|
||||
extern unsigned char PassCount; /* How many passed do we do? */
|
||||
extern signed char NewlineAfterJMP;/* Add a newline after a JMP insn? */
|
||||
extern signed char NewlineAfterRTS;/* Add a newline after a RTS insn? */
|
||||
extern long StartAddr; /* Start/load address of the program */
|
||||
extern long InputOffs; /* Offset into input file */
|
||||
extern long InputSize; /* Number of bytes to read from input */
|
||||
|
@ -555,6 +555,9 @@ void OH_AbsoluteXIndirect (const OpcDesc* D attribute ((unused)))
|
||||
void OH_Rts (const OpcDesc* D)
|
||||
{
|
||||
OH_Implicit (D);
|
||||
if (NewlineAfterRTS) {
|
||||
LineFeed ();
|
||||
}
|
||||
SeparatorLine();
|
||||
}
|
||||
|
||||
@ -563,6 +566,9 @@ void OH_Rts (const OpcDesc* D)
|
||||
void OH_JmpAbsolute (const OpcDesc* D)
|
||||
{
|
||||
OH_Absolute (D);
|
||||
if (NewlineAfterJMP) {
|
||||
LineFeed ();
|
||||
}
|
||||
SeparatorLine ();
|
||||
}
|
||||
|
||||
@ -571,7 +577,10 @@ void OH_JmpAbsolute (const OpcDesc* D)
|
||||
void OH_JmpAbsoluteIndirect (const OpcDesc* D)
|
||||
{
|
||||
OH_AbsoluteIndirect (D);
|
||||
SeparatorLine ();
|
||||
if (NewlineAfterJMP) {
|
||||
LineFeed ();
|
||||
}
|
||||
SeparatorLine ();
|
||||
}
|
||||
|
||||
|
||||
|
@ -6,10 +6,10 @@
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* (C) 2000-2007 Ullrich von Bassewitz */
|
||||
/* Roemerstrasse 52 */
|
||||
/* D-70794 Filderstadt */
|
||||
/* EMail: uz@cc65.org */
|
||||
/* (C) 2000-2011, Ullrich von Bassewitz */
|
||||
/* Roemerstrasse 52 */
|
||||
/* D-70794 Filderstadt */
|
||||
/* EMail: uz@cc65.org */
|
||||
/* */
|
||||
/* */
|
||||
/* This software is provided 'as-is', without any expressed or implied */
|
||||
@ -85,7 +85,7 @@ static void AsmIncSection (void)
|
||||
{
|
||||
static const IdentTok LabelDefs[] = {
|
||||
{ "COMMENTSTART", INFOTOK_COMMENTSTART },
|
||||
{ "FILE", INFOTOK_FILE },
|
||||
{ "FILE", INFOTOK_FILE },
|
||||
{ "IGNOREUNKNOWN", INFOTOK_IGNOREUNKNOWN },
|
||||
};
|
||||
|
||||
@ -190,6 +190,8 @@ static void GlobalSection (void)
|
||||
{ "LABELBREAK", INFOTOK_LABELBREAK },
|
||||
{ "MNEMONICCOL", INFOTOK_MNEMONIC_COLUMN },
|
||||
{ "MNEMONICCOLUMN", INFOTOK_MNEMONIC_COLUMN },
|
||||
{ "NEWLINEAFTERJMP", INFOTOK_NL_AFTER_JMP },
|
||||
{ "NEWLINEAFTERRTS", INFOTOK_NL_AFTER_RTS },
|
||||
{ "OUTPUTNAME", INFOTOK_OUTPUTNAME },
|
||||
{ "PAGELENGTH", INFOTOK_PAGELENGTH },
|
||||
{ "STARTADDR", INFOTOK_STARTADDR },
|
||||
@ -298,6 +300,26 @@ static void GlobalSection (void)
|
||||
InfoNextTok ();
|
||||
break;
|
||||
|
||||
case INFOTOK_NL_AFTER_JMP:
|
||||
InfoNextTok ();
|
||||
if (NewlineAfterJMP != -1) {
|
||||
InfoError ("NLAfterJMP already specified");
|
||||
}
|
||||
InfoBoolToken ();
|
||||
NewlineAfterJMP = (InfoTok != INFOTOK_FALSE);
|
||||
InfoNextTok ();
|
||||
break;
|
||||
|
||||
case INFOTOK_NL_AFTER_RTS:
|
||||
InfoNextTok ();
|
||||
InfoBoolToken ();
|
||||
if (NewlineAfterRTS != -1) {
|
||||
InfoError ("NLAfterRTS already specified");
|
||||
}
|
||||
NewlineAfterRTS = (InfoTok != INFOTOK_FALSE);
|
||||
InfoNextTok ();
|
||||
break;
|
||||
|
||||
case INFOTOK_OUTPUTNAME:
|
||||
InfoNextTok ();
|
||||
InfoAssureStr ();
|
||||
|
@ -6,7 +6,7 @@
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* (C) 1998-2009, Ullrich von Bassewitz */
|
||||
/* (C) 1998-2011, Ullrich von Bassewitz */
|
||||
/* Roemerstrasse 52 */
|
||||
/* D-70794 Filderstadt */
|
||||
/* EMail: uz@cc65.org */
|
||||
@ -340,8 +340,8 @@ static void OptVersion (const char* Opt attribute ((unused)),
|
||||
/* Print the disassembler version */
|
||||
{
|
||||
fprintf (stderr,
|
||||
"da65 V%s - (C) Copyright 2000-2009, Ullrich von Bassewitz\n",
|
||||
GetVersionAsString ());
|
||||
"da65 V%s - (C) Copyright 2000-2011, Ullrich von Bassewitz\n",
|
||||
GetVersionAsString ());
|
||||
}
|
||||
|
||||
|
||||
|
@ -6,10 +6,10 @@
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* (C) 2000-2007 Ullrich von Bassewitz */
|
||||
/* Roemerstrasse 52 */
|
||||
/* D-70794 Filderstadt */
|
||||
/* EMail: uz@cc65.org */
|
||||
/* (C) 2000-2011, Ullrich von Bassewitz */
|
||||
/* Roemerstrasse 52 */
|
||||
/* D-70794 Filderstadt */
|
||||
/* EMail: uz@cc65.org */
|
||||
/* */
|
||||
/* */
|
||||
/* This software is provided 'as-is', without any expressed or implied */
|
||||
@ -78,6 +78,8 @@ typedef enum token_t {
|
||||
INFOTOK_INPUTSIZE,
|
||||
INFOTOK_LABELBREAK,
|
||||
INFOTOK_MNEMONIC_COLUMN,
|
||||
INFOTOK_NL_AFTER_JMP,
|
||||
INFOTOK_NL_AFTER_RTS,
|
||||
INFOTOK_OUTPUTNAME,
|
||||
INFOTOK_PAGELENGTH,
|
||||
INFOTOK_STARTADDR,
|
||||
|
Loading…
x
Reference in New Issue
Block a user