First post, by videogamer555
Using nasm to compile my own boot disk image I am using interrupt 0x13 to read additional data after the first sector (initially a boot program only can access the first sector). However using interrupt 0x13 keeps failing, and gives this error in the debugger version of dosbox "BIOS:Disk 0 is not active". The asm code (with comments) is shown below.
BITS 16 ; set assembler to use the 16bit instructions
mov ax,0x0013 ; Graphics mode to use is 0x13
int 0x10 ; Call interupt 0x10
mov ax,0xA000 ; Set ES register to start of VRAM (part 1)
mov es,ax ; Set ES register to start of VRAM (part 2)
mov ah,2 ; Operation type is Read Disk Sectors
mov al,125 ; Number of sectors to read is 125 (64000 bytes)
mov ch,0 ; First track/cylinder number to read is 0
mov cl,2 ; First sector to read on this track/cylinder is number 2 (the first sector after the boot sector)
mov dh,0 ; First read-write head to use is number 0
mov dl,0 ; Drive to read from is 0 (the "A drive")
mov bx,0 ; First offset in VRAM to write to is 0
int 0x13 ; Call interupt 0x13
Loop: ; loop to keep the program running
jmp Loop
section .picture start=512 ; start of section that contains picture data is at byte 512 (first byte of sector 2)
incbin "~RESOURCES\VGA.raw" ; copy all bytes of raw pixels to the disk image