Rev 9342 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9342 | Rev 9343 | ||
---|---|---|---|
Line 2... | Line 2... | ||
2 | 2 | ||
3 | if ~ defined win32 |
3 | if ~ defined win32 |
4 | format ELF |
4 | format ELF |
5 | else |
5 | else |
- | 6 | format MS COFF |
|
Line 6... | Line 7... | ||
6 | format MS COFF |
7 | end if |
- | 8 | ||
- | 9 | macro c_public name, _alias, _argsize { |
|
- | 10 | if ~ defined win32 |
|
- | 11 | ; Use cases: |
|
- | 12 | ; c_public name -> 'name' |
|
- | 13 | ; c_public name, 'qwerty'[, nomangle] -> 'qwerty' |
|
- | 14 | ; c_public name, 12 -> 'name' |
|
- | 15 | ; c_public name, 'qwerty', 12 -> 'qwerty' |
|
- | 16 | ; |
|
- | 17 | if ~ _argsize eq nomangle |
|
- | 18 | if _alias eqtype 'string' |
|
- | 19 | public name as _alias |
|
- | 20 | else |
|
- | 21 | public name |
|
- | 22 | end if |
|
- | 23 | else |
|
- | 24 | public name as _alias |
|
- | 25 | end if |
|
- | 26 | else |
|
- | 27 | ; Use cases: |
|
- | 28 | ; c_public name -> '_name' |
|
- | 29 | ; c_public name, 'qwerty' -> '_qwerty' |
|
- | 30 | ; c_public name, 'qwerty', nomangle -> 'qwerty' |
|
- | 31 | ; c_public name, 12 -> '_name@12' |
|
7 | 32 | ; c_public name, 'qwerty', 12 -> '_qwerty@12' |
|
8 | macro c_public name, _alias, _argsize { |
33 | ; |
9 | if ~ _argsize eq nomangle |
34 | if ~ _argsize eq nomangle |
10 | if _alias eqtype 'string' |
35 | if _alias eqtype 'string' |
11 | if _argsize eqtype 1 |
36 | if _argsize eqtype 1 |
Line 19... | Line 44... | ||
19 | public name as '_' # `name |
44 | public name as '_' # `name |
20 | end if |
45 | end if |
21 | else |
46 | else |
22 | public name as _alias |
47 | public name as _alias |
23 | end if |
48 | end if |
- | 49 | end if |
|
24 | } |
50 | } |
Line 25... | Line 51... | ||
25 | 51 | ||
- | 52 | macro extrn name, _argsize { |
|
- | 53 | if ~ defined win32 |
|
- | 54 | extrn name |
|
26 | macro extrn name, _argsize { |
55 | else |
27 | if _argsize eqtype 1 |
56 | if _argsize eqtype 1 |
28 | extrn '_' # `name # '@' # `_argsize as name |
57 | extrn '_' # `name # '@' # `_argsize as name |
29 | else |
58 | else |
30 | extrn '_' # `name as name |
59 | extrn '_' # `name as name |
31 | end if |
- | |
32 | } |
60 | end if |
- | 61 | end if |
|
Line 33... | Line 62... | ||
33 | end if |
62 | } |
34 | 63 | ||
Line 35... | Line 64... | ||
35 | __DEBUG__ = 1 |
64 | __DEBUG__ = 1 |
Line 139... | Line 168... | ||
139 | 168 | ||
Line 140... | Line 169... | ||
140 | include 'macros.inc' |
169 | include 'macros.inc' |
141 | 170 | ||
- | 171 | macro diff16 msg,blah2,blah3 { |
|
- | 172 | if msg eq "end of .data segment" |
|
142 | macro diff16 msg,blah2,blah3 { |
173 | |
- | 174 | if ~ defined win32 |
|
- | 175 | ; fasm doesn't align on 65536, but ld script does |
|
143 | if msg eq "end of .data segment" |
176 | section '.bss.aligned65k' writeable align 65536 |
- | 177 | else |
|
- | 178 | section '.bss.65k' writeable align 512 |
|
144 | ; fasm doesn't align on 65536, but ld script does |
179 | end if |
145 | section '.bss.65k' writeable align 512 |
180 | |
146 | bss_base: |
181 | bss_base: |
147 | end if |
182 | end if |
148 | } |
183 | } |
Line 772... | Line 807... | ||
772 | purge sys_msg_board,delay_ms |
807 | purge sys_msg_board,delay_ms |
773 | restore sys_msg_board,delay_ms |
808 | restore sys_msg_board,delay_ms |
Line 774... | Line 809... | ||
774 | 809 | ||
Line -... | Line 810... | ||
- | 810 | coverage_end: |
|
775 | coverage_end: |
811 | |
- | 812 | if ~ defined win32 |
|
- | 813 | ; fasm doesn't align on 65536, but ld script does |
|
776 | 814 | section '.data.aligned65k' writeable align 65536 |
|
- | 815 | else |
|
- | 816 | section '.data' readable writeable align 512 |
|
777 | ; fasm doesn't align on 65536, but ld script does |
817 | end if |
778 | section '.data' readable writeable align 512 |
818 | |
779 | c_public umka_tool |
819 | c_public umka_tool |
780 | umka_tool dd ? |
820 | umka_tool dd ? |
781 | c_public umka_initialized |
821 | c_public umka_initialized |