Skip to content

Commit

Permalink
[PDP11] Add PDP-11 Assembler
Browse files Browse the repository at this point in the history
  • Loading branch information
tgtakaoka committed Oct 20, 2024
1 parent 5a92226 commit 4bd4fc0
Show file tree
Hide file tree
Showing 40 changed files with 2,577 additions and 76 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ It can generate Intel HEX or Motorola S-Record output.
TLCS90 INS8060 INS8070 CDP1802 CDP1804 CDP1804A SCN2650 F3850 IM6100
HD6120 TMS7000 TMS32010 TMS32015 i8086 i80186 V30 i8096 MC68000
TMS9900 TMS9980 TMS9995 TMS99105 Z8001 Z8002 NS32032 MN1610 MN1613
MN1613A
MN1613A J11 T11
-o <output> : output file
-l <list> : list file
-S[<bytes>] : output Motorola S-Record format
Expand All @@ -94,7 +94,7 @@ It can generate Intel HEX or Motorola S-Record output.
--list-radix : set listing radix (8, 16) (int)
--smart-branch : optimize branch instruction (bool)
--fpu : floating point co-processor (text: 8086, 68000, 32032)
--implicit-word : unknown instruction defines word (bool: 6100)
--implicit-word : unknown instruction defines word (bool: 6100, J11)
--longa : enable 16-bit accumulator (bool: 6502)
--longi : enable 16-bit index registers (bool: 6502)
--optimize-index : optimize zero index (bool: Z8)
Expand Down
4 changes: 2 additions & 2 deletions README_.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ usage: asm [-o <output>] [-l <list>] <input>
TLCS90 INS8060 INS8070 CDP1802 CDP1804 CDP1804A SCN2650 F3850 IM6100
HD6120 TMS7000 TMS32010 TMS32015 i8086 i80186 V30 i8096 MC68000
TMS9900 TMS9980 TMS9995 TMS99105 Z8001 Z8002 NS32032 MN1610 MN1613
MN1613A
MN1613A J11 T11
-o <output> : output file
-l <list> : list file
-S[<bytes>] : output Motorola S-Record format
Expand All @@ -98,7 +98,7 @@ usage: asm [-o <output>] [-l <list>] <input>
--list-radix : set listing radix (8, 16) (int)
--smart-branch : optimize branch instruction (bool)
--fpu : floating point co-processor (text: 8086, 68000, 32032)
--implicit-word : unknown instruction defines word (bool: 6100)
--implicit-word : unknown instruction defines word (bool: 6100, J11)
--longa : enable 16-bit accumulator (bool: 6502)
--longi : enable 16-bit index registers (bool: 6502)
--optimize-index : optimize zero index (bool: Z8)
Expand Down
4 changes: 4 additions & 0 deletions cli/asm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "asm_mn1610.h"
#include "asm_mos6502.h"
#include "asm_ns32000.h"
#include "asm_pdp11.h"
#include "asm_pdp8.h"
#include "asm_scn2650.h"
#include "asm_tlcs90.h"
Expand Down Expand Up @@ -62,6 +63,7 @@ mc6809::AsmMc6809 asm6809;
mn1610::AsmMn1610 asm1610;
mos6502::AsmMos6502 asm6502;
ns32000::AsmNs32000 asm32000;
pdp11::AsmPdp11 asmpdp11;
pdp8::AsmPdp8 asmpdp8;
scn2650::AsmScn2650 asm2650;
tlcs90::AsmTlcs90 asm90;
Expand All @@ -72,6 +74,7 @@ z8000::AsmZ8000 asmz8000;
z80::AsmZ80 asmz80;
z8::AsmZ8 asmz8;

DecDirective dirpdp11(asmpdp11);
DecDirective dirpdp8(asmpdp8);
FairchildDirective dir3850(asm3850);
IntelDirective dir1610(asm1610);
Expand Down Expand Up @@ -124,6 +127,7 @@ AsmCommander commander{
&dirz8000,
&dir32000,
&dir1610,
&dirpdp11,
};

int main(int argc, const char **argv) {
Expand Down
2 changes: 2 additions & 0 deletions cli/build.ninja
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@ build asm: link asm.o $
parsers.o reg_base.o str_buffer.o str_scanner.o symbol_store.o $
text_common.o value.o value_formatter.o value_parser.o $
fixed64.o ieee_float.o float80_base.o float80_hard.o float80_soft.o $
dec_float.o $
asm_cdp1802.o reg_cdp1802.o table_cdp1802.o text_cdp1802.o $
asm_f3850.o reg_f3850.o table_f3850.o text_f3850.o $
asm_i8048.o reg_i8048.o table_i8048.o text_i8048.o $
asm_i8051.o reg_i8051.o table_i8051.o text_i8051.o $
asm_i8080.o reg_i8080.o table_i8080.o text_i8080.o $
asm_i8086.o reg_i8086.o table_i8086.o text_i8086.o $
asm_i8096.o reg_i8096.o table_i8096.o text_i8096.o $
asm_pdp11.o reg_pdp11.o table_pdp11.o text_pdp11.o $
asm_pdp8.o reg_pdp8.o table_pdp8.o text_pdp8.o $
asm_ins8060.o reg_ins8060.o table_ins8060.o text_ins8060.o $
asm_ins8070.o reg_ins8070.o table_ins8070.o text_ins8070.o $
Expand Down
1 change: 1 addition & 0 deletions keywords.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ AsmMc6809 KEYWORD1 libasm
AsmMn1610 KEYWORD1 libasm
AsmMos6502 KEYWORD1 libasm
AsmNs32000 KEYWORD1 libasm
AsmPdp11 KEYWORD1 libasm
AsmPdp8 KEYWORD1 libasm
AsmScn2650 KEYWORD1 libasm
AsmTlcs90 KEYWORD1 libasm
Expand Down
2 changes: 0 additions & 2 deletions src/asm_ns32000.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ namespace {
constexpr char OPT_TEXT_PMMU[] PROGMEM = "pmmu";
constexpr char OPT_DESC_PMMU[] PROGMEM = "memory management unit";

constexpr char TEXT_dBLKB[] PROGMEM = ".blkb";
constexpr char TEXT_dBLKD[] PROGMEM = ".blkd";
constexpr char TEXT_dBLKW[] PROGMEM = ".blkw";
constexpr char TEXT_dDOUBLE[] PROGMEM = ".double";
constexpr char TEXT_dFLOAT[] PROGMEM = ".float";
constexpr char TEXT_dLONG[] PROGMEM = ".long";
Expand Down
Loading

0 comments on commit 4bd4fc0

Please sign in to comment.