Mail Archives: djgpp/1997/10/31/16:09:40
john kismul <john DOT kismul AT bergen DOT mail DOT telia DOT com> very lost wrote ;-)
> I've allocated some memory and I've got the selector for it. Then I want
> to move some of the allocated memory to a variable.
How did you allocated it, with malloc the dpmi functions?
> Doing something like this:
> movedata(source_selector,0,_my_ds(),&int_variable,2);
>
> I get an General Protection Fault and a Call frame traceback error, and
> my program exits with an error code of 255.
Let me see:
How did you got source_selector? I think your error is there.
> However, if I do something like this:
> movedata(_my_ds(),0,my_ds(),&int_variable,2);
> Everything works OK.
Ok?! it doesn't work at all, even more, you are using a NULL pointer.
Please give more details on how did you got the memory and selector.
And why you can't use malloc.
SET
------------------------------------ 0 --------------------------------
Visit my home page: http://www.geocities.com/SiliconValley/Vista/6552/
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Alternative e-mail: set-sot AT usa DOT net - ICQ: 2951574
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(541) 759 0013
- Raw text -