Skip to content

Instantly share code, notes, and snippets.

@joanmolinas
Created March 31, 2016 08:22
Show Gist options
  • Save joanmolinas/f9d25a6d75acdb37581415c2a059b6bd to your computer and use it in GitHub Desktop.
Save joanmolinas/f9d25a6d75acdb37581415c2a059b6bd to your computer and use it in GitHub Desktop.
.include "macros.s"
.include "crt0.s"
.data
F: .word 0xBE00 ; 0xBE00 = -1.0
G: .word 0xC000 ; 0xC000 = -2.0
I: .word 0
.text
main:
MOVI R6, 0
$MOVEI R1, F
LDF F1, 0(R1)
$MOVEI R2, G
LDF F2, 0(R2)
CMPLEF R3, F1, f2
BZ R3, fi
MOVI R6, 1
$MOVEI R5, I
ST 0(R5), R6
fi:
HALT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment