New features: DByteTable, Comments

git-svn-id: svn://svn.cc65.org/cc65/trunk@2409 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2003-08-23 09:20:33 +00:00
parent ece067b0e7
commit e3d3a43c3c
13 changed files with 216 additions and 77 deletions

View File

@@ -41,7 +41,6 @@
/* common */
#include "cpu.h"
#include "print.h"
#include "version.h"
/* da65 */
@@ -188,6 +187,27 @@ void DataByteLine (unsigned ByteCount)
void DataDByteLine (unsigned ByteCount)
/* Output a line with dbytes */
{
unsigned I;
Indent (MIndent);
Output (".dbyte");
Indent (AIndent);
for (I = 0; I < ByteCount; I += 2) {
if (I > 0) {
Output (",$%04X", GetCodeDByte (PC+I));
} else {
Output ("$%04X", GetCodeDByte (PC+I));
}
}
LineComment (PC, ByteCount);
LineFeed ();
}
void DataWordLine (unsigned ByteCount)
/* Output a line with words */
{
@@ -233,7 +253,7 @@ void DataDWordLine (unsigned ByteCount)
void SeparatorLine (void)
/* Print a separator line */
{
if (Pass == PassCount && Verbosity >= 1) {
if (Pass == PassCount && Comments >= 1) {
Output ("; ----------------------------------------------------------------------------");
LineFeed ();
}
@@ -246,14 +266,14 @@ void LineComment (unsigned PC, unsigned Count)
{
unsigned I;
if (Pass == PassCount && Verbosity >= 2) {
if (Pass == PassCount && Comments >= 2) {
Indent (CIndent);
Output ("; %04X", PC);
if (Verbosity >= 3) {
if (Comments >= 3) {
for (I = 0; I < Count; ++I) {
Output (" %02X", CodeBuf [PC+I]);
}
if (Verbosity >= 4) {
if (Comments >= 4) {
Indent (TIndent);
for (I = 0; I < Count; ++I) {
unsigned char C = CodeBuf [PC+I];