Skip to content

Commit

Permalink
Put the default INT 3 vector routine well within IHSEG where it canno…
Browse files Browse the repository at this point in the history
…t cause any more trouble
  • Loading branch information
joncampbell123 committed Aug 2, 2024
1 parent 33f9033 commit 78b7bb5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
NEXT
- Move the INT 3 default vector to well within the initial 16
bytes of the DOS kernel, away from the List of Lists and SFT.
The previous placement caused certain versions of Windows 3.2
(yes, the Chinese version) to crash on startup. (joncampbell123).
- When using the running program to name screenshots and such,
filter out all invalid characters so that Windows users can
take snapshots even if junk characters are there (joncampbell123).
Expand Down
2 changes: 1 addition & 1 deletion src/dos/dos_memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ void DOS_SetupMemory(void) {

assert(DOS_IHSEG != 0);
ihseg = DOS_IHSEG;
ihofs = 0xCC; /* 0xF4 conflics with SFT */
ihofs = 0x0E; /* DOS_IHSEG is one paragraph (16 bytes) and code below may write with negative offsets below */

real_writeb(ihseg,ihofs,(uint8_t)0xCF); //An IRET Instruction
if (machine != MCH_PCJR) RealSetVec(0x02,RealMake(ihseg,ihofs)); //BioMenace (segment<0x8000). Else, taken by BIOS NMI interrupt
Expand Down

0 comments on commit 78b7bb5

Please sign in to comment.