delorie.com is funded by banner ads.
  www.delorie.com/djgpp/v2faq/faq140.html   search  

| Previous | Next | Up | Top |

17.6 I must use my 16-bit code with DJGPP!!

Q: If that's how it is, then I would have to give up using DJGPP. I simply cannot live without these .obj files. Are you really sure there is nothing I can do??


A: If you need your old code that badly, then there might be a way, albeit a cumbersome one. You can write a 16-bit, real-mode program and link it with your precious functions you can't live without. Have this program spawn a DJGPP-compiled program and make the two communicate with each other via a buffer allocated in low memory, or via command-line parameters passed to the 32-bit program by the spawnXX function call. On the DJGPP side, you can directly call 16-bit functions from the real-mode program using the library function called __dpmi_simulate_real_mode_procedure_retf, provided the 16-bit program passes the CS:IP values of these functions to the 32-bit program. You can even put your 16-bit code as binary instructions into a buffer allocated in low memory and call it with __dpmi_simulate_real_mode_procedure_retf (but if you can do that, you can probably also disassemble the code into a source form and submit it to Gas).

Now will you consider sticking with DJGPP? Please??...


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright ⌐ 1998   by Eli Zaretskii     Updated Sep 1998  

Powered by Apache!

You can help support this site by visiting the advertisers that sponsor it! (only once each, though)