2016-01-23 11:51:29 +00:00
|
|
|
#ifndef LISTING_H_
|
|
|
|
#define LISTING_H_
|
|
|
|
|
|
|
|
/* TODO: Functions here that have "format" arguments should actually
|
|
|
|
* be varargs. In 1984 it probably wasn't standardized, but here in
|
|
|
|
* Glorious Future Year 1989 the vprintf function does almost exactly
|
|
|
|
* what we want. */
|
|
|
|
|
2016-01-23 18:18:42 +00:00
|
|
|
void outputListing(void);
|
|
|
|
void terminateListingFiles(void);
|
|
|
|
void generateListing(void);
|
2016-01-23 11:51:29 +00:00
|
|
|
int printMacroLine(int numberOfBytes, int byteAddress, statementKindType kind);
|
|
|
|
void readSourceFileLine(int *sourceAddressPtr, int *sourceDepthPtr, char lineBuffer[], FILE *file);
|
|
|
|
void readIndexFileLine(statementKindType *statementKindPtr, int *indexAddressPtr, int *indexLineNumberPtr);
|
|
|
|
int printListingLine(int numberOfBytes, int byteAddress, char *text, statementKindType kind);
|
|
|
|
bool isBlockOpener(statementKindType statementKind);
|
|
|
|
bool isBlankStatment(statementKindType statementKind);
|
|
|
|
void tabPrint(stringType *text);
|
|
|
|
void printNTimes (char aChar, int times);
|
2016-01-23 18:18:42 +00:00
|
|
|
void tabIndent(void);
|
|
|
|
bool labeledLine(void);
|
2016-01-23 16:48:33 +00:00
|
|
|
void addText(char *buffer, char **bufferPtr, char *format, ...);
|
|
|
|
void moreTextOptional(char *buffer, char **bufferPtr, char *format, ...);
|
|
|
|
void moreText(char *format, ...);
|
2016-01-23 16:42:40 +00:00
|
|
|
void moreLabel(char *format, int arg1);
|
2016-01-23 18:18:42 +00:00
|
|
|
void startLine(void);
|
|
|
|
void endLine(void);
|
|
|
|
void flushExpressionString(void);
|
2016-01-23 11:51:29 +00: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 18:18:42 +00:00
|
|
|
void expandLabel(void);
|
2016-01-23 16:48:33 +00:00
|
|
|
void moreExpression(char *format, ...);
|
2016-01-23 18:18:42 +00:00
|
|
|
void startLineMarked(void);
|
2016-01-23 11:51:29 +00:00
|
|
|
bool notListable(statementKindType statementKind);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|