ASTRA-256 Assembler

ASTRA-256 Assembler

评价数不足
New Instructions List
由 Screamster 制作
27 new instructions allow more efficient use of memory. Less code more productivity.
   
奖励
收藏
已收藏
取消收藏
Data Transfer to / from Accumulator
MOVIRA | 13h | 00010011b | 2 bytes | ZF
Copy to Accumulator the contents of a memory location pointed to by the contents of the specified memory cell.
2nd byte - an intermediate location containing an effective address of data.
If result in the Accumulator is 00h, Zero Flag ZF = 1, otherwise ZF = 0.

MOVIAR | 14h | 00010100b | 2 bytes |
Copy the contents of Accumulator to a memory location pointed to by the contents of specified memory cell.
2nd byte - an intermediate location containing an effective address of data.

MOVILR | 15h | 00010101b | 3 bytes |
Write a literal value to a memory location pointed to by the contents of specified memory cell.
2nd byte - a literal value to write
3d byte - an intermediate location containing an effective address to write the data.

MOVAL | 16h | 00010110b | 2 bytes | ZF
Write the contents of Accumulator to the 2nd byte of the instruction itself.
2nd byte - a byte to write to. It can have any initial value that will change during the execution of the instruction.
If result in the Accumulator is 00h, Zero Flag ZF = 1, otherwise ZF = 0.

LOIRA | 17h | 00010111b | 2 bytes | ZF
Write to Accumulator the contents of a memory location pointed to by the contents of the specified memory cell. Increment or decrement by 1 the contents of an intermediate location (an effective address). If CF=0, address increments by 1, if CF=1, address decrements by 1.
2nd byte - an intermediate location containing an effective address of data.
If result in the Accumulator is 00h, Zero Flag ZF = 1, otherwise ZF = 0.

CLEARA | E4h | 11100100b | 2 bytes | ZF
Copy the contents of Accumulator to a specific memory address, then set the Accumulator to zero.
2nd byte - a memory address to write to.
Always sets ZF = 1.
Data Transfer to Memory
MOVIRR | 22h | 00100010b | 3 bytes |
Copy the contents of one memory cell to another with indirect addressing of both memory cells.
2nd byte - an intermediate location containing an effective address to copy from.
3rd byte - an intermediate location containing an effective address to copy to.

CLEARR | E5h | 11100101b | 2 bytes |
Write a zero to a specific memory cell.
2nd byte - a memory address to write to.
Arithmetic and Logical Instructions (Accumulator)
AAD | 3Eh | 00111110b | 1 bytes | ZF
Convert a number in the Accumulator from binary-decimal to binary.
If result in the Accumulator is 00h, Zero Flag ZF = 1, otherwise ZF = 0.

AAA | 3Fh | 00111111b | 1 bytes | ZF, CF
Convert a number in the Accumulator from binary to binary-decimal.
If result in the Accumulator is 00h, Zero Flag ZF = 1, otherwise ZF = 0.
If result in the Accumulator is overflow (a value exceeds FFh), Carry Flag CF = 1, otherwise СF = 0.

ADDLACF | 88h | 10001000b | 2 bytes | ZF, CF
Add a literal value and a value of the CF bit to the contents of Accumulator. Store the result in the Accumulator.
2nd byte - a literal value to add.
If result in the Accumulator is 00h, Zero Flag ZF = 1, otherwise ZF = 0.
If result in the Accumulator is overflow (a value exceeds FFh), Carry Flag CF = 1, otherwise СF = 0.

ADDRACF | 89h | 10001001b | 2 bytes | ZF, CF
Add a value within addressed memory cell and a value of the CF bit to the contents of Accumulator. Store the result in the Accumulator.
2nd byte - memory address to add value from.
If result in the Accumulator is 00h, Zero Flag ZF = 1, otherwise ZF = 0.
If result in the Accumulator is overflow (a value exceeds FFh), Carry Flag CF = 1, otherwise СF = 0.

SUBLACF | 8Ah | 10001010b | 2 bytes | ZF, CF
Subtract a literal value and a value of the CF bit from the contents of Accumulator. Store the result in the Accumulator.
2nd byte - a literal value to subtract.
If result in the Accumulator is 00h, Zero Flag ZF = 1, otherwise ZF = 0.
If result in the Accumulator is a negative number, the Carry Flag CF = 1, otherwise CF = 0.

SUBRACF | 8Bh | 10001011b | 2 bytes | ZF, CF
Subtract a value within addressed memory cell and a value of the CF bit from the contents of Accumulator. Store the result in the Accumulator.
2nd byte - a memory address of value to subtract.
If result in the Accumulator is 00h, Zero Flag ZF = 1, otherwise ZF = 0.
If result in the Accumulator is a negative number, the Carry Flag CF = 1, otherwise CF = 0.
Conditional Transfer Instructions
JALR | B7h | 10110111b | 3 bytes |
Compare the contents of Accumulator with the contents of addressed memory cell. If a value within Accumulator is less than a value within addressed memory cell, then go to the address specified in the 3rd byte of the instruction.
2nd byte - a memory address of value to compare.
3nd byte - a memory address to jump to.

JALL | B8h | 10111000b | 3 bytes |
Compare the contents of Accumulator with a literal value. If a value within Accumulator is less than a literal value, then go to the address specified in the 3rd byte of the instruction.
2nd byte - a literal value to compare.
3nd byte - a memory address to jump to.

JAER | B9h | 10111001b | 3 bytes |
Compare the contents of Accumulator with the contents of addressed memory cell. If a value within Accumulator is equal to a value within addressed memory cell, then go to the address specified in the 3rd byte of the instruction.
2nd byte - a memory address of value to compare.
3nd byte - a memory address to jump to.

JAEL | BAh | 10111010b | 3 bytes |
Compare the contents of Accumulator with a literal value. If a value within Accumulator is equal to a literal value, then go to the address specified in the 3rd byte of the instruction.
2nd byte - a memory address of value to compare.
3nd byte - a memory address to jump to.

JAGR | BBh | 10111011b | 3 bytes |
Compare the contents of Accumulator with the contents of addressed memory cell. If a value within Accumulator is greater than a value within addressed memory cell, then go to the address specified in the 3rd byte of the instruction.
2nd byte - a memory address of value to compare.
3nd byte - a memory address to jump to.

JAGL | BCh | 10111100b | 3 bytes |
Compare the contents of Accumulator with a literal value. If a value within Accumulator is greater than a literal value, then go to the address specified in the 3rd byte of the instruction.
2nd byte - a literal value to compare.
3nd byte - a memory address to jump to.

JRLR | BDh | 10111101b | 3 bytes |
Compare the contents of one memory cell with the contents of another memory cell. If a value within the first memory cell is less than a value within the second one, then go to the address specified in the 4th byte of the instruction.
2nd byte - a memory address of the first value to compare.
3nd byte - a memory address of the second value to compare.
4th byte - a memory address to jump to.

JRER | BEh | 10111110b | 4 bytes |
Compare the contents of one memory cell with the contents of another memory cell. If a value within the first memory cell is equal to a value within the second one, then go to the address specified in the 4th byte of the instruction.
2nd byte - a memory address of the first value to compare.
3nd byte - a memory address of the second value to compare.
4th byte - a memory address to jump to.

JRGER | BFh | 10111111b | 4 bytes |
Compare the contents of one memory cell with the contents of another memory cell. If a value within the first memory cell is equal or greater than a value within the second one, then go to the address specified in the 4th byte of the instruction.
2nd byte - a memory address of the first value to compare.
3nd byte - a memory address of the second value to compare.
4th byte - a memory address to jump to.
Input / Output Instructions
OUTCLRKBD | D4h | 11010100b | 1 bytes |
Turn off the backlight of all keys (numbers and alphabet), except for the functional keys.

INCOLKBD | D5h | 11010101b | 1 bytes |
Return the key color to the Accumulator. An address of the key is placed in the lower 6 bits of Accumulator before calling the instruction. After the instruction is executed a color code is returned to the higher 2 bits of the Accumulator.
Miscellaneous Instructions (Chain Operations and Multiplication)
RETAD | E3h | 11100011b | 2 bytes | TF
It is assumed that this instruction is always followed by a two-byte JMP instruction. Memorize the so-called "return address." The instruction "finds out" the location of its own first byte, and adds 4 to it.
2nd byte - a memory address to write a return address to.
If a return address is greater than FFh, then the Trap Flag TF = 1, otherwise TF = 0.

X | E6h | 11100110b | 2 bytes |
Execute one instruction at the address specified in the 2nd byte and then continue the program.
2nd byte - a memory address of the first byte of the instruction to be called.
Note! When calling a conditional or unconditional jump instructions, as well as itself, the correct operation of these instructions is not guaranteed.
3 条留言
Zaxabock 2020 年 7 月 28 日 上午 8:06 
Well done, that makes me glad. I read through it and saw the total instructions were just 75 (at the top of the page) still, but counted 102. :)
Screamster  [作者] 2020 年 7 月 28 日 上午 2:51 
Already done. All are in their subdivisions.
Zaxabock 2020 年 7 月 27 日 上午 9:54 
Please also update the main website with these instructions as well, I often link people to it since it offers a better overview of what Astra 256 is :D

https://assemblertrainer.com/commands