Skip to content

Commit

Permalink
[ASM] Add option directive
Browse files Browse the repository at this point in the history
  • Loading branch information
tgtakaoka committed Jul 22, 2023
1 parent c41d82b commit b11dfc0
Show file tree
Hide file tree
Showing 32 changed files with 75 additions and 83 deletions.
42 changes: 40 additions & 2 deletions src/asm_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,22 @@

#include "asm_base.h"

#include "text_common.h"

namespace libasm {

using namespace pseudo;
using namespace text::common;

namespace {
constexpr Pseudo PSEUDOS[] PROGMEM = {
Pseudo{TEXT_ALIGN, &Assembler::alignOrigin},
Pseudo{TEXT_OPTION, &Assembler::setOption},
Pseudo{TEXT_ORG, &Assembler::defineOrigin},
};
const Pseudos common_pseudos(ARRAY_RANGE(PSEUDOS));
} // namespace

Assembler::Assembler(const ValueParser::Plugins &plugins, const /*PROGMEM*/ pseudo::Pseudo *ptable,
const /*PROGMEM*/ pseudo::Pseudo *pend, const OptionBase *option)
: ErrorAt(), _parser(plugins, *this), _pseudos(ptable, pend), _options(option) {}
Expand Down Expand Up @@ -61,8 +75,10 @@ Error Assembler::encode(const char *line, Insn &insn, SymbolTable *symtab) {
}

Error Assembler::processPseudo(StrScanner &scan, Insn &insn) {
const auto *p = _pseudos.search(insn);
return p ? p->invoke(this, scan, insn) : UNKNOWN_DIRECTIVE;
const auto *p= _pseudos.search(insn);
if ((p = _pseudos.search(insn)) || (p = common_pseudos.search(insn)))
return p->invoke(this, scan, insn);
return UNKNOWN_DIRECTIVE;
}

uint16_t Assembler::parseExpr16(StrScanner &expr, ErrorAt &error, char delim) const {
Expand Down Expand Up @@ -92,6 +108,28 @@ int32_t Assembler::branchDelta(uint32_t base, uint32_t target, const ErrorAt &at
return delta;
}

Error Assembler::setOption(StrScanner &scan, Insn &insn, uint8_t extra) {
// parse "name", "text" in |scan|
auto p = scan.skipSpaces();
if (!p.expect('"'))
return ILLEGAL_OPERAND;
auto name = p;
name.trimEndAt(p.trimStart([](char c) { return c && c != '"'; }));
if (!p.expect('"'))
return ILLEGAL_OPERAND;
if (!p.skipSpaces().expect(','))
return MISSING_COMMA;
if (!p.skipSpaces().expect('"'))
return ILLEGAL_OPERAND;
auto text = p;
text.trimEndAt(p.trimStart([](char c) { return c && c != '"'; }));
if (!p.expect('"'))
return ILLEGAL_OPERAND;
if (!endOfLine(p.skipSpaces()))
return GARBAGE_AT_END;
return setOption(name, text);
}

Error Assembler::defineOrigin(StrScanner &scan, Insn &insn, uint8_t extra) {
(void)extra;
auto p = scan;
Expand Down
3 changes: 2 additions & 1 deletion src/asm_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ struct Assembler : ErrorAt, private ValueParser::Locator {
bool setCpu(const char *name) { return configSetter().setCpuName(name); }
Error setCpu(StrScanner &scan) { return configSetter().setCpuName(scan); }

Error setOption(const char *name, const char *text) {
Error setOption(const StrScanner &name, const StrScanner &text) {
if (_commonOptions.setOption(name, text) == OK)
return getError();
return options().setOption(name, text);
Expand All @@ -58,6 +58,7 @@ struct Assembler : ErrorAt, private ValueParser::Locator {
Error setCurrentLocation(uint32_t location);
uint32_t currentLocation() const { return _currentLocation; }

Error setOption(StrScanner &scan, Insn &insn, uint8_t extra = 0);
Error defineOrigin(StrScanner &scan, Insn &insn, uint8_t extra = 0);
Error alignOrigin(StrScanner &scan, Insn &insn, uint8_t extra = 0);
Error allocateSpaces(StrScanner &scan, Insn &insn, uint8_t extra);
Expand Down
2 changes: 0 additions & 2 deletions src/asm_cdp1802.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ struct Cdp1802FunctionParser final : FunctionParser {
};

constexpr Pseudo PSEUDOS[] PROGMEM = {
Pseudo{TEXT_ALIGN, &Assembler::alignOrigin, 0},
Pseudo{TEXT_DC, &Assembler::defineDataConstant, Assembler::DATA_BYTE_OR_WORD},
Pseudo{TEXT_ORG, &Assembler::defineOrigin, 0},
};

} // namespace
Expand Down
2 changes: 0 additions & 2 deletions src/asm_f3850.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@ namespace {
const char TEXT_RS[] PROGMEM = "rs";

constexpr Pseudo PSEUDOS[] PROGMEM = {
Pseudo{TEXT_ALIGN, &Assembler::alignOrigin},
Pseudo{TEXT_DA, &Assembler::defineDataConstant, Assembler::DATA_WORD},
Pseudo{TEXT_DC, &Assembler::defineDataConstant, Assembler::DATA_BYTE_OR_WORD},
Pseudo{TEXT_ORG, &Assembler::defineOrigin},
Pseudo{TEXT_RS, &Assembler::allocateSpaces, Assembler::DATA_BYTE},
};

Expand Down
2 changes: 0 additions & 2 deletions src/asm_i8048.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@ using namespace text::common;
namespace {

constexpr Pseudo PSEUDOS[] PROGMEM = {
Pseudo{TEXT_ALIGN, &Assembler::alignOrigin},
Pseudo{TEXT_DB, &Assembler::defineDataConstant, Assembler::DATA_BYTE},
Pseudo{TEXT_DS, &Assembler::allocateSpaces, Assembler::DATA_BYTE},
Pseudo{TEXT_DW, &Assembler::defineDataConstant, Assembler::DATA_WORD},
Pseudo{TEXT_ORG, &Assembler::defineOrigin},
};

} // namespace
Expand Down
2 changes: 0 additions & 2 deletions src/asm_i8051.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@ using namespace text::common;
namespace {

constexpr Pseudo PSEUDOS[] PROGMEM = {
Pseudo{TEXT_ALIGN, &Assembler::alignOrigin},
Pseudo{TEXT_DB, &Assembler::defineDataConstant, Assembler::DATA_BYTE},
Pseudo{TEXT_DS, &Assembler::allocateSpaces, Assembler::DATA_BYTE},
Pseudo{TEXT_DW, &Assembler::defineDataConstant, Assembler::DATA_WORD},
Pseudo{TEXT_ORG, &Assembler::defineOrigin},
};

} // namespace
Expand Down
2 changes: 0 additions & 2 deletions src/asm_i8080.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@ using namespace text::common;
namespace {

constexpr Pseudo PSEUDOS[] PROGMEM = {
Pseudo{TEXT_ALIGN, &Assembler::alignOrigin},
Pseudo{TEXT_DB, &Assembler::defineDataConstant, Assembler::DATA_BYTE},
Pseudo{TEXT_DS, &Assembler::allocateSpaces, Assembler::DATA_BYTE},
Pseudo{TEXT_DW, &Assembler::defineDataConstant, Assembler::DATA_WORD},
Pseudo{TEXT_ORG, &Assembler::defineOrigin},
};

} // namespace
Expand Down
2 changes: 0 additions & 2 deletions src/asm_i8086.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,10 @@ const char TEXT_RESD[] PROGMEM = "resd";
const char TEXT_RESW[] PROGMEM = "resw";

constexpr Pseudo PSEUDOS[] PROGMEM = {
Pseudo{TEXT_ALIGN, &Assembler::alignOrigin},
Pseudo{TEXT_DB, &Assembler::defineDataConstant, Assembler::DATA_BYTE},
Pseudo{TEXT_DD, &Assembler::defineDataConstant, Assembler::DATA_LONG},
Pseudo{TEXT_DS, &Assembler::allocateSpaces, Assembler::DATA_BYTE},
Pseudo{TEXT_DW, &Assembler::defineDataConstant, Assembler::DATA_WORD},
Pseudo{TEXT_ORG, &Assembler::defineOrigin},
Pseudo{TEXT_RESB, &Assembler::allocateSpaces, Assembler::DATA_BYTE},
Pseudo{TEXT_RESD, &Assembler::allocateSpaces, Assembler::DATA_LONG},
Pseudo{TEXT_RESW, &Assembler::allocateSpaces, Assembler::DATA_WORD},
Expand Down
2 changes: 0 additions & 2 deletions src/asm_i8096.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,12 @@ using namespace text::common;
namespace {

constexpr Pseudo PSEUDOS[] PROGMEM = {
Pseudo{TEXT_ALIGN, &Assembler::alignOrigin},
Pseudo{TEXT_DCB, &Assembler::defineDataConstant, Assembler::DATA_BYTE},
Pseudo{TEXT_DCL, &Assembler::defineDataConstant, Assembler::DATA_LONG},
Pseudo{TEXT_DCW, &Assembler::defineDataConstant, Assembler::DATA_WORD},
Pseudo{TEXT_DSB, &Assembler::allocateSpaces, Assembler::DATA_BYTE},
Pseudo{TEXT_DSL, &Assembler::allocateSpaces, Assembler::DATA_LONG},
Pseudo{TEXT_DSW, &Assembler::allocateSpaces, Assembler::DATA_WORD},
Pseudo{TEXT_ORG, &Assembler::defineOrigin},
};

} // namespace
Expand Down
2 changes: 0 additions & 2 deletions src/asm_ins8060.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ constexpr Pseudo PSEUDOS[] PROGMEM = {
Pseudo{TEXT_dASCII, &Assembler::defineDataConstant, Assembler::DATA_BYTE},
Pseudo{TEXT_dBYTE, &Assembler::defineDataConstant, Assembler::DATA_BYTE},
Pseudo{TEXT_dDBYTE, &Assembler::defineDataConstant, Assembler::DATA_WORD},
Pseudo{TEXT_ALIGN, &Assembler::alignOrigin},
Pseudo{TEXT_ORG, &Assembler::defineOrigin},
};

struct Ins8060FunctionParser final : FunctionParser {
Expand Down
2 changes: 0 additions & 2 deletions src/asm_ins8070.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ constexpr Pseudo PSEUDOS[] PROGMEM = {
Pseudo{TEXT_dASCII, &Assembler::defineDataConstant, Assembler::DATA_BYTE},
Pseudo{TEXT_dBYTE, &Assembler::defineDataConstant, Assembler::DATA_BYTE},
Pseudo{TEXT_dDBYTE, &Assembler::defineDataConstant, Assembler::DATA_WORD},
Pseudo{TEXT_ALIGN, &Assembler::alignOrigin},
Pseudo{TEXT_ORG, &Assembler::defineOrigin},
};

struct Ins8070FunctionParser final : FunctionParser {
Expand Down
2 changes: 0 additions & 2 deletions src/asm_mc6800.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,9 @@ using namespace text::common;
namespace {

constexpr Pseudo PSEUDOS[] PROGMEM = {
Pseudo{TEXT_ALIGN, &Assembler::alignOrigin},
Pseudo{TEXT_FCB, &Assembler::defineDataConstant, Assembler::DATA_BYTE_NO_STRING},
Pseudo{TEXT_FCC, &Assembler::defineString},
Pseudo{TEXT_FDB, &Assembler::defineDataConstant, Assembler::DATA_WORD_NO_STRING},
Pseudo{TEXT_ORG, &Assembler::defineOrigin},
Pseudo{TEXT_RMB, &Assembler::allocateSpaces, Assembler::DATA_BYTE},
};

Expand Down
2 changes: 0 additions & 2 deletions src/asm_mc68000.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ const char TEXT_DS_W[] PROGMEM = "ds.w";

constexpr Pseudo PSEUDOS[] PROGMEM = {
Pseudo{TEXT_dALIGN, &Assembler::alignOrigin},
Pseudo{TEXT_ALIGN, &Assembler::alignOrigin},
Pseudo{TEXT_DC, &Assembler::defineDataConstant, Assembler::DATA_WORD_ALIGN2},
Pseudo{TEXT_DC_B, &Assembler::defineDataConstant, Assembler::DATA_BYTE},
Pseudo{TEXT_DC_L, &Assembler::defineDataConstant, Assembler::DATA_LONG_ALIGN2},
Expand All @@ -50,7 +49,6 @@ constexpr Pseudo PSEUDOS[] PROGMEM = {
Pseudo{TEXT_DS_B, &Assembler::allocateSpaces, Assembler::DATA_BYTE},
Pseudo{TEXT_DS_L, &Assembler::allocateSpaces, Assembler::DATA_LONG_ALIGN2},
Pseudo{TEXT_DS_W, &Assembler::allocateSpaces, Assembler::DATA_WORD_ALIGN2},
Pseudo{TEXT_ORG, &Assembler::defineOrigin},
};

} // namespace
Expand Down
2 changes: 0 additions & 2 deletions src/asm_mc6805.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,9 @@ const char OPT_INT_PCBITS[] = "pc-bits";
const char OPT_DESC_PCBITS[] = "program counter width in bit, default 13";

constexpr Pseudo PSEUDOS[] PROGMEM = {
Pseudo{TEXT_ALIGN, &Assembler::alignOrigin},
Pseudo{TEXT_FCB, &Assembler::defineDataConstant, Assembler::DATA_BYTE_NO_STRING},
Pseudo{TEXT_FCC, &Assembler::defineString},
Pseudo{TEXT_FDB, &Assembler::defineDataConstant, Assembler::DATA_WORD_NO_STRING},
Pseudo{TEXT_ORG, &Assembler::defineOrigin},
Pseudo{TEXT_RMB, &Assembler::allocateSpaces, Assembler::DATA_BYTE},
};

Expand Down
2 changes: 0 additions & 2 deletions src/asm_mc6809.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,9 @@ const char OPT_INT_SETDP[] PROGMEM = "setdp";
const char OPT_DESC_SETDP[] PROGMEM = "set direct page register";

constexpr Pseudo PSEUDOS[] PROGMEM = {
Pseudo{TEXT_ALIGN, &Assembler::alignOrigin},
Pseudo{TEXT_FCB, &Assembler::defineDataConstant, Assembler::DATA_BYTE_NO_STRING},
Pseudo{TEXT_FCC, &Assembler::defineString},
Pseudo{TEXT_FDB, &Assembler::defineDataConstant, Assembler::DATA_WORD_NO_STRING},
Pseudo{TEXT_ORG, &Assembler::defineOrigin},
Pseudo{TEXT_RMB, &Assembler::allocateSpaces, Assembler::DATA_BYTE},
};

Expand Down
2 changes: 0 additions & 2 deletions src/asm_mn1610.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,9 @@ namespace {
const char TEXT_LOC[] PROGMEM = "loc";

constexpr Pseudo PSEUDOS[] PROGMEM = {
Pseudo{TEXT_ALIGN, &Assembler::alignOrigin},
Pseudo{TEXT_DC, &Assembler::defineDataConstant, Assembler::DATA_WORD},
Pseudo{TEXT_DS, &Assembler::allocateSpaces, Assembler::DATA_WORD},
Pseudo{TEXT_LOC, &Assembler::defineOrigin},
Pseudo{TEXT_ORG, &Assembler::defineOrigin},
};

} // namespace
Expand Down
2 changes: 0 additions & 2 deletions src/asm_mos6502.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ constexpr Pseudo PSEUDOS[] PROGMEM = {
Pseudo{TEXT_dALIGN, &Assembler::alignOrigin},
Pseudo{TEXT_dBYTE, &Assembler::defineDataConstant, Assembler::DATA_BYTE},
Pseudo{TEXT_dWORD, &Assembler::defineDataConstant, Assembler::DATA_WORD},
Pseudo{TEXT_ALIGN, &Assembler::alignOrigin},
Pseudo{TEXT_ORG, &Assembler::defineOrigin},
};

} // namespace
Expand Down
6 changes: 2 additions & 4 deletions src/asm_ns32000.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ constexpr Pseudo PSEUDOS[] PROGMEM = {
Pseudo{TEXT_dORG, &Assembler::defineOrigin},
Pseudo{TEXT_dSPACE, &Assembler::allocateSpaces, Assembler::DATA_BYTE},
Pseudo{TEXT_dWORD, &Assembler::defineDataConstant, Assembler::DATA_WORD},
Pseudo{TEXT_ALIGN, &Assembler::alignOrigin},
Pseudo{TEXT_ORG, &Assembler::defineOrigin},
};

} // namespace
Expand Down Expand Up @@ -128,7 +126,7 @@ void AsmNs32000::reset() {
setMmuType(MMU_NONE);
}

Error AsmNs32000::setFpuName(StrScanner &scan) {
Error AsmNs32000::setFpuName(const StrScanner &scan) {
if (scan.iequals_P(TEXT_FPU_NS32081)) {
setFpuType(FPU_NS32081);
} else if (scan.iequals_P(TEXT_none)) {
Expand All @@ -139,7 +137,7 @@ Error AsmNs32000::setFpuName(StrScanner &scan) {
return OK;
}

Error AsmNs32000::setPmmuName(StrScanner &scan) {
Error AsmNs32000::setPmmuName(const StrScanner &scan) {
if (scan.iequals_P(TEXT_MMU_NS32082)) {
setMmuType(MMU_NS32082);
} else if (scan.iequals_P(TEXT_none)) {
Expand Down
4 changes: 2 additions & 2 deletions src/asm_ns32000.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class AsmNs32000 final : public Assembler, public Config {

void reset() override;

Error setFpuName(StrScanner &scan);
Error setPmmuName(StrScanner &scan);
Error setFpuName(const StrScanner &scan);
Error setPmmuName(const StrScanner &scan);

private:
const TextOption<AsmNs32000> _opt_fpu;
Expand Down
2 changes: 0 additions & 2 deletions src/asm_scn2650.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,8 @@ const char TEXT_RES[] PROGMEM = "res";

constexpr Pseudo PSEUDOS[] PROGMEM = {
Pseudo{TEXT_ACON, &Assembler::defineDataConstant, Assembler::DATA_WORD},
Pseudo{TEXT_ALIGN, &Assembler::alignOrigin},
Pseudo{TEXT_ALIT, &Assembler::defineDataConstant, Assembler::DATA_BYTE},
Pseudo{TEXT_DATA, &Assembler::defineDataConstant, Assembler::DATA_BYTE},
Pseudo{TEXT_ORG, &Assembler::defineOrigin},
Pseudo{TEXT_RES, &Assembler::allocateSpaces, Assembler::DATA_BYTE},
};

Expand Down
2 changes: 0 additions & 2 deletions src/asm_tlcs90.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ using namespace text::common;
namespace {

constexpr Pseudo PSEUDOS[] PROGMEM = {
Pseudo{TEXT_ALIGN, &Assembler::alignOrigin},
Pseudo{TEXT_DB, &Assembler::defineDataConstant, Assembler::DATA_BYTE},
Pseudo{TEXT_DEFB, &Assembler::defineDataConstant, Assembler::DATA_BYTE},
Pseudo{TEXT_DEFM, &Assembler::defineDataConstant, Assembler::DATA_BYTE},
Expand All @@ -39,7 +38,6 @@ constexpr Pseudo PSEUDOS[] PROGMEM = {
Pseudo{TEXT_DL, &Assembler::defineDataConstant, Assembler::DATA_LONG},
Pseudo{TEXT_DS, &Assembler::allocateSpaces, Assembler::DATA_BYTE},
Pseudo{TEXT_DW, &Assembler::defineDataConstant, Assembler::DATA_WORD},
Pseudo{TEXT_ORG, &Assembler::defineOrigin},
};

} // namespace
Expand Down
2 changes: 0 additions & 2 deletions src/asm_tms32010.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ constexpr Pseudo PSEUDOS[] PROGMEM = {
Pseudo{TEXT_dORG, &Assembler::defineOrigin},
Pseudo{TEXT_dSTRING, &Assembler::defineDataConstant, Assembler::DATA_WORD},
Pseudo{TEXT_dWORD, &Assembler::defineDataConstant, Assembler::DATA_WORD},
Pseudo{TEXT_ALIGN, &Assembler::alignOrigin},
Pseudo{TEXT_ORG, &Assembler::defineOrigin},
};

} // namespace
Expand Down
2 changes: 0 additions & 2 deletions src/asm_tms9900.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,9 @@ const char TEXT_BSS[] PROGMEM = "bss";
const char TEXT_TEXT[] PROGMEM = "text";

constexpr Pseudo PSEUDOS[] PROGMEM = {
Pseudo{TEXT_ALIGN, &Assembler::alignOrigin},
Pseudo{TEXT_BSS, &Assembler::allocateSpaces, Assembler::DATA_BYTE},
Pseudo{TEXT_BYTE, &Assembler::defineDataConstant, Assembler::DATA_BYTE},
Pseudo{TEXT_DATA, &Assembler::defineDataConstant, Assembler::DATA_WORD_ALIGN2},
Pseudo{TEXT_ORG, &Assembler::defineOrigin},
Pseudo{TEXT_TEXT, &Assembler::defineDataConstant, Assembler::DATA_BYTE},
};

Expand Down
2 changes: 0 additions & 2 deletions src/asm_z8.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,10 @@ const char OPT_INT_SETRP1[] PROGMEM = "setrp1";
const char OPT_DESC_SETRP1[] PROGMEM = "set register pointer 1";

constexpr Pseudo PSEUDOS[] PROGMEM = {
Pseudo{TEXT_ALIGN, &Assembler::alignOrigin},
Pseudo{TEXT_DB, &Assembler::defineDataConstant, Assembler::DATA_BYTE},
Pseudo{TEXT_DL, &Assembler::defineDataConstant, Assembler::DATA_LONG},
Pseudo{TEXT_DS, &Assembler::allocateSpaces, Assembler::DATA_BYTE},
Pseudo{TEXT_DW, &Assembler::defineDataConstant, Assembler::DATA_WORD},
Pseudo{TEXT_ORG, &Assembler::defineOrigin},
};

} // namespace
Expand Down
2 changes: 0 additions & 2 deletions src/asm_z80.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ using namespace text::common;
namespace {

constexpr Pseudo PSEUDOS[] PROGMEM = {
Pseudo{TEXT_ALIGN, &Assembler::alignOrigin},
Pseudo{TEXT_DB, &Assembler::defineDataConstant, Assembler::DATA_BYTE},
Pseudo{TEXT_DEFB, &Assembler::defineDataConstant, Assembler::DATA_BYTE},
Pseudo{TEXT_DEFM, &Assembler::defineDataConstant, Assembler::DATA_BYTE},
Expand All @@ -39,7 +38,6 @@ constexpr Pseudo PSEUDOS[] PROGMEM = {
Pseudo{TEXT_DL, &Assembler::defineDataConstant, Assembler::DATA_LONG},
Pseudo{TEXT_DS, &Assembler::allocateSpaces, Assembler::DATA_BYTE},
Pseudo{TEXT_DW, &Assembler::defineDataConstant, Assembler::DATA_WORD},
Pseudo{TEXT_ORG, &Assembler::defineOrigin},
};

} // namespace
Expand Down
2 changes: 0 additions & 2 deletions src/asm_z8000.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,8 @@ const char TEXT_STRING[] PROGMEM = "string";
const char TEXT_WORD[] PROGMEM = "word";

constexpr Pseudo PSEUDOS[] PROGMEM = {
Pseudo{TEXT_ALIGN, &Assembler::alignOrigin},
Pseudo{TEXT_BYTE, &Assembler::defineDataConstant, Assembler::DATA_BYTE},
Pseudo{TEXT_LONG, &Assembler::defineDataConstant, Assembler::DATA_LONG_ALIGN2},
Pseudo{TEXT_ORG, &Assembler::defineOrigin},
Pseudo{TEXT_STRING, &Assembler::defineDataConstant, Assembler::DATA_BYTE},
Pseudo{TEXT_WORD, &Assembler::defineDataConstant, Assembler::DATA_WORD_ALIGN2},
};
Expand Down
Loading

0 comments on commit b11dfc0

Please sign in to comment.