2016-01-23 03:51:29 -08:00
|
|
|
#ifndef LISTING_H_
|
|
|
|
#define LISTING_H_
|
|
|
|
|
2016-01-23 18:38:39 -08:00
|
|
|
#include "macrossTypes.h"
|
2016-01-23 03:51:29 -08:00
|
|
|
|
2016-01-24 15:56:45 -08:00
|
|
|
#include <stdarg.h>
|
|
|
|
|
2016-01-23 19:18:42 +01:00
|
|
|
void outputListing(void);
|
|
|
|
void terminateListingFiles(void);
|
|
|
|
void generateListing(void);
|
2016-01-23 03:51:29 -08:00
|
|
|
int printMacroLine(int numberOfBytes, int byteAddress, statementKindType kind);
|
2016-01-23 18:38:39 -08:00
|
|
|
void readSourceFileLine(int *sourceAddressPtr, int *sourceDepthPtr, char *lineBuffer, FILE *file);
|
2016-01-23 03:51:29 -08:00
|
|
|
void readIndexFileLine(statementKindType *statementKindPtr, int *indexAddressPtr, int *indexLineNumberPtr);
|
|
|
|
int printListingLine(int numberOfBytes, int byteAddress, char *text, statementKindType kind);
|
|
|
|
bool isBlockOpener(statementKindType statementKind);
|
2016-01-23 18:38:39 -08:00
|
|
|
bool isBlankStatement(statementKindType statementKind);
|
2016-01-23 03:51:29 -08:00
|
|
|
void tabPrint(stringType *text);
|
2016-01-23 18:38:39 -08:00
|
|
|
void printNTimes(char aChar, int times);
|
2016-01-23 19:18:42 +01:00
|
|
|
void tabIndent(void);
|
|
|
|
bool labeledLine(void);
|
2016-01-23 18:38:39 -08:00
|
|
|
void vaddText(char *buffer, char **bufferPtr, char *format, va_list ap);
|
2016-01-23 17:48:33 +01:00
|
|
|
void addText(char *buffer, char **bufferPtr, char *format, ...);
|
|
|
|
void moreTextOptional(char *buffer, char **bufferPtr, char *format, ...);
|
|
|
|
void moreText(char *format, ...);
|
2016-01-23 17:42:40 +01:00
|
|
|
void moreLabel(char *format, int arg1);
|
2016-01-23 19:18:42 +01:00
|
|
|
void startLine(void);
|
|
|
|
void endLine(void);
|
|
|
|
void flushExpressionString(void);
|
2016-01-23 03:51:29 -08:00
|
|
|
void expandExpression(char *toBuffer, char **toBufferPtr);
|
|
|
|
void expandNum(char *buffer, char **bufferPtr, int n);
|
|
|
|
void flushOperand(int n);
|
|
|
|
void expandOperands(int op);
|
2016-01-23 19:18:42 +01:00
|
|
|
void expandLabel(void);
|
2016-01-23 17:48:33 +01:00
|
|
|
void moreExpression(char *format, ...);
|
2016-01-23 19:18:42 +01:00
|
|
|
void startLineMarked(void);
|
2016-01-23 03:51:29 -08:00
|
|
|
bool notListable(statementKindType statementKind);
|
|
|
|
|
|
|
|
#endif
|