| 1 |
; |
| 2 |
; this is a for BR3005117 |
| 3 |
; http://sourceforge.net/tracker/?func=detail&aid=3005117&group_id=6208&atid=106208 |
| 4 |
; |
| 5 |
%macro b_struc 1-* |
| 6 |
%push foo |
| 7 |
%define %$strucname %1 |
| 8 |
%%top_%$strucname: |
| 9 |
%rep %0 - 1 |
| 10 |
%rotate 1 |
| 11 |
resb %{$strucname}%1 - ($ - %%top_%$strucname) |
| 12 |
%1: |
| 13 |
%endrep |
| 14 |
resb %{$strucname}_size - ($ - %%top_%$strucname) |
| 15 |
%pop |
| 16 |
%endmacro |
| 17 |
|
| 18 |
struc timeval |
| 19 |
.tv_sec resd 1 |
| 20 |
.tv_usec resd 1 |
| 21 |
endstruc |
| 22 |
|
| 23 |
section .text |
| 24 |
mov [timeval_struct.tv_sec], eax |
| 25 |
|
| 26 |
section .bss |
| 27 |
timeval_struct b_struc timeval, .tv_sec, .tv_usec |
| 28 |
timeval_struct_len equ $ - timeval_struct |
| 29 |
|
| 30 |
section .text |
| 31 |
|
| 32 |
; |
| 33 |
; this is a test for BR3026808 |
| 34 |
; http://sourceforge.net/tracker/?func=detail&aid=3026808&group_id=6208&atid=106208 |
| 35 |
; |
| 36 |
%imacro proc 1 |
| 37 |
%push proc |
| 38 |
%assign %$arg 1 |
| 39 |
%endmacro |
| 40 |
|
| 41 |
%imacro arg 0-1 1 |
| 42 |
%assign %$arg %1+%$arg |
| 43 |
%endmacro |
| 44 |
|
| 45 |
%imacro endproc 0 |
| 46 |
%pop |
| 47 |
%endmacro |
| 48 |
|
| 49 |
proc Test |
| 50 |
%$ARG arg |
| 51 |
endproc |
| 52 |
|
| 53 |
; |
| 54 |
; this is a test for BR3066383 |
| 55 |
; http://sourceforge.net/tracker/?func=detail&aid=3066383&group_id=6208&atid=106208 |
| 56 |
; |
| 57 |
%macro pp_local 1 |
| 58 |
%push |
| 59 |
%assign %$_uses 0 |
| 60 |
%rep 4 |
| 61 |
%assign %$_ur%$_uses %$_uses |
| 62 |
mov ecx, %$_ur%$_uses |
| 63 |
%assign %$_uses %$_uses+1 |
| 64 |
%endrep |
| 65 |
%pop |
| 66 |
%endmacro |
| 67 |
|
| 68 |
pp_local 1 |