source: trunk/enter2.asm

Last change on this file was 26, checked in by Mattia Monga, 10 years ago

Programmi 2014

File size: 372 bytes
RevLine 
[2]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
[26]10spin: push busy
11 call printf
[2]12 lock bts dword [ebx], 0
[26]13 jc spin
[2]14
15 leave ; mov esp,ebp / pop ebp
16 ret
17
18section .rodata
[26]19busy: db "Busy waiting!",10,0
Note: See TracBrowser for help on using the repository browser.