Overview
The Romasm IDE (ide.html) is a web-based development environment for writing, assembling, and executing Romasm assembly code. It provides a complete coding experience in your browser.
Features
Code Editor
A text area for writing Romasm assembly code with syntax highlighting support.
- Write your Romasm programs
- Save and load code examples
- Pre-defined examples in dropdown
Assemble & Run
One-click assembly and execution:
- Assemble: Converts your code to instructions
- Run: Executes the program in the VM
- Step: Execute one instruction at a time (debugging)
Output Console
View program output and errors:
- PRINT instruction output
- Assembly errors
- Runtime errors
- Final register states
Memory Visualization
View the contents of VM memory:
- See all memory addresses and values
- Track memory changes during execution
- Debug memory-related issues
Example Programs
Pre-loaded examples covering:
- Basic arithmetic
- Loops and conditionals
- Mathematical functions (factorial, power, sqrt)
- Trigonometric functions (sine, cosine)
- Calculus operations (derivatives, integrals)
Using the IDE
Step 1: Write Your Code
Type or paste your Romasm assembly code into the editor:
LOAD R0, 10
LOAD R1, 20
ADD R0, R1
PRINT R0
Step 2: Assemble
Click the "Assemble" button to convert your code to instructions. Check for any assembly errors.
Step 3: Run
Click "Run" to execute your program. View the output in the console below.
Step 4: Debug
Use "Step" to execute one instruction at a time, or check the memory visualization to see what's stored.
Example Programs
The IDE includes several example programs you can load from the dropdown:
- Basic Arithmetic - Simple addition and multiplication
- Factorial - Calculate n! using a loop Power Function - Calculate base^exponent
- Square Root - Newton's method for √n
- Sine Function - Taylor series sine calculation
- Derivative - Numerical differentiation
- Integral - Numerical integration (trapezoidal rule, Simpson's rule)
Tips & Tricks
Using Standard Library
To use stdlib functions in the IDE, you may need to:
- Include stdlib code directly in your program, or
- Use the linker system (if enabled)
For easier stdlib usage, try the Romasm Calculator which has automatic linking.
Debugging
- Use
PRINTstatements to output intermediate values - Check the memory visualization to see stored values
- Use "Step" mode to execute one instruction at a time
- Check final register states after execution
Related Documentation
- Quick Start - Write your first program
- Instruction Set - All available instructions
- Syntax & Conventions - Writing correct code
- Try the IDE - Open it now!