Mail Archives: djgpp/1996/11/21/14:52:25
R.G. Morgan wrote:
>
> I'm trying to add some 32-bit code on to the end of my code segment, and
> wondered if this is the right way of doing it:
>
> 1) Get segment limit of code segment
> 2) Increase segment limit of code by about 4k
> 3) Get an alias selector for the selector in cs
> 4) Use __dpmi_get_descriptor to get descriptor, edit type field to
> data/read-write
> 5) Use __dpmi_set_descriptor on alias to get writable data segment at
> same addresses as the code segment.
> 6) Copy the code from the data segment (it's in a buffer) to the new
> selector, which I've put in es.
>
3,4 & 5 shouldn't be needed, ds,es and cs all point to the same range of
memory by default (though cs might have a shorter limit).
> PPS do the asm constraints "esi" (foo), "edi" (bar) work? I seem to get errors
> if I try and use them.
That should be "S"(foor),"D"(bar)
Bill
--
Leave others their otherness.
- Raw text -