0
0
Fork 0
mirror of https://git.sr.ht/~rabbits/uxn synced 2024-11-08 07:15:04 +00:00
uxn/examples/benchmark.usm

32 lines
603 B
Text
Raw Normal View History

2021-02-07 20:13:38 +00:00
( benchmark )
;iterator
:dev1r FFF0
:dev1w FFF1
|0100 @RESET
( arithmetic )
,12 ,34 ADD ,46 EQU #00 STR
,12 ,06 SUB ,0c EQU #01 STR
,12 ,06 MUL ,6c EQU #02 STR
,12 ,06 DIV ,03 EQU #03 STR
,12 ,12 EQU #04 STR
,12 ,13 NEQ #05 STR
,12 ,11 GTH #06 STR
,12 ,13 LTH #07 STR
( arithmetic 16-bit )
,1234 ,2345 ADD^ ,3579 EQU^ #08 STR
,1234 ,0123 SUB^ ,1111 EQU^ #09 STR
,1234 ,0102 MUL^ ,5868 EQU^ #0a STR
,5678 ,0100 DIV^ ,0056 EQU^ #0b STR
,1234 ,1234 EQU^ #0c STR
,1234 ,0123 NEQ^ #0d STR
,1234 ,1233 GTH^ #0e STR
,1234 ,1235 LTH^ #0f STR
|c000 @FRAME BRK
|d000 @ERROR BRK
|FFFA .RESET .FRAME .ERROR