;nasm -f elf mlock-dos.S ;ld -static mlock-dos.o bits 32 %define MCL_CURRENT 1 %define MCL_FUTURE 2 %define __NR_mlockall 152 section .text global _start _start: mov ebx,MCL_CURRENT | MCL_FUTURE mov eax,__NR_mlockall int 0x80 sub esp,ALLOCATE mov edi,esp mov ecx,ALLOCATE cld rep stosb .x: jmp .x