Skip to content

Instantly share code, notes, and snippets.

View ismaell's full-sized avatar

Ismael Luceno ismaell

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