uxn/examples/benchmark.usm

40 lines
763 B
Plaintext

( benchmark )
|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 ADD2 ,3579 EQU2 #08 STR
,1234 ,0123 SUB2 ,1111 EQU2 #09 STR
,1234 ,0102 MUL2 ,5868 EQU2 #0a STR
,5678 ,0100 DIV2 ,0056 EQU2 #0b STR
,1234 ,1234 EQU2 #0c STR
,1234 ,0123 NEQ2 #0d STR
,1234 ,1233 GTH2 #0e STR
,1234 ,1235 LTH2 #0f STR
BRK
@diff8 ( result of abs sub )
OVR OVR GTH ,diff8sub ROT JMP? POP2
SWP @diff8sub SUB
RTS
@diff16 ( result of abs sub16 )
OVR2 OVR2 GTH2 ,diff16sub ROT JMP? POP2
SWP2 @diff16sub SUB2
RTS
|c000 @FRAME BRK
|d000 @ERROR BRK
|FFFA .RESET .FRAME .ERROR