section .text global enter_section enter_section: enter 0, 0 ; 0 bytes of local stack space mov ebx,[ebp+8] ; first parameter to function ;; bts bitbase bitoffset ;; selects the bitoffset bit in bitbase, ;; stores the value in the CF flag, and sets the bit to 1 spin: lock bts dword [ebx], 0 jc spin leave ; mov esp,ebp / pop ebp ret