1 ; File: sep2.asm 2 ; 3 ; File 2 for separate compilation example 4 5 global gvar2, add_these 6 extern gvar1 7 8 section .data 9 10 00000000 0700 bar: dw 07h 11 00000002 03000000 gvar2: dd 03h 12 00000006 02000000 lvar1: dd 02h ; same name as other lvar1, OK 13 14 section .text 15 add_these: ; no regs altered! 16 00000000 C705[00000000]0000- mov [gvar1], dword 0 ; clear destination 17 00000008 0000 18 0000000A 0105[00000000] add [gvar1], eax 19 00000010 011D[00000000] add [gvar1], ebx 20 00000016 010D[00000000] add [gvar1], ecx 21 0000001C C3 ret