diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index 24a143e3..33be9af8 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -37,10 +37,12 @@ The full set of tests is only run for tagged releases. - cleanup SimH setup files (\*.scmd), use autoconfig, set disk types - cleanup code base, use page,mmr\*,pdr,par instead of segment,ssr\*,sdr,sar - sysid encodes now system type, allows to distingish w11,SimH,e11 +- added dasm-11, a PDP-11 disassembler ### New features - new verification codes - tools/tcode: fast cpu verification codes - tools/tests: test programs + - tools/bin: added dasm-11, a PDP-11 disassembler ### Changes - tools changes - ci.yml: define TBW_GHDL_OPTS and suppress IEEE package warnings at t=0ms diff --git a/tools/README.md b/tools/README.md index d3f415a7..0c2cd8b6 100644 --- a/tools/README.md +++ b/tools/README.md @@ -5,6 +5,7 @@ This directory tree contains **many tools** and is organized in | [asm-11](asm-11) | environment for `asm-11` assembler | | [bin](bin) | support scripts and tools | | [bin_xilinx_wrapper](bin_xilinx_wrapper) | wrappers for Xilinx environments | +| [dasm-11](dasm-11) | environment for `dasm-11` disassembler | | [dox](dox) | configuration files for Doxygen | | [exptest](exptest) | configuration files for `ostest` and other expect based tests | | [fx2](fx2) | firmware for Cypress FX2 USB interface | diff --git a/tools/bin/dasm-11 b/tools/bin/dasm-11 new file mode 100755 index 00000000..cf54a36f --- /dev/null +++ b/tools/bin/dasm-11 @@ -0,0 +1,3763 @@ +#!/usr/bin/perl -w +# $Id: dasm-11 1286 2022-08-25 06:53:38Z mueller $ +# SPDX-License-Identifier: GPL-3.0-or-later +# Copyright 2008-2022 by Walter F.J. Mueller +# +# Revision History: +# Date Rev Version Comment +# 2022-08-25 1286 1.4.12 add -I, .:$RETROBASE/tools/dasm-11/lib default path +# 2022-06-09 1246 1.4.11 fix -help, fix -dmode allowed values +# 2019-07-13 1189 1.4.10 drop superfluous exists for $opts +# 2019-05-07 1147 1.4.9 two bugfixes +# 2018-12-18 1089 1.4.8 add and use bailout +# 2013-04-02 503 1.4.7 BUGFIX: correct xor and fpp, now proper rg,gr form +# fix ccops, macro-11 compliant like output +# 2013-04-01 502 1.4.6 allow input from STDIN ('-' as file name) +# 2013-02-23 492 1.4.5 renamed disasm->dasm-11 +# 2010-04-26 284 1.4.4 add error check for GetOptions +# 2009-09-19 239 1.4.3 use %cp.psw for new psw in mov-mov-rti sequences +# 2009-07-04 231 1.4.2 propper from addr in "location not typed '.vect'.." +# 2009-06-20 227 1.4.1 BUGFIX: S### label to 2nd imm/ind now correct; +# BUGFIX: [IN]### autolabel only when no symbolization +# add character symbolization in asci[iz] via @chars +# 2009-06-14 226 1.4 support use=xxx after .type directive; support +# op[12]sym=xxx in null directive; cleanup vect.psw +# handling; support sym mode "."; .ascooo support; +# tag data when target in mov #addr, is typed +# BUGFIX: now correct comment for mov #nnn, +# 2009-06-11 225 1.3.10 support user auto-labels (xx*:) +# 2009-05-31 221 1.3.9 terminator of type*[] lists now word tagged; +# allow trailing ,code in .struct; add .tryret +# 2009-05-24 219 1.3.8 catch asciz tags running over end-of-mem; add --ttlc +# proper labcref handling for pointes in typlabcref() +# 2009-05-09 213 1.3.7 preliminary addition of cis instructions +# 2009-05-02 212 1.3.6 add @data {comstr} attribute -> full string comments +# 2009-04-26 209 1.3.5 fix print_usage(); +# 2009-04-25 208 1.3.4 add vector name to vector setup lcomm +# 2009-04-12 207 1.3.3 add lcomm for all vector setup's +# 2009-04-09 205 1.3.2 no code tag for 0 after mov #0; datsym all Pxxx vars +# add --info to enable -I messages. +# 2009-04-05 204 1.3.1 add lblind option/handl.; add fp11-c maint. opcodes +# scomm non 1170 opcodes; reformat scomm's; +# add .patch +# 2009-04-04 203 1.3 don't follow NULL prt for *; add .code!; +# code tag .vect handler; add anoemt option/handling +# don't emitt unused gsym's; add lblimm option/handl. +# don't V label catcher setup; add .susp option +# 2009-03-29 202 1.2.6 add {anno} attributes; handle %symset of 0 correctly +# 2009-03-27 201 1.2.5 correct usage of symchr option +# 2009-03-22 200 1.2.4 add forgotten $dsc->{pc_seq} to fpp instructions +# handle mov #nnn,pc; handle sob labels +# annotate fpp instructions +# 2008-07-13 158 1.2.3 fix jmp@xxx and jsr rx,@xxx; add label upgrades; +# implement cref output +# 2008-07-11 157 1.2.2 added .enabl/.dsabl support (sym***,lbliot); +# support use= attribute, use symset's in symbolize +# 2008-07-04 156 1.2.1 added dmp.gz support; add scomm for asci pointers +# 2008-06-29 155 1.2 Many improvements (new typespec system,...) +# 2008-06-22 154 1.1 Many improvements (labels, symsets, ....) +# 2008-06-18 153 1.0 Initial version +# +# Format of 'das' DisAssember Steering file: +# +# # das comment (not visible in output) +# @ {read nested das file} +# .symbol = +# .symset = +# .struct {defines a structure} +# .params (iot|bpt) +# .params (trap|emt) ooo[:ooo] +# ; line comment, will preceed the next statement +# oooooo : [label:] directive [;comment] +# +# with +# directives +# --> just set label for location and/or comment +# +# .params --> params for jsr at oooooo +# +# .enabl [] +# .dsabl [] +# with +# symchr --> convert byte immediates -> #'x if ascii char +# symimm ooo --> convert word immediates -> #label if match and >ooo +# symind ooo --> convert index -> label if match and >ooo +# lbliot ooo --> auto label and scomm iot statements (start with ooo) +# anoemt ooo --> annotate emt instructions +# lblimm --> auto-create label for an immediate value +# lblind --> auto-create label for an index value +# +# .byte --> byte +# .ascii n --> .ascii /.../ +# .asciz --> .asciz /.../ +# .ascooo --> .ascii /.../ up to ooo terminator +# .code --> start of code sequence +# .vect --> interrupt/trap vector +# . +# .params +# .susp