Repository navigation
int21: add missing break after AH=51/62 - #309
Merged
Merged
Conversation
Commit 81ee617 put the AH=8C handler right after "Get PSP", so AH=51/62 fell through into it. With AL=2 (_SIGHUP) that installed a signal handler from DS:DX and returned the previous handler offset in BX instead of the PSP; with any other AL it set CF and AX=1. Phar Lap 286 loader (Crusader demo) calls AH=62 with AL=2 and got a bogus PSP, failing with "Initialization failed -- error code 8".
Member
Author
|
Thanks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before: since 81ee617 (AH=8Ch), int 21h AH=51h/62h falls through into the new AH=8Ch case. With AL=2 it installs a SIGHUP handler from DS:DX and returns the previous handler offset in BX instead of the PSP; with any other AL it returns CF=1, AX=1.
After: AH=51h/62h return the current PSP and leave AX, flags and the signal state alone.
The Phar Lap 286 loader in the Crusader demo calls AH=62h with AL=2 left over from an earlier call. It got 0829h instead of its PSP 9CEEh, read the environment selector from the wrong segment and stopped with "Initialization failed -- error code 8". With the
breakit loads and runs.How: one
break;afterirp->BX = cu_psp;inint21_syscall().