Conversation
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.
Adds register definitions for the new builtin function __loadreg enhancement to C86 in ghaerr/8086-toolchain#69.
This will allow supporting non-constant parameters to VGA vgalib.h ASM graphics macros for high speed VGA operation when using the C86 compiler. Both IA16 and OWC already support such a mechanism.
The recently added high speed bucket fill algorithm in ELKS Paint only supported the IA16 compiler. The vgalib.h graphics macros are updated here to support OWC and C86. The C86 macros have not yet been updated to allow for non-constant arguments, required by the new fill algorithm in vga_cmp8_init().
Unfortunately, the C86 compiler doesn't seem to support functions returning structs, so the high speed fill routine is replaced with the original slower fill routine for the C86 compiled version only, at least for now.
Paint's render.c code that uses a GCC non-standard extension to initialize structures doesn't work in OWC or C86; the code was changed to initialize the two (xl, xr) Segment structure members individually so that Paint will compile with all three compilers. I wanted to keep Paint operational with all our supported compilers as it's a useful way to learn about compiler portability issues. (BTW, initializing non-static constant structures or arrays within functions is extremely slow: the compiler will store the constant data in the data segment, then emit memcpy code to copy to the stack frame - way slower than initializing individually unless the structure is large).
Finally, the C86 -obsolete=yes feature showed that the C library alloca.h header file wasn't including the definition of size_t, which is now fixed.