JASM Compiler

Advanced Configuration

Custom IJVM Configuration (Optional)

JASM Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

Mini Emulator

Open Full Emulator
Current Step:0
Status: Ready

Input

Output

Stack Visualization

Operand Stack

Starting from 257 as 1 to 256 is reserved for local variables.
Caller's PC = Program Counter to jump to after IRETURN. Caller's LV = Local variable Pointer to use after IRETURN.
Stack Value
Local Variable
Argument
Caller's PC
Caller's LV
Frame Pointer
Stack is empty
JASM Syntax Reference

Basic Structure

.constant
    OBJREF 0x40
.end-constant

.main
    .var
        x
        y
    .end-var
    
    // Your code here
    HALT
.end-main

Common Instructions

  • BIPUSH n - Push byte value n onto stack
  • ILOAD var - Load variable onto stack
  • ISTORE var - Store stack top to variable
  • IADD - Add two stack values
  • ISUB - Subtract two stack values
  • IN - Read input
  • OUT - Write output
  • HALT - Stop execution