Hi All,
I am writing a program at the moment that will allow me to manually read sectors on a floppy disk and have come into a bit of bother. The program is designed to run in a DOS32/16 environment so I am using the digital mars c compiler compiling c and some inline assembly language with the parameters 'dmc filename -msd', but i am having issues with the compiler giving me the error: explicit cast to convert parameter 1 from int* to int when trying to give a memory location to a pointer. I believe the problem may lie with the compiler restricting these operations because they may be considered dangerous but they are needed to directly reference the memory. Can anybody offer me any advice?
The section of code giving me bother is:
int *memsectptr
memsectptr = (int *)0x1000;
for(i=0; i<(sectorsize) ; i++)
{
fputc(*(memsect ptr+i), outfileprev); /*get memory values before use*/
}
Thanks,
Dinklebaga
I am writing a program at the moment that will allow me to manually read sectors on a floppy disk and have come into a bit of bother. The program is designed to run in a DOS32/16 environment so I am using the digital mars c compiler compiling c and some inline assembly language with the parameters 'dmc filename -msd', but i am having issues with the compiler giving me the error: explicit cast to convert parameter 1 from int* to int when trying to give a memory location to a pointer. I believe the problem may lie with the compiler restricting these operations because they may be considered dangerous but they are needed to directly reference the memory. Can anybody offer me any advice?
The section of code giving me bother is:
int *memsectptr
memsectptr = (int *)0x1000;
for(i=0; i<(sectorsize) ; i++)
{
fputc(*(memsect ptr+i), outfileprev); /*get memory values before use*/
}
Thanks,
Dinklebaga
Comment