Hi
Could this code be modified to write to disk also (and if so, how)?
I need a simple com32 module which wipes the first 2048 bytes of the disk which
the system is using for localboot.
--Kjetil
> -----Original Message-----
> From: syslinux-bounces at zytor.com [mailto:syslinux-bounces at zytor.com]
On
> Behalf Of PERRIN Jean-Luc
> Sent: 25. mars 2008 18:49
> To: syslinux at zytor.com
> Subject: [syslinux] Com32 api problem !
>
> (sorry for my english if it is approximate !)
>
> I want to access harddisk from com32 api with PXELINUX.
> I try to use int 13h Extended Read Drive Parameters (48h), it doesn't
> works.
> Here is my code, I have an error 1 in AH return code.
> Int 13h Read Drive Parameters (08h) work well.
>
> ***********************************************************************
> ********************
> struct params {
> unsigned short size,info;
> unsigned long cylinders,heads,sectors;
> unsigned long long int total;
> unsigned short bytes;
> } disk;
>
> void ExtDiskInfo(int n)
> {
> printf("ExtDiskInfo entry.\n");
>
> com32sys_t regs;
> memset(®s,0,sizeof(regs));
>
> regs.eax.b[1] = 0x48;
> regs.edx.b[0] = 0x80 + n;
> regs.ds = SEG(__com32.cs_bounce);
> regs.esi.w[0] = OFFS(__com32.cs_bounce);
> __intcall(0x13,®s,®s);
>
> if (regs.eax.b[1] == 0)
> {
> memcpy(&disk,__com32.cs_bounce,sizeof(struct params));
> size = disk.total * disk.bytes;
> printf("Total hard disk size : %lld Mb (%lld
> sectors)\n",size>>20,disk.total);
> }
> else printf("Disk %d error : %d\n",n,regs.eax.b[1]);
>
> printf("ExtDiskInfo exit.\n");
> }
>
> ***********************************************************************
> ********************
>
> Someone has a hint ?
>
> Thanks.
> PJL.
> _______________________________________________
> SYSLINUX mailing list
> Submissions to SYSLINUX at zytor.com
> Unsubscribe or set options at:
> http://www.zytor.com/mailman/listinfo/syslinux
> Please do not send private replies to mailing list traffic.