.byte .db .def .dw .equ .set
.byte
Reserves bytes for a variable.
.db ( c --)
Define constant byte(s) in program memory and EEPROM. The .db directive reserves memory resources in the program memory or the EEPROM memory. In order to be able to refer to the reserved locations, the DB directive should be preceded by a label. The DB directive takes a list of expressions, and must contain at least one expression. The DB directive must beplaced in a Code Segment or an EEPROM Segment.
.def ( comp: n -- <name> | exec: -- n)
The .def
directive defines a synonym for a registry.
Example of source code in assembler:
; Register definitions .def upl = r2 ; not in interrupt .def uph = r3 ; not in interrupt .def r_zero = r5 ; read only zero .def r_one = r6 ; read only one .def r_two = r7 ; read only two .def t8 = r8 ; Not in interrupt .def wflags = r9 ; not in interrupt
rewritten in FORTH:
\ Register definitions r2 .def upl \ not in interrupt r3 .def uph \ not in interrupt r5 .def r_zero \ read only zero r6 .def r_one \ read only one r7 .def r_two \ read only two r8 .def t8 \ Not in interrupt r9 .def wflags \ not in interrupt
.dw ( n --)
Define constant word(s) in program memory and EEPROM.
.equ ( comp: n -- <name> | exec: -- n)
Defines a synonym for a register, syntax:
R16 .equ MyReg
.set ( comp: n -- <name> | exec: -- n)
Fixes the value of a symbole
later redefinition is not possible, syntax:
123 .set ONE_TWO_THREE
.byte ( comp: n -- <name> | exec: -- n)
Reserves bytes for a variable.
.db ( c --)
Define constant byte(s) in program memory and EEPROM.
.dw ( c --)
Define constant byte(s) in program memory and EEPROM.
LOW ( n -- c)
Keep lowest 8 bits from n
HIGH ( n -- c)
Keep highest 8 bits from n