Page 1 of 1

ASM colour chart

Posted: Tue Oct 24, 2006 9:20 am
by Touch
Hey, my OS is in 16-bit and unfortuantley, I can never remember any of the colour codes. Do any of you have a chart of colours or something that might help?

Thanks

~Touch

Posted: Tue Oct 24, 2006 9:32 am
by gaf
Bran's tutorials contain a colour chart along with some more general information about console printing.

cheers,
gaf

Posted: Tue Oct 24, 2006 9:33 am
by Touch
Hey thanks!

This is really gonna help!

~Touch

Posted: Tue Oct 24, 2006 9:39 am
by Dex
Remember you can use upto 256 colors, but you can only show 16 at a time.

Posted: Tue Oct 24, 2006 10:30 am
by Touch
@Dex I will remember that!

Btw, I was speaking to this guy from Linux Format, he gave me a link to all good colours and how to use them. Its reall simple.

Posted: Tue Oct 24, 2006 10:55 am
by xsix
you can define colors as variables, like: blue db 1 ant then use it. it may be a bit bit bit bit slower because of an access to memory bet you later you can just use notepad function REPLACE :)

Posted: Tue Oct 24, 2006 11:01 am
by Candy
xsix wrote:you can define colors as variables, like: blue db 1 ant then use it. it may be a bit bit bit bit slower because of an access to memory bet you later you can just use notepad function REPLACE :)
if you're really worried about performance (the delay would be on the order of 5 nanoseconds - in case of a cache miss on a recent computer, which you won't have because your code most likely is smaller than the cache) you can use equ instead of db. db reserves space for it (a byte to be exact) and equ just tells the assembler that blue would be equal to 1. It's then equally fast.

Posted: Tue Oct 24, 2006 12:10 pm
by Touch
Yeah, that would work.

But its all settled and done now because I was sent this link in an email:

http://www.emu8086.com/assembly_languag ... tml#attrib

Couldnt get links working??