• Aucun résultat trouvé

TRACE = INSTRUCTION

Dans le document OPER~TING INSTRUCTIONS FOR ISIS-II USERS (Page 137-146)

Set GO-Register (GR) Command

TRACE = INSTRUCTION

To display an entry from the buffer, move the pointer to the desired entry and enter a PRINT command. However, it is not necessary to move the pointer if you use a PRINT ALL or PRINT -decimal command.

Moving the Buffer Pointer

The pointer movement commands are MOVE, OLDEST, and NEWEST.

The command OLDEST (followed by carriage return) moves the pointer to the top of the buffer, in any trace display mode. The NEWEST command moves the pointer to the bottom of the buffer (i.e., after the last instruction or frame).

"Top" refers to the oldest trace data, "bottom" refers to the newest trace data.

Emulation and Trace Control Commands

6-24

The MOVE command has the following form:

MOVE

[[+ :: -] decimal]

The meta-term decimal means any numeric quantity; if no explicit input-radix is given, the ICE-88 emulator assumes decimal radix. The value of decimal is the number of entries between the current pointer position and the desired position.

Movement in a plus (+) direction is toward the bottom (newest point) of the buffer; if neither (+) nor (-) is entered, a forward movement is assumed as the default. Movement in a minus (-) direction is toward the top (oldest point) of the buffer. The size of the move does not count the entry under the pointer when the MOVE command is given.

For example, assuming FRAME mode, if the pointer is pointing at frame 100 and you issue the command "MOVE 10", the pointer is moved to point to frame 110. Under the same initial conditions, if you issue the command "MOVE -10", the pointer is moved to point to frame 90. If decimal-number is larger than the number of entries between the current pointer location and the bottom (for

" +") or top (for "-"), the pointer is moved only to the bottom or top, respec-tively. In short, you cannot move the pointer outside the range of buffer loca-tions.

If the MOVE command has no number following it, "MOVE 1" is executed.

The trace display mode in effect controls the size of each move. Under FRAME mode, the command MOVE 10 moves down ten frames; under instruction, the same command moves down ten instructions.

Displaying Trace Data

The PRINT command displays one or more entries from the buffer. This command has the form:

PRINT [[

+ :: -]

decimal]: :PRINT ALL

With (+ ) or no sign, decimal entries lower (toward the bottom) than the current pointer position are displayed. With (-), decimal entries above (toward the top) the current pointer position are displayed. The command PRINT without a decimal modifier is equivalent to PRINT 1 (one entry is displayed).

The PRINT command displays the number of entries requested, then moves the pointer to point to the next entry just past the last one displayed. As an illustra-tion, the commands:

OLDEST

PRINT 10 PRINT 10

are equivalent to the commands

OLDEST

PRINT20

The command PRINT ALL displays the entire trace buffer; PRINT ALL is equivalent to the commands:

OLDEST

PRINT1023

ICE-88

ICE-88 Emulation and Trace Control Commands

TRACE Display Formats

Display of Trace Data in Frames Mode

The display has one frame per line. The header at the top of display has the follow-ing format (one line of display shown also):

FRAME ADDR STS OSTS ODEPTH DMUX MARK

0000: 0002CH F N 0 A 0

How to interpret the Frames mode display:

Header entry Meaning

FRAME Frame number; decimal number from 0000 to 1022. The colon separates the frame number from the next entry (ADDR).

ADDR The 20-bit address in Hexadecimal radix (five digits plus suffix H) when DMUX = A (address frame). When DMUX = D (data frame), the last 2 digits (8 bits) of this number are data, and the first digit is status: S6, S5, S4, S3 (MSB to LSB). Bits S4 and S3 are the segment register used in effective address calculation:

S4 S3 Segment Register

0 0 ES

0 1 SS

1 0 CS or none

1 1 DS

STS A one-character display of processor action, as follows:

QSTS

Queue status; a one-character display, as follows:

E Empty the queue

F First byte of opcode executed out of queue N Nothing coming out of queue

S Subsequent byte of opcode executed out of queue Number of bytes in queue (decimal number). Valid on ADDR frames only (DMUX = A).

Type of frame; a one-character display as follows:

A Address

Emulation and Trace Control Commands

6-26

Display of Trace Data in Instructions Mode

The display shows the disassembled instruction mnemonic and any operands, and any succeeding cycles. Each instruction combines several frames of trace data.

Machine cycles after the instruction fetch are displayed four cycles per display line, using as many lines as necessary.

First, we discuss the header and the instruction display. Display of cycles is discussed later on. The headers apply to the first line of the display entry-the line with the frame numbers. The Instructions mode header has the following format (two instructions are also shown):

FRAME ADDR PREFIX MNEMONIC OPERANDS COMMENTS

0006: 000E7H DEC CL

0010: 000E9H MOV WORD PTR [0101 H],BX

00101 H-W- 2CH-DS 00102H-W- OOH-DS

Header entry Meaning

FRAME The (decimal) number of the frame where the first byte (or prefix) of the instruction came out of the 8088 execution queue.

ADDR Address of first byte (or prefix) of instruction; 20-bit number in Hexadecimal radix (five Hex digits plus suffix H).

PREFIX Prefix other than segment-override (LOCK, REPE, REPNE) if specified in assembly language else blank.

MNEMONIC MCS-86 assembler mnemonic for the instruction.

OPERANDS Zero, one, or two operands separated by commas. The formats for the operand fields are discussed below.

COMMENTS The word ";SHORT" for a JMP or CALL instruction to an address within the same segment of field bytes that contains the instruction's address, or the word ";LONG" for a branch to a different segment, or the characters ";?" for an opcode value that does not correspond to a valid instruction.

Operand fields

1. Registers: the MCS-86 register identifiers are displayed:

RAL,RAH,RBL,RBH,RCL,RCH,RDL,RDH, RAX, RBX, RCX, RDX

Example (comments field omitted):

FRAME ADDR PREFIX MNEMONIC OPERANDS

0003: 00206H MOV AL,BYTE PTR [OOOOH)

00200H-R- 34H-DS

2. Memory operands have the following display format:

[ {

CS}] {BYTE} [ ' { B X } '

J [

'{DI}'

J[ '{XXXXH} , J

OS: WORD PTR [ BP) [ S I ) [ )

ES DWORD +xxH

SS ? -xxH

ICE-88

ICE-88 Emulation and Trace Control Commands

Example: the display ES:BYTE PTR [BX] [SI] [+OIH]

represents the operand BYTE ES :(BX + SI + 1) More examples showing memory operand display.

FRAME ADDR PREFIX MNEMONIC OPERANDS

0000: FF380H ADD ES:BYTE PTR [BX] [SI], AL 0025: FF480H ADD ES:BYTE PTR [BX] [SI] [+01H], AL 0050: FF580H MOV AL, BYTE PTR [0001 H]

Notes on the memory operand format:

• The first field is the segment register field. It is only displayed if the instruction has a segment-override prefix.

• In the second field, an entry"? PTR" means that the type of the pointer cannot be determined from the context.

Example: LEA AX,? PTR [34AOH]

• The base register (BX, BP) and index register (DI, SI) fields are not displayed for direct memory operands. When these fields are displayed, they are enclosed in brackets (shown as "[" and "]" in the format given earlier).

• The last field is either a 16-bit unsigned (word) number, or a signed 8-bit (byte) number. The entry is displayed enclosed in brackets.

• At least one of the last three fields (base register, index register, number) is displayed for any memory operand.

3. Immediate data is displayed as a byte or word number, without brackets.

Example:

FRAME ADDR PREFIX MNEMONIC OPERANDS 0932: FF391 H TEST AL, 07H

4. Labels for the JUMP and CALL instructions:

-Within 128 bytes of current address-$ ± xxH Example:

0934: FF393H JE $-06H

-Within same 64K segment as current address-$ +xxxxH Example:

0000: FFOOOH JMP $+1005H -To a different segment-base:dispJacement Example:

0978: FFFFOH JMP FFOO:0096H

Note: the first two labels represent "SHORT" (intra-segment) branches, the third is a "LONG" (inter-segment) branch.

Display of Cycles in Instruction Mode. After the instruction mnemonic and operands are displayed, the display shows succeeding cycles performed by the current instruction. Four cycles are shown per line of display; the display uses as many lines as needed to show all cycles.

Emulation and Trace Control Commands

6-28

The general format for cycles display is:

address-status-data-segment

Examples:

-Read/Write:

12345H-R- 34H-DS 45100H-W-70H-SS

(8-bit read of data 34H from address 12345H using OS) (8-bit write of data 70H to address 45100H using SS)

-Input/Output: (no segment register; 16-bit address)

F FO 0 H -1-01 H (8-bit input of data 01 H from port FFOOH) FFDAH-O-34H (8-bit output of data 34H to port FFDAH)

-Interrupt Acknowledge: no address field, "A" for "acknowledge" status, 8-bit interrupt type.

Example:

FRAME ADDR PREFIX MNEMONIC OPERANDS COMMENTS

0971: FF391H TEST AL,07H

0977: FF393H JE $-06H ; SHORT

0986: FF38DH MOV DX,FFEAH

0995: FF390H IN AL,DX

FFEAH-I- OOH A- FFH

A- FFH 003FCH-R- OH-CS 003FDH-R- OOH-CS 003FEH-R- FFH-CS 003FFH-R- FFH-CS OOOBAH-W- 46H-SS OOOBBH-W- F2H-SS OOOBCH-W- OOH-SS OOOB9H-W- FFH-SS

Note that:

a. The I cycle is part of the IN instruction; the rest of the cycles are the interrupt.

b. The "A" cycle is traced twice; ignore the first one.

c. Interrupt is type OFFH

d. The five cycles after the "A" cycle are as follows:

- Read IP of interrupt vector -Read CS of interrupt vector - Write flags to stack

- Write old CS to stack -Write old IP to stack

- Fetch cycles do not appear as cycles; they are used to display the opcode mnemonic and operands.

- Halt cycles never appear as cycles; they appear as the mnenonic HL T.

Gaps in Trace in Instruction Mode. In Instruction mode, a gap in trace data is shown as three asterisks (***). A gap in trace is produced by tracepoints or by buffer overflow.

A gap in trace data also is reflected by a MARK

=

1 in Frames mode.

ICE-88

ICE-88 Emulation and Trace Control Commands

Extended Example of Trace Displays

The following example (from SDK-86 Monitor) shows most of the features of trace displays discussed in this section.

*ONTRACE=FFOO:96

*ENABLE TRACE CONDITIONALLY NOW ON

*GO TILL FFOO:9F EXECUTED

FRAME ADDR PREFIX MNEMONIC OPERANDS COMMENTS

0876: FF390H IN AL,DX

*;TRACE TURNED OFF AT FFFF:O, BACK ON AT FFOO:96, BREAK AT FFOO:9F

*BRO

Emulation and Trace Control Commands ICE-88

1014: FFOA1H F N 1 A 0

1015: 2FOA9H F S 1 Q 0

1016: 2F02EH F N 1 0 0

1017: FFOA2H F N 1 A 0

1018: 2F08EH F N 2 0 0

1019: FFOA3H F N 2 A 0

1020: 2F01 EH F N 3 0 0

6-30

ICE-88 Emulation and Trace Control Commands

Set TRACE Display Mode Command

TRACE =

I

FRAME INSTRUCTION

I

Examples:

TRACE

=

FRAM E TRACE = INSTRUCTION

TRACE FRAME

INSTRUCTION

A command keyword indicating that the mode of display for trace data is to be set.

A function keyword indicating that data in the trace buffer is to be displayed frame by frame.

A function keyword indicating that data in the trace buffer is to be displayed by instruction. Each instruc-tion is equivalent to one or more machine cycles.

In the FRAME mode, trace data is displayed one frame per line, with fields for frame number, address/data, bus status, queue status, queue depth, type of frame (address, data or queue) and start/stop trace marker.

In the INSTRUCTION mode, trace is disassembled with instructions appearing as 8086 assembler mnemonics. All other cycle data other than instruction fetches, the address, status and data of the cycle are displayed. Memory fetches into the execution queue and queue activity are not shown explicitly. Instead, they are us-ed to find the instruction bytes that were executus-ed when the instruction is taken from the queue. Whenever it is impossible to disassemble frames, immediately before or after a frame with the START/STOP trace marker set, the gap is in-dicated by a line containing three asterisks ("***"). In either mode, status ap-pears as "F," "R," "W," "I," "0," "H," or "A" corresponding to the match status(es) set in the tracepoint register, and "addresses are displayed as 20-bit numbers is the displacement of the address from that base.

Emulation and Trace Control Commands

6-32

Dans le document OPER~TING INSTRUCTIONS FOR ISIS-II USERS (Page 137-146)