Converted from .HLP to .HTML by HLPTOHTML.

snoopy .HLP

LIST_OF_COMMANDS

 The individual edit commands are listed below:
 BKhhh ........ Set a breakpoint at PM address "hhh".
                "hhh" is a word address, and must not be 0.

CBhhh ........ Cancel a breakpoint at PM address "hhh".

CShhhhhhhh ... Examine and/or Deposit into CSR space. "hhhhhhhh" is a WORD address - default=0.

DMhhhhhhhh ... Examine and/or Deposit into Data memory. "hhhhhhhh" is a BYTE address - default=0.

DShhhhhhhh ... Examine and/or Deposit into Data space. "hhhhhhhh" is a WORD address - default=0.

PMhhh ........ Examine and/or Deposit into Program memory. "hhh" is a WORD address - default=0.

SPhhhhhhhh ... Search for pattern "hhhhhhhh" in Program memory, or SPhhhhhhhh ... Search for pattern "hhhhhhhh" in Program memory, or

SDhhhhhh ..... Search for pattern "hhhhhh" in Data memory or SDhhhhhh ..... Search for pattern "hhhhhh" in Data memory or

SB............ Show all breakpoints

PR............ Proceed from a breakpoint

QU ........... Exit from Edit mode.

ST............ Step from a breakpoint

GO ........... Start processor as it is.

GOhhh ........ Start execution of program at address hhh. Program counter field in DM0 is overwritten. "hhh" is a WORD address and NOT 0.

SH ........... Display contents of PSW and CSR0.

DR ........... Dump and display contents of general registers.

TR ........... Display contents of general registers.

XT ........... Exit from Edit mode.

PM_AND_DM

PM and DM in direct Edit mode - examine and deposit into Program or Data memory respectively.

SNOOPY opens the location defined in the command, prints its contents, and waits for input.

If you don't want to change this value, just enter <CR> and SNOOPY will display the contents of the following location, If you want to modify it, simply enter the new value and terminate by <CR>.

An ASCII character string can be deposited, by preceding the string with a double quote ("), e.g. "ASCI. All lower-case input is converted to upper-case.

The following example illustrates opening a PM location, changing it, and verifying the change:

 
 *PM97<CR>                            (open PM location)
 PM00000097=50D00030 ST  13,48      <CR> (open next)
 PM00000098=58300200 L   3,512      41300000<CR> (change)   
 PM00000099=5930D04C C   3,76(0,13) <CR>(open next)
 PM0000009A=477000AC BC  7,172      PM97<CR> (open PM97)

PM00000097=50D00030 ST 13,48 <CR> (verify) PM00000098=41300000 LA 3,0 <CR> (verify) PM00000099=5930D04C C 3,76(0,13) <CR> (verify)

The following example illustrates opening a DM location, changing it to an ASCII string, and verifying the change:
 *DM200
 $COMMAND   DM00000200=00000200 512 "...." "init<CR> (update)
 $MASTER_ID DM00000204=00000204 516 "...." <CR> (no change)
 $TRIGGER   DM00000208=00000208 520 "...." DM200<CR>(open DM200)

$COMMAND DM00000200= 54494E49 1414090313 "INIT" <CR> (verify)

o When examining Program memory, the contents are displayed in Hexadecimal and as assembly language instructions.

o When examining Data memory, the contents are displayed in hexadecimal, decimal and as ASCII characters.

o If a location cannot be opened for reading, SNOOPY will display "FFFFFFFF".

CS_AND_DS

Examine and deposit into CSR or Data space respectively.

These commands work similarly to PM,DM commands (see above). Valid addresses for CS option (CSR space) are :

 
      CS0 = SSP control and status register ...... R/W
      CS8 = Arbitration level .................... W/O
      CS400000000-CS400000FFF = Program memory ... R/W
      CS800000000-CS80001FFFC = Data memory ...... R/W

NOTE

In the case of the command "CS" where "hhhhhhhh"=0 (examine CSR0), SNOOPY returns to Edit mode immediately after the location has been examined or modified. If you want to modify it, SNOOPY checks if bit RB [=8(hex)] is set, and if it is, prompts you

Bit RB set - replace (Yes/No) ?

The location will be modified ONLY if you answer "Yes" to this prompt.

EDIT_IN_COMMAND_FILE

CS,DS,PM,DM in Indirect Edit mode (i.e. inside a command file)

- Examine or deposit into CSR space, Data space, Program or Data memory.

When in Edit mode inside a command file, you can either read the contents of a location (examine) OR modify it (deposit). Each record contains one single Edit command, which has the following format :

<per> Examine : "CShhhhhh" ===> SNOOPY types CShhhhhh=hhhhhhhh "DShhhhhh" ===> SNOOPY types DShhhhhh=hhhhhhhh "PMhhhhhh" ===> SNOOPY types PMhhhhhh=hhhhhhhh "DMhhhhhh" ===> SNOOPY types DMhhhhhh=hhhhhhhh

Deposit : "CShhhhhh=hhhhhhhh" ===> SNOOPY writes. "DShhhhhh=hhhhhhhh" ===> SNOOPY writes. "PMhhhhhh=hhhhhhhh" ===> SNOOPY writes. "DMhhhhhh=hhhhhhhh" ===> SNOOPY writes.

SNOOPY recognizes that the command is a "write" (deposit) command by looking for the character "=" inside the command line. If this character is not present, then SNOOPY assumes that the command is a "read" (examine) command and displays the contents of the location on the screen.

NOTE

o The same restrictions described in section 5.3 apply to CSR space.

o NO space character is allowed between the "=" sign and the parameter that follows it. If there is one, SNOOPY will write (deposit) "0" into the specified location.

o If a location cannot be opened for reading, SNOOPY will display "FFFFFFFF".

SP,SD_SEARCH_FOR_PATTERN

Search for pattern in Program or Data memory,

e.g. SDFFF* EA0 F00

These commands can be followed by two optional parameters "start_add end_add", which define the zone of memory to be scanned.

The pattern is either

o a hexadecimal number of up to eight digits, which may contain a "*" as a wild-card at either end of the string,

e.g. FFF*, E0, FFFFFFFF, *A43, ababab, *F3*

Note that strings such as AA*B are not supported.

o or a 4-character ASCII string preceded by a double quote (") e.g. "ASCI, "12bg

All lower-case characters are converted to upper-case before the search is begun.

The action of the search command is best illustrated by the following table. The search pattern in column 3 of the table is compared with the memory contents in columns 1 or 2. If the search pattern matches the memory contents, the result is TRUE, a match has been found and the memory location and contents will be output. If the result is FALSE, either the pattern did not match, or an illegal pattern was specified.

         SEARCH FOR PATTERN 
  --------------------------------------------------------
 |  Memory Contents  | Search      |       Result        |
 |                   | for         |                     |
 |   hex     ASCII   | pattern     |                     |
 |-------------------|-------------|---------------------|
 | 544E5645  EVNT    | 544E5645    | TRUE  (exact match) |
 | 544E5645  EVNT    | *E5645      | TRUE  (wildcard)    |
 | 544E5645  EVNT    | 544E*       | TRUE  (wildcard)    |
 | 544E5645  EVNT    | *44E5*      | TRUE  (wildcard)    |
 | 544E5645  EVNT    | "EVNT       | TRUE  (exact match) |
 | 544E5645  EVNT    | "EV*        | FALSE (unsupported) |
 | 544E5645  EVNT    | 544*645     | FALSE (unsupported) |
 | 544E5645  EVNT    | 544XX645    | FALSE (unsupported) |
 | 544E5645  EVNT    | 544         | FALSE (no match)    |
 | 00000034  ....    | 34          | TRUE  (exact match) |
 | 00012345  ....    | 123         | FALSE (no match)    |
  --------------------------------------------------------
 

Examples of the search command are shown below. The carriage returns following each command have been omitted for clarity.

1. Search DM for the ASCII string "INIT" in the range DM100 to DM500

        *SD"init 100 500
                 DM00000200= 54494E49     1414090313 "INIT"      

2. Search DM in the range DM100 to DM500 for hexadecimal numbers whose 3 least significant digits are "E49".

             *SD*e49 100 500
                 DM00000200= 54494E49     1414090313 "INIT"      
                 DM00000260= 4D494E49     1296649801 "INIM"      
                 DM000004A4= 49494E49     1229540937 "INII"      

3. Search PM in the range PM80 to PM90 for a hexadecimal value whose two most significant digits are "58"

sp58* 80 90 PM00000080= 58D00014 L 13,20 PM00000084= 58F000F0 L 15,240 PM0000008C= 5860D084 L 6,132(0,13) PM0000008E= 58C0D048 L 12,72(0,13) PM00000090= 58A0D090 L 10,144(0,13)

4. Search PM in the range PM80 to PM90 for a hexadecimal value whose containing the digits "C0"

               sp*C0* 80 90
                        PM00000088= 41C00634   LA       12,1588         
                        PM0000008B= 98EBC000   LM       14,11,0(12)     
                        PM0000008E= 58C0D048   L        12,72(0,13)     
                        PM0000008F= 50C00268   ST       12,616          
 

SNOOPY decodes the pattern to be searched for, reads the Program or Data memory in blocks of 4096 words, according to the zone of scanning that was specified with the command, and displays all locations that contain a matching value.

When the Program memory is scanned, the instructions that match the pattern are de-assembled and displayed in symbolic form.

By default, the entire memory is scanned. After 4096 words have been scanned, SNOOPY prompts you to ask if you want to continue or return to Edit mode.

NOTE

In the case of a pattern of hexadecimal digits (i.e. one not preceded by a double quote (") ), any non-hexadecimal digit is unacceptable, and such a string is not supported. The following are examples of unacceptable strings:

FF*BE, INIT, FFOEA

However, no error message will indicate that the string is unacceptable. The result will be the same as if the string has not been found.

BREAKPOINTS

The breakpoint utility is designed for debugging programs, and will preserve the registers and PC (program counter). Since there is no single SSP instruction which does this, it is necessary to use three instructions per breakpoint. This leads to complications.

It is possible to set breakpoints and to step through code using SNOOPY, subject to certain restrictions. The breakpoint process works by replacing 3 lines of PM code with breakpoint code, saving the original code in the host. Therefore a listing of the PM obtained when a breakpoint has been set will not show all the original code. When a breakpoint is reached, the processor halts, and a dump of the registers is performed.

The breakpoint commands are:

      BKhhh   set a breakpoint at PMhhh
      CBhhh   cancel a breakpoint at PMhhh
      SB      show all breakpoints
      PR      proceed from a breakpoint
      ST      step from a breakpoint
 

Additional Information on:

GO_START_PROCESSOR

If the command "GO<CR>" is given, the processor is started as it is; SNOOPY assumes that DM0 has been previously loaded with the starting address of the program.

If the command "GOhhhhhh<CR>" is given, SNOOPY overwrites the 12 low bits of DM0, (the Program Counter field), with the specified address and starts the processor.

Then, SNOOPY re-enters the Edit mode.

SH_SHOW

"SH" displays contents of PSW and CSR0. If the processor has halted at a breakpoint (see above) the PM address of the current breakpoint is also displayed, and the original contents of the PM location (i.e. the instruction which the processor will execute after the next step or proceed command is given).

SNOOPY displays on the Terminal (if not halted at a breakpoint)

Show : CSR0 = hhhhhhhh - PSW = hhhhhhhh - Retcod = hhhhhhhh

where CSR0 = Control Status Register (CSR space location 0)

PSW = Processor Status Word = contents of DM0.

Retcod = Contents of DM18 (word location 6). This is the return code value of a program after it has been executed. This parameter has no meaning otherwise.

and re-enters the Edit mode. If the SSP is halted at a breakpoint, SNOOPY will display (for example)

 
      break at  97  50D00030   ST       13,48           
      Show: Retcod=00000000 - PSW=0000809A - CSR0=0106F110
 
Here the SSP is halted at a breakpoint at PM97; the next instruction it will execute (on a step "ST" or proceed "PR" command ) is also shown.

DR_DUMP_REGISTERS

"DR" dumps and displays contents of General registers.

The SSP contains 16 general registers, whose contents are dumped into Data memory locations DM40 through DM7C, (i.e. starting at DM_P_RDUMP in BNLSYS) and then displayed on the Terminal.

Locations PM10-PM11-PM12 are saved, then loaded with the DUMP program, and the processor is started. Then, SNOOPY reads locations DM40 through DM7C and displays them. After having restored the program memory locations, SNOOPY re-enters the Edit mode.

TR_TYPE_REGISTERS

This command is equivalent to the DR command, except that SNOOPY assumes that the contents of the general registers have already been dumped into locations DM40 through DM7C (i.e. starting at DM_P_RDUMP in BNLSYS). It reads these locations, displays them on the Terminal, then re-enters the Edit mode.

XT,QU_EXIT_FROM_EDIT

These commands exit from the SNOOPY editor, and return control to the command mode.