Code: Select all
qemu-system-i386 \
-cpu "SandyBridge-v2" \
-m 256M \
-no-reboot \
-drive format=raw,file=usb.image \
-serial stdio \
-smp 1 \
-usb \
-vga std \
-soundhw sb16
Code: Select all
VBoxManage internalcommands createrawvmdk -filename OS.vmdk -rawdisk os.img
Code: Select all
/*
** Read one complete program block into memory.
**
** ax: number of sectors to read
** es:bx = starting address for the block
*/
readprog:
pushw %ax /* save sector count */
movw $3,%cx /* initial retry count is 3 */
retry:
pushw %cx /* push the retry count on the stack. */
movw sec,%cx /* get sector number */
movw head,%dx /* get head number */
movb drive, %dl
movw $0x0201,%ax /* read 1 sector */
int $0x13
jnc readcont /* jmp if it worked ok */
movw $err_diskread,%si /* report the error */
call dispMsg
popw %cx /* get the retry count back */
loop retry /* and go try again. */
movw $err_diskfail,%si /* can't proceed, */
call dispMsg /* print message and freeze. */
jmp .