preproc.c: Make %substr robust
[nasm/sigaren-mirror.git] / test / br3005117.asm
blob4e7a5b5b67405df25ed77169bd6739c0e9a1aa7c
1 %macro B_STRUC 1-*
2 %push foo
3 %define %$strucname %1
4 %%top_%$strucname:
5 %rep %0 - 1
6 %rotate 1
7 resb %{$strucname}%1 - ($ - %%top_%$strucname)
8 %1:
9 %endrep
10 resb %{$strucname}_size - ($ - %%top_%$strucname)
11 %pop
12 %endmacro
14 struc timeval
15 .tv_sec resd 1
16 .tv_usec resd 1
17 endstruc
19 mov [timeval_struct.tv_sec], eax
21 section .bss
23 timeval_struct B_STRUC timeval, .tv_sec, .tv_usec
24 timeval_struct_len equ $ - timeval_struct