Virtual RAM & CPU in JavaScript
Leonardo Gonçalves

Leonardo Gonçalves @leonardopinezi

About: Software Engineer • Backend Specialist • Building scalable systems

Location:
São Paulo, Brasil
Joined:
Apr 21, 2025

Virtual RAM & CPU in JavaScript

Publish Date: May 12
0 0

Hello guys, my name is Leonardo Pinezi and at the last night, i just started a "simple" project... create a full emulated CPU and RAM with it own generic commands and assembler.

And i just finished it a little core, you all can see in my YouTube channel (i'm brazillan so it is in Portuguese).
https://www.youtube.com/watch?v=f7w27f5LURE&t=1s

My virtual machime don't have a cool name, so you all can give me good ideas :D and have simple commands :

  • 0x00 = null - cost 0 bytes
  • 0x01 = put - cost 3 bytes
  • 0x02 = get to register - cost 3 bytes
  • 0x03 = copy a register to other register - cost 3 bytes
  • 0x04 = addiction of two registers - cost 3 bytes
  • 0x05 = subtraction of two registers - cost 3 bytes
  • 0x06 = jump to a slot in partition - cost 2 bytes
  • 0x07 = jump to a slot in partition if register 4 == 1 - cost 3 bytes
  • 0x08 = print a register value in screen - cost 2 bytes
  • 0x09 = compare 2 registers and store in register 4 - cost 3 bytes
  • 0xff = halt - cost 1 byte

This is just a simple project that i'm creating, if you guys have some feature idea to add, you all are free to tell me :3

By Leonardo Pinezi, the world conquistor.

Comments 0 total

    Add comment