README-DDT

From NDWiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

DDT

  • DEBUGGING.
  • DISASSEMBLY.
  • TRACING.

Functions to help debug and develop the nd100em has been included in its functionality. This document will try describe how each of those subsystems work/dump info and possibly postprocessing of that and tools needed.

DEBUGGING

If you set debug=1 in the config file, nd100em will produce a file called debug.log, where simple information can be dumped out from any routines that need to.

DISASSEMBLY

Tracing disassembler

If you set disasm=1 in the config file, nd100em will internally build a structure of the running program, so basically it also becomes a tracing disassembler. It tracks if an address is used as data or code, and tags it accordingly. At the end of program execution, it will dump this structure into a disassembly file, with extra comments containing things like what address accessed a data word, labels relative jumps etc. It currently can only handle code without paging active.

Output is: <addr> <word> <possible label> <code|UNKN:|DATA:> <comment>

comment field can be:

  • From what address was this data accessed
  • Alternative interpretion as code instead of data
  • To what label this jump goes, note: only tracks first jump

Some examples of how it might look are:

005072    044003          UNKN: 'H'          % LDA 3
005073    174375          UNKN:           % BSET ONE 170 DA
005074    146142          UNKN: 'b'          % RADD CLD SL DP
005075    000000          DATA:                                 % 004773 005020 004773 
005076    170420    L00004 SAA 20                          
005077    164303          IOX 303                         
005100    164313          IOX 313                         
005101    164403          IOX 403                         
005102    164413          IOX 413                         
005103    164433          IOX 433                         
005104    044005          LDA 5                           
005105    164303          IOX 303                         
005106    164313          IOX 313                         
005107    164403          IOX 403                         
005110    146142          RADD CLD SL DP                  % L00005 
005111    144004          DATA:                                 % 005104 004703 004714 
005112    000001          DATA:                                 % 000377 005113 

and:

000340    020040          DATA: ' '' '                          % 004476 004504 
000341    047125          DATA: 'N''U'                          % 004476 004504 
000342    046502          DATA: 'M''B'                          % 004476 004504 
000343    042522          DATA: 'E''R'                          % 004476 004504 
000344    051440          DATA: 'S'' '                          % 004476 004504 
000345    035040          DATA: ':'' '                          % 004476 004504 
000346    023400          DATA: '''                             % 004476 
000347    006412          UNKN:           % STA ,X ,B 12
000350    044523          UNKN: 'I''S'          % LDA ,B 123
000351    020111          UNKN: ' ''I'          % STD 111
000352    052040          UNKN: 'T'' '          % LDT ,X 40
000353    040440          UNKN: 'A'' '          % MIN ,B 40
000354    047055          UNKN: 'N''-'          % LDA I ,X 55
000355    030460          UNKN: '1''0'          % STF ,B 60

TRACING

In flux at the moment, so this will be documented later more accurately.