[net.micro.pc] DEBUG - A Cheat Sheet

hes@ecsvax.UUCP (Henry Schaffer) (12/26/85)

<>I use the DEBUG program at widely enough spaced intervals that I don't
remember all the details of the commands, and the Quick Reference Card
supplied by IBM (in the Ver 2.10 manual) doesn't have enough information
to keep me going.  I do use DEBUG enough that looking stuff up has become
a bit of a pain, and so I wrote up a cheat sheet (uh, ... make that a
Reference Card) that has what I need on it.
  
  I am submitting it to the net because it might help others, and because
I hope that any errors or omissions will be brought (gently) to my
attention, and so I will have a more useful reference.

--henry schaffer
-------------------------------------------------------------------------

		    DEBUG SUMMARY    ver 0.3	H. E. Schaffer 	12/85
							n c state univ
    INVOCATION:   DEBUG [filespec] [parm1] [parm2]

		    COMMAND SUMMARY

   Name 	  Format	     Comments - (default register(s))

Assemble	A[address]	Default: starts at 100

Compare 	C range address For ending address in range, use offset only.
				(DS)

Dump		D[{address|range}] Default: Starts at 100 or after previous D.
					    (DS)

Enter		E address [list]  With no list enter 1-2 hex chars after prompt;
				space bar to advance, - to back up,
				Enter key to end command. (DS)

Fill		F range list	Reuses list if list shorter than range. (DS)

Go		G[=address] [address[address...]]    Up to 10 breakpoints.

Hexarithmetic	H value value

Input		I portaddress		Displays byte read.

Load		L[address[drive sector sector]]       (CS)

Move		M range address 		      (DS)

Name		N filespec [filespec]

Output		O portaddress byte

Quit		Q

Register	R [registername]	Default: shows all registers and flags.

Search		S range list			      (DS)

Trace		T[=address][value]	Default: (CS, IP); one instruction.

Unassemble	U[{address|range}]	Default: starts at 100 or after last U.
					Will complete last instruction. (CS)

Write		W[address[drive sector sector]]  BX, CX have no. of bytes (CS)
						     ^low order
			     Notes

Commands are case insensitive, given after the DEBUG "-" prompt.

Ctrl-Break to end a command.

Ctrl-Num Lock for No-Scroll (any other char to restart).


			PARAMETER DEFINITIONS

address 	[{seg reg|seg addr}:] offset

byte		1-2 hex chars

drive		single digit  0 for A, 1 for B, etc.	    see Load, Write

filespec	[drive:][path]filename[.ext]		    see Name

hex char	0 through 9, A through F  (case insensitive)

list		{byte|string} ...

port address	value					    see Input, Output

range		address{{ |,}address | L value}
			     ^offset	 ^for 10000 use 0
			      only

registername	AX BX CX DX SP BP SI DI DS ES  (case	    see Register
		SS CS IP PC F		       insensitive)

sector sector	really sector sectors(involved) 	    see Load, Write
		       ^value ^value (values 1-3 hex chars)

string		char(s) in single or double quotes
		can use opposite type within the other
		to use same type within - double it

value		1-4 hex chars

			Notes

Commands and parameters may be delimited.  Consecutive hex values
must be separated by a delimiter.

[   ]	item(s) enclosed are optional

{ | }	choose one of the items

...	repetition of the previous item allowed