64 lines
1.8 KiB
C++
64 lines
1.8 KiB
C++
#ifndef _AS68HC11_M68ASSEMBLER_HPP_
|
|
#define _AS68HC11_M68ASSEMBLER_HPP_
|
|
#ifndef _COMMON_WINDOWS_HPP_
|
|
#include <common/windows.hpp>
|
|
#endif
|
|
#ifndef _COMMON_STRING_HPP_
|
|
#include <common/string.hpp>
|
|
#endif
|
|
#ifndef _COMMON_OPENFILE_HPP_
|
|
#include <common/openfile.hpp>
|
|
#endif
|
|
#ifndef _COMMON_FILEMAP_HPP_
|
|
#include <common/filemap.hpp>
|
|
#endif
|
|
#ifndef _COMMON_PUREVIEWOFFILE_HPP_
|
|
#include <common/pview.hpp>
|
|
#endif
|
|
#ifndef _COMMON_STDLIB_HPP_
|
|
#include <common/stdlib.hpp>
|
|
#endif
|
|
#ifndef _AS68HC11_TABLE_HPP_
|
|
#include <as68hc11/table.hpp>
|
|
#endif
|
|
#ifndef _AS68HC11_SCAN_HPP_
|
|
#include <as68hc11/scan.hpp>
|
|
#endif
|
|
#ifndef _AS68HC11_PARSE_HPP_
|
|
#include <as68hc11/parse.hpp>
|
|
#endif
|
|
|
|
class M68Assembler
|
|
{
|
|
public:
|
|
M68Assembler(void);
|
|
virtual ~M68Assembler();
|
|
bool assemble(const String &strPathFileName,const String &strPathOutFile);
|
|
bool assemble(const String &strPathFileName);
|
|
const String &strLastMessage(void)const;
|
|
DWORD codeSize(void)const;
|
|
DWORD lastLineNumber(void)const;
|
|
private:
|
|
enum{MaxScanBytes=128000,MaxParseBytes=512};
|
|
M68Assembler(const M68Assembler &someM68Assembler);
|
|
M68Assembler &operator=(const M68Assembler &someM68Assembler);
|
|
bool operator==(const M68Assembler &someM68Assembler)const;
|
|
void createSymbolTable(Table &symbols);
|
|
void shuffle(Block<Symbol> &symbols);
|
|
bool generateCode(const String &strPathOutFile,PureViewOfFile &parseView,DWORD codeLength);
|
|
bool generateListing(const String &strPathOutFile,PureViewOfFile &parseView,DWORD codeLength);
|
|
// bool generateS19(const String &strPathOutFile,Origins &origins,PureViewOfFile &rawCode,DWORD codeLength);
|
|
bool generateS19(const String &strPathOutFile,PureViewOfFile &rawCode);
|
|
|
|
Table mSymbolTable;
|
|
String mLastMessage;
|
|
DWORD mLastLineNumber;
|
|
DWORD mCodeSize;
|
|
};
|
|
|
|
inline
|
|
DWORD M68Assembler::codeSize(void)const
|
|
{
|
|
return mCodeSize;
|
|
}
|
|
#endif |