Implemented start of flagpole compiler and a few new things here and there for said compiler
This commit is contained in:
parent
0e1237f0be
commit
6098f88cc5
8 changed files with 401 additions and 2 deletions
19
tests/cmp.asm
Normal file
19
tests/cmp.asm
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
include "fvm.inc"
|
||||
|
||||
org 0x4000000000000000
|
||||
MovI64 r95, UART_TX
|
||||
MovI64 r2, 8
|
||||
MovI64 r3, 2
|
||||
MovI64 r4, 0x30 ; ascii for 0
|
||||
Cmp64 r2, r3
|
||||
JmpIP Greater
|
||||
LessEq:
|
||||
AddR64 r3, r4
|
||||
St8 r3, r95
|
||||
Jmp Ending
|
||||
Greater:
|
||||
AddR64 r2, r4
|
||||
; MovI64 r2, 0x38
|
||||
St8 r2, r95
|
||||
Ending:
|
||||
Halt
|
||||
Loading…
Add table
Add a link
Reference in a new issue