COWMODSКаталог модов

Asm Craft

This mod enables you to write programs in assembly language within Minecraft and run them.

Автор: sally49531052обновлён 1 мар. 2026 г.
Проклятые

Описание

Asm Craft

The mod is made by sally4953.

This mod is licensed under the MIT open-source agreement. You can view its source code through the GitHub repository: https://github.com/sally4953/asmcraft

This mod enables you to write programs in assembly language within Minecraft and run them. At present, the mod just support Minecraft Assembly Language. C++ compiler is still in the process of implementing. But I will try my best to complete the C++ compiler.

For making the assembled application executable, I implemented a virtual machine(VM) in Minecraft. It uses a completely different framework. So, let me show you the specific information:

Virtual Machine Information

Registers

There are 7 registers. The first four are used as variables when calling a function. Another register stores the pointer for program execution (pointing to the address in memory, indicating the current executing statement), and there is one for storing the function return value. The last register is the result of the condition judgment, with only two states.

Memories

There are two memories in the VM. One is to store the application's commands. Its size is 1024 bytes. So every application shouldn't be more than 1024 bytes ( but I think no one can write such application ). The other memory is to store runtime data. Its size is also 1024 bytes. I think 1024-byte memory is enough for the most players (or programmers).

Commands

The VM supports only 22 commands at present. The following table will show you the information.

NameCommentLength(byte)
nopDo-nothing command.1
retFunction return command.1
mov A, BAssign B to A.5
sub A, BSubtract B from A.5
mul A, BMultiply A by B.5
div A, BDivide A by B.5
jmp ADirect jump to A.3
cjp AJump to A if the last register is true.3
grt A, BIf A is greater than B, the last register is true (otherwise not true).5
lst A, BIf A is less than B, the last register is true (otherwise not true).5
equ A, BIf A is equal to B, the last register is true (otherwise not true).5
cal ACall function A (A is the address in memory or a label).3
ccl ACall A if the last register is true (A is the address in memory or a label).3
andSet the last register to true if and only if the values in the first and second registers are both true (otherwise false).1
orSet the last register to true if and only if one of the values in the first and second registers is true (otherwise false).1
xorSet the last register to true if and only if the values in the first and second registers are not the same (true or false).1
notReverse the last register's value.1
inc AAdd one to A.3
dec ASubtract one from A.3
neg AStore the opposite number of A in A.3
int AInterrupt, request the virtual machine to call the function with the number A in memory, wait for completion, and the virtual machine will set the value to the register 5. For the information of the supported interruptions, view the following table.2

Interruptions

The VM supports only 12 interrupt commands. The following table will show you the interruptions.

CodeComment
0Exit.
1Print a integer above the hotbar.
2Print a character above the hotbar.
3Set the world time to the register 0's value.
4Set the register 5's value to the world time.
5Take the register 0 as the seed and generate a random number to the register 5.
6Set the player's score to the register 0's value.
7Set the register 5's value to the player's score.
8Set the player's health to the register 0's value.
9Set the register 5's value to ten times the player's health.
10Set the X, Y, and Z axis positions of the player to 1/10 of the register 0, register 1, and register 2's values respectively.
11If the register 0's value is 0, set the register 5 to ten times the player's X-axis position; if it is 1, set the register 5 to ten times the player's Y-axis position; if it is 2, set the register 5 to ten times the player's Z-axis position; otherwise, R5 remains 0.

This mod has better support for Chinese. Therefore, if you are not familiar with Chinese, you may need to use a translator.

The above is all the content of this mod. Anyway, enjoy it!

Последние версии

Все версии →
alpha

Asm Craft 1.0-SNAPSHOT-2

1.0-SNAPSHOT-2
1 мар. 2026 г.74Minecraft: 1.21.4fabric
Скачать
Что нового
Fixed the following bug: - The translatable key of AsmApplication's hover text is wrong. Added new thing: - Support "M[Rx]" grammar, like "mov M[R0], #10" means setting the number that points to the memory location using the value of register 0 as the address to 10.
alpha

Asm Craft 1.0-SNAPSHOT

1.0-SNAPSHOT
23 февр. 2026 г.31Minecraft: 1.21.4fabric
Скачать
Что нового
The first version of the mod. It enables you to write programs in assembly language within Minecraft and run them. For more details about the mod, please view the description section.