Unable to lock for exclusive access. Another application may

Asked

Viewed 62 times

1

When I am debugging boot.bin by nasm it returns the following error: inserir a descrição da imagem aqui

boot.asm:

BITS 16 ; The mode we are running in (default for every modern computer)
ORG 0x7c00 ; the origin, the boot loader is always loaded at 7C00 by the BIOS
jmp Main ; Jump the a label called "Main"

;IN: si=string, OUT:-
Print:
lodsb ; Load string byte (Load a character that's in si into al)
cmp al, 0 ; If that character is equal to "0" jump to done
je Done

mov ah, 0eh ; Set parameters for interrupt 10
int 10h ; Call the interrupt
jmp Print ; Loop back in Print to print the next character

Done: 
ret ; return back to the place we where called

Main:
mov si, msg ; Move the data of msg into si
call Print ; Call the Print label
cli 
hlt ; Halt the system

msg db 'Hello World!',0 ; Define the variable msg to a string

times 510 - ($-$$) db 0 ; make sure the file is 512 bytes

dw 0xAA55 ; Last 2 bytes need to be AA55

How do I fix it? Syntax I’m using: debug boot.bin

  • In the main, before calling the Print, you should not define the values of bh and bl?

  • It is not a problem in the code, tested here (Win 7), the problem occurs when you use the command debug windows, O drive A is a volume? what happens if you click on Ignore?

  • If you want to debug the code, use a debugger like Windbg, or Ollydbg.

  • Drive A is a floppy disk created by VFD. If I click ignore, the error message opens again.

  • Are you sure there’s nothing mounted in that volume?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.