uxn/examples/benchmark.usm

40 lines
763 B
Plaintext
Raw Normal View History

2021-02-07 15:13:38 -05:00
( 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 )
2021-02-13 11:38:23 -05:00
,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
2021-02-07 15:13:38 -05:00
2021-02-12 19:18:52 -05:00
BRK
@diff8 ( result of abs sub )
2021-02-13 11:38:23 -05:00
OVR OVR GTH ,diff8sub ROT JMP? POP2
2021-02-12 19:18:52 -05:00
SWP @diff8sub SUB
RTS
@diff16 ( result of abs sub16 )
2021-02-13 11:38:23 -05:00
OVR2 OVR2 GTH2 ,diff16sub ROT JMP? POP2
SWP2 @diff16sub SUB2
2021-02-12 19:18:52 -05:00
RTS
2021-02-07 15:13:38 -05:00
|c000 @FRAME BRK
|d000 @ERROR BRK
|FFFA .RESET .FRAME .ERROR