Print the ASCII and ANSI characters that the SI and DI registers are pointing to during a step command.
Example:
-d SI-1,SI+4 ; SI points to String (1st Byte = "O"), in this example the String has the value WOMAN
216D:0000 - 57 4F WO
216D:0010 4D 41 4E 24 - MAN$
-d SI-1,DI+4 ; DI points to String (1st Byte = "U"), which is HUMAN
216D:0010 48 55 4D 41-4E 24 HUMAN$
-
Thus, a step should look like this. The ASCII value is printed in brackets,
showing, that this is the value SI is pointing to, not its address.
-t
AX=0001 BX=0006 CX=0006 DX=0014 SP=0080 BP=0000 SI=000F DI=0015 SI=(O) DI=(U)
DS=216D ES=216D SS=2173 CS=2168 IP=002F 0_ D_ I1 S_ Z_ A_ P_ C_
2168:002F A6 cmpsb
-
You can also use quotation marks instead of brackets:
-t
AX=0001 BX=0006 CX=0006 DX=0014 SP=0080 BP=0000 SI=000F DI=0015 SI="O" DI="U"
DS=216D ES=216D SS=2173 CS=2168 IP=002F 0_ D_ I1 S_ Z_ A_ P_ C_
2168:002F A6 cmpsb
-
In the case, SI is pointing to a none printable ASCII symbol like "carriage return" (CR) and DI to an "escape" (ESC) symbol.
Then the symbol name from the ASCII table (that is shown by command dt in LDEBUG) should be printed without brackets or quotation marks.
In this case this is necessary because of the lack of space on the edge of the 80 character line.
But in this case, it is also clear, that SI=CR doesn't mean, that SI is pointing to
an address called CR, because an address called CR does not exist.
Example for SI is point to a carriage return and DI to escape:
-t
AX=0001 BX=0006 CX=0006 DX=0014 SP=0080 BP=0000 SI=000F DI=0015 SI=CR DI=ESC
DS=216D ES=216D SS=2173 CS=2168 IP=002F 0_ D_ I1 S_ Z_ A_ P_ C_
2168:002F A6 cmpsb
-
As an alternative you could also print the values only in brackets without
the equal sign.
-t
AX=0001 BX=0006 CX=0006 DX=0014 SP=0080 BP=0000 SI=000F DI=0015 SI(CR) DI(ESC)
DS=216D ES=216D SS=2173 CS=2168 IP=002F 0_ D_ I1 S_ Z_ A_ P_ C_
2168:002F A6 cmpsb
-
Added as the Extension for lDebug called rdumpidx.eld in yesterday's build. You can install it using
ext rdumpidx.eld installand then in a 16-bit, Real/Virtual 86 Mode, non-40-column register dump the ELD will insert the desired display. The SI= display usesbyte [ds:si]while DI= usesbyte [es:di]. For printable ASCII single quote marks are used, except when the content is a single quote mark. Otherwise the DT command's table is used for the two-letter or three-letter name, no quote marks.For now, this only displays "top" for bytes >= 128. Do you want an option to change this?