Created
July 9, 2015 12:12
-
-
Save ismaell/00e5e053ecae328f1ae4 to your computer and use it in GitHub Desktop.
Translate ANSI colors to the default VGA palette.
This file contains 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
/** | |
* Translate ANSI colors to the default VGA palette. | |
* I.e. 1 <--> 4 and 3 <--> 6 | |
*/ | |
__ansi2vga: | |
movb %bl, %bh | |
shrb $2, %bh | |
xorb %bl, %bh | |
testb $1, %bh | |
jz 1f | |
xorb $5, %bl | |
1: ret |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment