Bahasa Assembler :
Constant
|
Constants are just like
variables, but they exist only until your program is compiled (assembled).
After definition of a constant its value cannot be changed. To define
constants EQU directive is used:
name EQU < any expression >
For example:
The above example is functionally
identical to code:
You can view variables while your program executes by selecting
"Variables" from the "View" menu of emulator.
To
view arrays you should click on a variable and set Elements
property to array size. In assembly language there are not strict data
types, so any variable can be presented as an array.
Variable can
be viewed in any numbering system:
- HEX - hexadecimal (base 16).
- BIN - binary (base 2).
- OCT - octal (base 8).
- SIGNED - signed decimal (base 10).
- UNSIGNED - unsigned decimal (base 10).
- CHAR - ASCII char code (there are 256 symbols, some symbols
are invisible).
You can edit a variable's value when your
program is running, simply double click it, or select it and click
Edit button.
It is possible to enter numbers in any system,
hexadecimal numbers should have "h" suffix, binary "b"
suffix, octal "o" suffix, decimal numbers require no suffix. String
can be entered this way: 'hello world', 0 (this string is
zero terminated).
Arrays may be entered this way: 1, 2, 3, 4,
5 (the array can be array of bytes or words, it depends whether
BYTE or WORD is selected for edited variable).
Expressions are automatically converted, for example: when this
expression is entered: 5 + 2 it will be converted to 7
etc...
|