# Constants

# Constant literals

By these I mean numbers, characters and strings.

Numbers can be in decimal or HEX. To use a HEX number, append an H at the end (no spaces)

Constants can never be lvalues, but are always rvalues.

// Decimal
var a = 2;
var b = 234;
// HEX
db c = 56H;
dw g = 1234H;
// Following is an error:
// db overflow = 1234H
// CHARACTERS
db char = 'S'; // char DB 'S'

# Registers

To represent 8086 registers like AX, Bl etc, use uppercase only.

# Constant Expressions

All expressions are constant by default.

"By default" is misleading, since you can't change it. An expression can be a variable, constant literal or an arithmetic operation.

var a = 1 + 3;
var b = a + b;