Skip to content

Asm Craft

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

Fabric
Loaders
Fabric
Downloads on Modrinth
100
Followers on Modrinth
2
versions
2
Updated
March 1, 2026Mar 1
Published
in 2026

At a glance

Runs on Fabric
For Minecraft 1.21.4
Needed in the game and on the server
Latest version — 1.0-SNAPSHOT-2 from March 1, 2026
License MIT — free
Where it's needed
In gamerequiredOn serverrequired

Needed both in the game and on the server

Game versions1.21.4

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!

FAQ

How to install Asm Craft?

Install Fabric for your Minecraft version, download Asm Craft for the same version and loader, put the file into the mods folder and launch the game with the loader profile.

Which Minecraft versions does Asm Craft support?

Asm Craft has builds for Minecraft 1.21.4.

Is Asm Craft needed on the server?

Needed in the game and on the server

License and source
MIT Licensefree to use and share with credit to the author
Original — Modrinth↗Files unchanged, verified with SHA-512Is this your mod? For rights holders

The site uses cookies: the necessary ones for sign-in and the theme, plus the Yandex Metrica and LiveInternet visit counters — they show us how the site is used. We have no advertising cookies. More