The assembler uses the symbols and abbreviations shown in Table C.2 to indicate addresses that need to be resolved by the linker or values that were generated in a special way. The example in this section illustrates many of these symbols. The numbers in column one correspond to the location of this symbol in the sample listing file.
The listing file was produced using “List-Generated Instructions” from PWB (or using /Fl /Sg from the command line).
Table C.2 Symbols and Abbreviations in Listings
Label | Character | Meaning |
1 | C | Line from include file |
2 | = | EQU or equal-sign (=) directive |
3 | nn[xx] | DUP expression: nn copies of the value xx |
4 | ---- | Segment/group address (linker must resolve) |
4 | R | Relocatable address (linker must resolve) |
4 | * | Assembler-generated code |
5 | E | External address (linker must resolve) |
6 | n | Macro-expansion nesting level (+ if more than 9) |
7 | | | Operator size override |
8 | & | Address size override |
9 | nn: | Segment override in statement |
<169> | nn/ | REP or LOCK prefix instruction |
The sample listing file also shows the size of structures and unions in the first column.
Microsoft (R) Macro Assembler Version 6.00 Nov 13 01:27:05 1990
listtst.asm Page 1 - 1
Summary: 1 2
.MODEL small, c
.386
.DOSSEG
.STACK 256
INCLUDE dos.mac
C StrDef MACRO name1, text
C name1 BYTE &text
C BYTE 13d, 10d
C l&name1 EQU LENGTHOF name1
C ENDM
C
C Display MACRO string
C mov ah, 09h
C mov dx, OFFSET string
C int 21h
C ENDM
C
= 0020 num EQU 20h
COLOR RECORD b:1, r:3=1, i:1=1, f:3=7
= 35 value TEXTEQU %3 + num
= 32 tnum TEXTEQU %num
= 04 strpos TEXTEQU @InStr( , <person>, son> )
PutStr PROTO pMsg:PTR BYTE
0004 DATE STRUCT
0000 05 month BYTE 5
0001 07 day BYTE 7
0002 07C3 year WORD 1987
DATE ENDS
0002 U1 UNION
0000 0028 fsize WORD 40
bsize BYTE 60
U1 ENDS
0000 .DATA
Summary: 3
0000 00000000 ddData DWORD ?
0004 1F text COLOR <>
0005 09 16 07C3 today DATE <9,22,1987>
0009 00 flag BYTE 0
000A 001E [ buffer WORD 30 DUP (0)
0000
]
StrDef ending, "Finished."
0046 46 69 6E 69 73 68 1 ending BYTE "Finished."
65 64 2E
004F 0D 0A 1 BYTE 13d, 10d
= 0009 1 lending EQU LENGTHOF ending
0051 54 68 69 73 20 69 Msg BYTE "This is a string","0"
73 20 61 20 73 74
72 69 6E 67 30
float TYPEDEF REAL4
FPBYTE TYPEDEF FAR PTR BYTE
0062 ---- 0051 R FPMSG FPBYTE Msg
PBYTE TYPEDEF PTR BYTE
NPWORD TYPEDEF NEAR PTR WORD
PVOID TYPEDEF PTR
PPBYTE TYPEDEF PTR PBYTE
Summary: 4
0000 .CODE
.STARTUP
0000 B8 ---- R * mov ax, DGROUP
0003 8E D8 * mov ds, ax
0005 8C D3 * mov bx, ss
0007 2B D8 * sub bx, ax
0009 C1 E3 04 * shl bx, 004h
000C 8E D0 * mov ss, ax
000E 03 E3 * add sp, bx
Summary: 5
EXTERNDEF work:NEAR
0010 E8 0000 E call work
Summary: 6
Display ending
0013 B4 09 1 mov ah, 09h
0015 BA 0046 R 1 mov dx, OFFSET ending
0018 CD 21 1 int 21h
Summary: 7 8
001A 66| A1 0000 R mov eax, ddData
001E 67& FE 03 inc BYTE PTR [ebx]
INVOKE PutStr, ADDR msg
0021 B8 0051 R * lea ax, DGROUP:Msg
0024 50 * push ax
0025 E8 0042 R * call PutStr
0028 83 C4 02 * add sp, 00002h
Summary: 9 <169>
002B B8 ---- R mov ax, @data
002E 8E C0 mov es, ax
0030 B8 0063 mov ax, 'c'
0033 26: 8B 0E 0020 mov cx, es:num
0038 BF 0052 mov di, 82
003B F2/ AE repne scasb
003D 57 push di
.EXIT
003E B4 4C * mov ah, 04Ch
0040 CD 21 * int 021h
0042 PutStr PROC pMsg:PTR BYTE
0042 55 * push bp
0043 8B EC * mov bp, sp
0045 B4 02 mov ah, 02H
0047 8B 7E 04 mov di, pMsg
004A 8A 15 mov dl, [di]
mov ax, [dx][di]
isttst.asm(71): error A2031: must be index or base register
.WHILE (dl)
004C EB 10 * jmp @C0001
004E *@C0002:
004E CD 21 int 21h
0050 47 inc di
0051 8A 15 mov dl, [di]
.ENDW
0053 *@C0001:
0053 0A D2 * or dl, dl
0055 75 02 * jne @C0002
ret
0057 5D * pop bp
0058 C3 * ret 00000h
0059 PutStr ENDP
END