An Arduino Assembly Interpreter written in Java. This can be considered an HLE-like implementation of an AVR assembly emulation.
- Basic arithmetic instructions (add, addi, inc, etc.)
- Basic register management instructions (ldi, mov, etc.)
- Jumping and branching (via jmp, breq, brne)
- Emulated SRAM memory stack such that push and pop are supported
- Call-saved/Call-clobbered registers
- GPIO pin emulation
- C-Style function calls
- Data Space instructions (sts, etc.)
- X, Y, Z pointers
- Interrupts
- Directly running compiled binaries (this is an Interpreter not a direct emulator)
- Certain GNU Assembler directives (ex. .data labels)
- More arithmetic instructions were addded (ADDI, SUBI)
- Logical instructions were added (CP, LSL, LSR)
- Labels and global directives
- The ability to jump to labels
- The ability to branch to labels
- Register comparison for said branching
- SRAM stack emulation (PUSH and POP can be executed)
RET is technically implemented but it is not 100% compatible with Arduino Assembly. It doesn't obey call-saved registers, but it does propely end execution of assembly labels.
A shell script is provided to run it, and a test Assembly File has been provided.
run without debug:
sh run.sh Test.S
run with debug:
sh run.sh Test.S -d
We have also added a demo of the Fibonacci Sequece
sh run.sh Fib.S