Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor VIDEO_ATTR variable assignments #23

Open
binarymaster opened this issue Dec 12, 2019 · 0 comments
Open

Refactor VIDEO_ATTR variable assignments #23

binarymaster opened this issue Dec 12, 2019 · 0 comments

Comments

@binarymaster
Copy link
Contributor

VIDEO_ATTR variable is used to change text color attributes, which is printed via printk() function.

It has 32-bit unsigned value which is represented in ARGB color space, 8 bits per channel:

VIDEO_ATTR = 0xAARRGGBB; // pseudocode

VIDEO_ATTR = 0xFFFF0000; // red color
VIDEO_ATTR = 0xFF00FF00; // green color
VIDEO_ATTR = 0xFF0000FF; // blue color
etc.

Note that the alpha (transparency) channel seems to be not implemented, and its value is always equal to 0xFF in the existing code. Changing the value of this attribute does not affect printed text visually (at least in XQEMU).

All assignments to this variable should be converted into C macros for better code self-documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant