> А теперь спроси у них о главных прерываниях доступных в DOS 13 и 21 и за что они отвечают и как их можно реализовывать в современных реалиях -- УВЕРЕН, без "тырнета" у них сразу их поганый язык в заднице окажется... Вместо ха-ха открываем
http://www.ctyme.com/intr/int-13.htm (Ralf Brown's Interrupt List)
и шуруем прямо по списку:
Int 13/AH=01h
> Note: Some BIOSes return the status in AL; the PS/2 Model 30/286 returns the status in both AH and AL
Int 13/AH=02h
> NOTES: The IBM AT BIOS and many other BIOSes use only the low four bits of DH (head number) since the WD-1003 controller which is the standard AT controller ..
> BUGS: When reading from floppies, some AMI BIOSes (around 1990-1991) trash the byte following the data buffer, if it is not arranged to an even memory boundary. A workaround
> Apparently some BIOSes or intercepting resident software have bugs that may destroy DX on return or not properly set the Carry flag
Int 13/AH=04h
> BUG: Some Epson ROM BIOSes sometimes have problems properly handling this function. The workaround is to reset the disk (INT 13/AH=00h) before the call.
Int 13/AH=09h
> Notes: On the PC and XT, this function uses the parameter table pointed at by INT 41. On the AT and later, this function uses the parameter table pointed at by INT 41 if DL=80h, and the parameter table pointed at by INT 46 if DL=81h
В общем, на самом деле баг на баге и воркароундом погоняет. Вплоть до того, что BIOS код загрузчика на "неправильный" адрес закинуть может, попутно не давая никаких гарантий насчет инициализации регистров,
Любопытные могут заглянуть в старые версии загрузчиков (Grub, LILO).
У int21 вообще полторы тысячи значений:
http://www.ctyme.com/intr/int-21.htm
Поэтому "ха-ха" хорошо делается либо вообще на расстоянии, либо после знакомства с INTами в чистенькой эмуляции виртуалки/современных BIOS (и даже там можно нарваться:
int 13h ;hdd count in DL
jc .end
mov dh,[475h] ;CMOS ->hdd count in dh
cmp dh,dl ;avoid bug in VirtualBox BIOS
jb @f
).