source: trunk/enter2.asm @ 26

Last change on this file since 26 was 26, checked in by monga, 6 years ago

Programmi 2014

File size: 372 bytes
Line 
1section .text
2global enter_section
3extern printf   
4
5enter_section:
6        enter 0, 0         ; 0 bytes of local stack space
7        mov   ebx,[ebp+8]     ; first parameter to function
8       
9       
10spin:   push busy
11        call printf
12        lock bts dword [ebx], 0
13        jc spin
14
15        leave                   ; mov esp,ebp / pop ebp
16        ret     
17
18section .rodata
19busy:   db "Busy waiting!",10,0
Note: See TracBrowser for help on using the repository browser.