Ready to edit
Before starting writing the first program, let's review some essential concepts, definitions and operations.
Editing Areaâ
In Edit Mode, there are two edit areas on the bottom row on the primary display.
Line Number Areaâ
Line number area contains three characters, (0,1), (1,1) and (2,1), to indicate the line numbers in hexadecimal format.
caution
Pressing either âĩ
ī¸ (confirm the change and save the current line) or âē
(do not accept the change) to move the cursor back to the line number area.
Instruction Areaâ
To shift the cursor from Line Number Area to Instruction Area, just move it to position (2,1) (the least digit of line number) and press â
ī¸ī¸ key one more time.
The cursor will be locked in Instruction Area, between position (4,1)~(15,1).
Use â
and â
keys to move the cursor among the digits for instruction and opcodes, and use â
and â
to change the hexadecimal values.
tip
When finished editing the current line, press âĩ
key to confirm the change, or press âē
key to drop the change. The cursor will return to line number area after one of the above actions.
Toggle Single/Double-Byte Decimal Conversionâ
In Edit Mode, use combo keys â
+ī¸ âē
to toggle the decimal conversion between single- and double-byte precision, i.e. either four 8-bit values, or two 16-bit values.
Primary Display
ĐŽ 01000â 00000â
000 02 03E8 0000
Primary Display
ĐŽ002&255 000&128
000 E4 02FF 0080
Conversion between decimal and hexadecimal in above example:
Decimal | Hexadecimal |
---|---|
002 | 02 |
255 | FF |
000 | 00 |
128 | 80 |
Direct Decimal Entryâ
In many cases, using and thinking in decimal could be more convenient and efficient.
For instance, a 2500 milliseconds delay is required in a program, comparing with a hexadecimal value 0x09C4
, it is more direct to type in a decimal value 2500.
Primary Display
ĐŽ 02500â 00000â
000 02 09C4 0000
By pressing combo key â
+ âē
, the cursor can be moved to the top line to edit corresponding decimal values. Use â
and â
to move the cursor among digits, and use â
and â
ī¸ī¸ to change the selected decimal values.
Use combo key â
+ âē
to move the cursor back to the bottom line Editing Area.
Overflow in Decimal to Hexadecimal Conversionâ
danger
Overflow happens when the input decimal value requires more bits than 16 bits in double-byte (or 8 bits in single-byte).
The maximum decimal value in 16-bit is:
The maximum decimal value in 8-bit is:
If the input decimal value is greater than the above limit, overflow will occur when pressing âĩ
ī¸ key.
OP Overflow
For example, to convert the following decimal numbers to a 16-bit hexadecimal as one opcode, following the overflow rule mentioned above:
- Decimal
- Binary
- OP
500
70000
0 0000 0001 1111 0100
1 0001 0001 0111 0000
0000 0001 1111 0100
0001 0001 0111 0000
17 bits are needed for the number 70000 (in binary 1 0001 0001 0111 0000
), it will be truncked to 4464 (in binary 0001 0001 0111 0000
):
Only 0001 0001 0111 0000
is kept when the âĩ
key is pressed.
sOP Overflow
For example, to convert the following decimal numbers to two 8-bit hexadecimal as two sub-opcodes, following the overflow rule mentioned above:
- Decimal
- Binary
- sOP
5
255
999
00 0000 0101
00 1111 1111
11 1110 0111
0000 0101
1111 1111
1110 0111
Notice that the last number 999 requires 10 bits, saving it in a 8-bit sub-opcode results in:
231 will be stored in sOP instead.