主题:[讨论]汇编产生的 ".map"文件
下面是我的源文件汇编产生的 ".map"文件:
LINK : warning L4021: no stack segment
Start Stop Length Name Class
00000H 00009H 0000AH DATA
00010H 00062H 00053H CODE
Program entry point at 0001:0000
其中Length代表代码段或数据段的长度,但Start和Stop是代表什么呢?
我通过查看“.lst”文件,觉得map文件里的Start和Stop很难理解。
下面是“.lst”文件:
1 0000 data segment
2 0000 000C x dw 12
3 0002 0018 y dw 24
4 0004 0020 z dw 32
5 0006 0028 k dw 40
6 0008 0030 v dw 48
7 000A data ends
8
9 0000 code segment
10 assume cs:code,ds:data
11 0000 start:
12 0000 1E push ds
13 0001 2B C0 sub ax,ax
14 0003 50 push ax
15 0004 50 push ax
16 0005 B8 ---- R mov ax,data
17 0008 8E D8 mov ds,ax
18
19 000A B8 1000 mov ax,1000h
20 000D A3 0000 R mov x,ax
21 0010 B8 0020 mov ax,20h
22 0013 A3 0002 R mov y,ax
23 0016 B8 5000 mov ax,5000h
24 0019 A3 0004 R mov z,ax
25 001C B8 000B mov ax,11
26 001F A3 0008 R mov v,ax
27 0022 B8 1000 mov ax,1000h
28 0025 A3 0006 R mov k,ax
29
30 0028 A1 0000 R mov ax,x
31 002B F7 2E 0002 R imul y
32 002F 8B C8 mov cx,ax
33 0031 8B DA mov bx,dx
34 0033 B8 1000 mov ax,1000h
35 0036 99 cwd
36 0037 03 C8 add cx,ax
37 0039 13 DA adc bx,dx
38 003B A1 0004 R mov ax,z
39 003E 99 cwd
40 003F 2B C8 sub cx,ax
41 0041 83 DB 00 sbb bx,0
42 0044 8B D3 mov dx,bx
43 0046 8B C1 mov ax,cx
44 0048 F7 3E 0006 R idiv k
45 004C 8B D8 mov bx,ax
46 004E A3 0008 R mov v,ax
47 0051 58 pop ax
48 0052 58 pop ax
49 0053 code ends
50 end start
LINK : warning L4021: no stack segment
Start Stop Length Name Class
00000H 00009H 0000AH DATA
00010H 00062H 00053H CODE
Program entry point at 0001:0000
其中Length代表代码段或数据段的长度,但Start和Stop是代表什么呢?
我通过查看“.lst”文件,觉得map文件里的Start和Stop很难理解。
下面是“.lst”文件:
1 0000 data segment
2 0000 000C x dw 12
3 0002 0018 y dw 24
4 0004 0020 z dw 32
5 0006 0028 k dw 40
6 0008 0030 v dw 48
7 000A data ends
8
9 0000 code segment
10 assume cs:code,ds:data
11 0000 start:
12 0000 1E push ds
13 0001 2B C0 sub ax,ax
14 0003 50 push ax
15 0004 50 push ax
16 0005 B8 ---- R mov ax,data
17 0008 8E D8 mov ds,ax
18
19 000A B8 1000 mov ax,1000h
20 000D A3 0000 R mov x,ax
21 0010 B8 0020 mov ax,20h
22 0013 A3 0002 R mov y,ax
23 0016 B8 5000 mov ax,5000h
24 0019 A3 0004 R mov z,ax
25 001C B8 000B mov ax,11
26 001F A3 0008 R mov v,ax
27 0022 B8 1000 mov ax,1000h
28 0025 A3 0006 R mov k,ax
29
30 0028 A1 0000 R mov ax,x
31 002B F7 2E 0002 R imul y
32 002F 8B C8 mov cx,ax
33 0031 8B DA mov bx,dx
34 0033 B8 1000 mov ax,1000h
35 0036 99 cwd
36 0037 03 C8 add cx,ax
37 0039 13 DA adc bx,dx
38 003B A1 0004 R mov ax,z
39 003E 99 cwd
40 003F 2B C8 sub cx,ax
41 0041 83 DB 00 sbb bx,0
42 0044 8B D3 mov dx,bx
43 0046 8B C1 mov ax,cx
44 0048 F7 3E 0006 R idiv k
45 004C 8B D8 mov bx,ax
46 004E A3 0008 R mov v,ax
47 0051 58 pop ax
48 0052 58 pop ax
49 0053 code ends
50 end start