mShow MACRO itsName:REQ, format:=<HIN>   (Not covered in the 4th edition)

   Displays a register or variable name, an equals sign (=), followed by the contents of the register or variable.
   The contents may be displayed in any combination of hexadecimal, signed decimal, unsigned decimal, or binary.

Parameters:

   itsName can be an 8-bit, 16-bit, or 32-bit register name or memory operand containing an integer.
   If a memory operand is used, it can be any of the standard operand types.
   Each type is listed next, followed by an example:

   format is a string containing zero or more of the following format specifiers, which may appear in any order:

Examples:

.data
bValue BYTE  -2
wValue WORD  -1,3,5
dValue DWORD 10h,11h

.code
main PROC

    mShow dValue               ;Default format HIN.

;Output:  dValue = 00000010h  +16d

    mShow wValue,DIHBN         ;One variable, all formats.

;Output:  wValue = 65535d  -1d  FFFFh  1111 1111 1111 1111b

    mShow bValue,h             ;3 variables on same line.
    mShow wValue,h
    mShow dValue,hn

;Output:  bValue = FEh    wValue = FFFFh    dValue = 00000010h

    mov   bx,-2
    mShow bx                   ;Register operand.

;Output:  bx = FFFEh  -2d

    mShow [dValue+4],hn        ;Direct + Offset.

;Output:  [dValue+4] = 00000011h

    mov   ebx,OFFSET wValue
    mShow WORD PTR [ebx],hn    ;Indirect.

;Output:  WORD PTR [ebx] = FFFFh

    mov   esi,2
    mShow wValue[esi],hn       ;Indexed.

;Output:  wValue[esi] = 0003h

    mShow WORD PTR [ebx + esi] ;Base-indexed.

;Output:  WORD PTR [ebx + esi] = 0003h  +3d

    mov   esi,2
    mov   ebx,2
    mShow wValue[ebx + esi]    ;Base-indexed-displacement.

;Output:  wValue[ebx + esi] = 0005h  +5d

    mov   esi,1
    mShow wValue[ebx + esi*TYPE wValue] ;Base-scaled index-displacement.

;Output:  wValue[ebx + esi*TYPE wValue] = 0005h  +5d

Dependencies:

Converted from CHM to HTML with chm2web Pro 2.85 (unicode)