NASM - The Netwide Assembler
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Search
Calendar
Login
Register
NASM - The Netwide Assembler
»
NASM Forum
»
Using NASM
»
Can I replace binary with hex?
« previous
next »
Print
Pages: [
1
]
Author
Topic: Can I replace binary with hex? (Read 16376 times)
macaswell
Jr. Member
Posts: 16
Can I replace binary with hex?
«
on:
November 16, 2010, 08:18:47 PM »
Okay, say I have this line of code to define a color:
cli_clr db <some binary number for white on black>b
Can I replace the binary number with hex?
cli_clr db 2h
And have it still compile/execute properly?
Logged
Frank Kotler
NASM Developer
Hero Member
Posts: 2667
Country:
Re: Can I replace binary with hex?
«
Reply #1 on:
November 16, 2010, 08:59:35 PM »
Sure. "A number is a number". Binary, octal, decimal, hex are just ways of representing the number. 2h isn't going to give you white-on-black, unless you've done something weird with the palette, though. See Ralf's tables 00014 and 00015 for the "key":
http://www.ctyme.com/intr/rb-0098.htm
Best,
Frank
Logged
macaswell
Jr. Member
Posts: 16
Re: Can I replace binary with hex?
«
Reply #2 on:
November 17, 2010, 12:32:29 AM »
I know about the 2h thing, that's green on black text.
Thanks for the key
Logged
Print
Pages: [
1
]
« previous
next »
NASM - The Netwide Assembler
»
NASM Forum
»
Using NASM
»
Can I replace binary with hex?