By the way, the CD can also store the boot code in the first sector, right?




Code: Select all
;read CDROM
mov ax, 0x1000 ;segment for your data - edit it for you
mov es, ax ;set segment register
mov bx, 0 ;offset for your data - edit it for you
mov ah, 0x02 ;read function
mov al, 1 ;number of read sectors - max 72 sectors(two cylinders)
mov ch, 0 ;cylinder
mov dh, 0 ;head
mov cl, 1 ;sector
mov dl, 0xE0 ;CDROM / 0x00 if you want read from boot CDROM, 0x00 works on boot USB too
int 13h ;read with BIOS interrupt
Only if there is a BIOS to run that interrupt for you. New UEFI PCs may not provide a BIOS CSM anymore, or it may not be enabled by default.xtex wrote:Can I use the int command to read some sectors in the compact disc (CD)?
No. The location of the boot code on a CD is determined by the boot catalog. For more information about that, refer to El Torito on the wiki or find a copy of the El Torito specification.xtex wrote:By the way, the CD can also store the boot code in the first sector, right?
This is a bad example. The ID of the CD drive is not guaranteed to be the same on every computer.Klakap wrote:Code: Select all
mov dl, 0xE0