Commit graph

12 commits

Author SHA1 Message Date
tkchia 247a2bd6ae plat/msdos386: rename _psp[] to .psp, avoid namespace pollution 2022-08-26 17:32:50 +00:00
tkchia 249e4b9069 plat/msdos386: fix a few more issues with startup and stub code
- correctly calculate size of BSS area to clear
 - make realloc routine set both ds & es to point to new
   data segment
 - correctly initialize real mode flags when simulating real
   mode interrupt via DPMI
 - other minor fixes
2022-08-24 10:17:15 +00:00
tkchia 95ed8ee484 plat/msdos386: fix startup code so that it works under dosemu2
- do not try to store data through code segment selectors
 - set each segment limit to segment size - 1, not segment size
 - get PSP segment while still in real/V86 mode (DPMI host
   might choose to return PM selector for int 0x21, ah = 0x62)
 - other minor fixes
2022-08-23 14:35:43 +00:00
David Given 5329c98b81 Simplify and fix reading and writing so they seem to work. 2022-08-18 21:21:33 +02:00
David Given cc356b5c75 Programs now start up and can write to the console, but crash when reading. 2022-08-18 00:24:08 +02:00
David Given 48398b072a write() system calls work; start going through the libsys. 2022-08-17 22:34:06 +02:00
David Given 680b6b9857 Marshal the environment, command line and PSP into 32-bit memory. 2022-08-11 23:36:23 +02:00
David Given 1764c6baa2 Made realloc work; the 32-bit process can now be resized to include bss and
stack.
2022-08-10 16:14:12 +02:00
David Given d464606dd6 We can now load and run 32-bit protected-mode executables. We have not,
however, set up the data segment.
2022-08-09 23:49:18 +02:00
David Given 21b30ccadb We can now switch to 32-bit mode. 2022-08-08 23:22:00 +02:00
David Given 1e0961c679 Do enough of the boot stub to produce an EXE header and enter DPMI protected
mode.
2022-08-08 22:03:12 +02:00
David Given 6d9ac0b182 Add the nonfunctional boilerplate for the MSDOS 386 port. 2022-08-03 20:41:06 +02:00