Skip to content

Instantly share code, notes, and snippets.

Avatar

Ismael Luceno ismaell

View GitHub Profile
@ismaell
ismaell / ansi2vga.s
Created Jul 9, 2015
Translate ANSI colors to the default VGA palette.
View ansi2vga.s
/**
* 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