我想在自身內我的引導裝載程序複製到硬盤的第一個扇區(512)(我應該使用BIOS中斷13h),我發現這個代碼:如何在硬盤與BIOS寫中斷13H
mov bx, buffer1 ; set BX to the address (not the value) of BlahBlah
mov ah,03h ;When ah=, int13 reads a disk sector
mov al,5 ;Al is how many sectors to read
mov cl,0 ;Sector Id
mov dh,0 ;Head
mov dl,80h ;Drive (0 is floppy)
mov cx,512 ;One sector /2
mov ah, 0x3 ; set function 2h
int 0x13
它不起作用!
複製麪食代碼從來不是一種好的做事方式。你應該學習一些彙編程序,並試着理解_why_你的代碼不起作用。然後你可以嘗試自己解決它,如果你陷入困境,來到這裏。 – Bojangles 2012-01-29 23:17:00
你有沒有注意到這個評論說功能2h?但它實際上將0x3移動到啊 – iabdalkader 2012-01-29 23:19:32
我知道代碼在做什麼!我實際改變它(3h是一個例子)!我不知道的是爲什麼它不工作! – Ocelot 2012-01-29 23:21:06