GPART: Fix for issue where IX and IY are not returned to caller #84
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.
Hi,
I stumbled on something that I am not 100% sure i fully understand.
I was trying to use the GPART function, and noticed that the, sector count, was not being returned in the IX:IY register, within my application. After much digging and barely understandings, i think i found the cause.
I noticed that the other functions that return values in the index registers, use
FUNC_WITH_IXIY
code. This function walks the stacks and replaces the stored IX, IY registers - expecting a certain stack depth. I thought that GPART just needed to be mapped in the same way. Alas, not quite, as the stack depth for when I call the GPART function is different (IX and IY are the first items after the return address).So i made a similar block of code, especially for GPART, and my application now get the right value.
I also understand that GPART is currently used with the embedded fdisk code in the kernel . I am not sure if I have screwed that up - would not be surprised. Your insights would be welcomed.
Cheers
Dean