source: trunk/testcase/631asm.asm@ 672

Last change on this file since 672 was 672, checked in by bird, 22 years ago

Inital testcase.

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 2.2 KB
Line 
1 title 631asmc.c
2 .386
3 .387
4CODE32 segment para use32 public 'CODE'
5CODE32 ends
6DATA32 segment para use32 public 'DATA'
7DATA32 ends
8CONST32_RO segment para use32 public 'CONST'
9CONST32_RO ends
10BSS32 segment para use32 public 'BSS'
11BSS32 ends
12DGROUP group BSS32, DATA32
13 assume cs:FLAT, ds:FLAT, ss:FLAT, es:FLAT
14CODE32 segment
15
16; 57 struct ret16bytes _System asmfoo16(void)
17 align 010h
18
19 public asmfoo16
20asmfoo16 proc
21 push ebp
22 mov ebp,esp
23
24; 60 return ret;
25 mov eax,[ebp+08h]; @CBE4
26
27; 59 struct ret16bytes ret = {1,2,3,4};
28 mov dword ptr [ebp-010h],01h; ret
29 mov dword ptr [ebp-0ch],02h; ret
30
31; 60 return ret;
32 mov ecx,[ebp-010h]; ret
33 mov edx,[ebp-0ch]; ret
34 mov [eax],ecx
35
36; 59 struct ret16bytes ret = {1,2,3,4};
37 mov dword ptr [ebp-08h],03h; ret
38
39; 60 return ret;
40 mov [eax+04h],edx
41 mov edx,[ebp-08h]; ret
42
43; 59 struct ret16bytes ret = {1,2,3,4};
44 mov dword ptr [ebp-04h],04h; ret
45
46; 60 return ret;
47 mov ecx,[ebp-04h]; ret
48 mov [eax+08h],edx
49 mov [eax+0ch],ecx
50 pop ebp
51 ret
52asmfoo16 endp
53
54; 51 struct ret12bytes _System asmfoo12(void)
55 align 010h
56
57 public asmfoo12
58asmfoo12 proc
59
60; 54 return ret;
61 mov eax,[esp+04h]; @CBE3
62
63; 53 struct ret12bytes ret = {1,2,3};
64 mov dword ptr [esp-0ch],01h; ret
65 mov dword ptr [esp-08h],02h; ret
66
67; 54 return ret;
68 mov edx,[esp-0ch]; ret
69 mov ecx,[esp-08h]; ret
70 mov [eax],edx
71
72; 53 struct ret12bytes ret = {1,2,3};
73 mov dword ptr [esp-04h],03h; ret
74
75; 54 return ret;
76 mov [eax+04h],ecx
77 mov ecx,[esp-04h]; ret
78 mov [eax+08h],ecx
79 ret
80asmfoo12 endp
81
82; 45 struct ret8bytes _System asmfoo8(void)
83 align 010h
84
85 public asmfoo8
86asmfoo8 proc
87
88; 48 return ret;
89 mov eax,[esp+04h]; @CBE2
90
91; 47 struct ret8bytes ret = {1,2};
92 mov dword ptr [esp-08h],01h; ret
93 mov dword ptr [esp-04h],02h; ret
94
95; 48 return ret;
96 mov edx,[esp-08h]; ret
97 mov ecx,[esp-04h]; ret
98 mov [eax],edx
99 mov [eax+04h],ecx
100 ret
101asmfoo8 endp
102
103; 39 struct ret4bytes _System asmfoo4(void)
104 align 010h
105
106 public asmfoo4
107asmfoo4 proc
108
109; 42 return ret;
110 mov eax,[esp+04h]; @CBE1
111
112; 41 struct ret4bytes ret = {1};
113 mov dword ptr [esp-04h],01h; ret
114
115; 42 return ret;
116 mov ecx,[esp-04h]; ret
117 mov [eax],ecx
118 ret
119asmfoo4 endp
120CODE32 ends
121end
Note: See TracBrowser for help on using the repository browser.