Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: main.cpp
- Revision:
- 2:83422444c6e5
- Parent:
- 1:4c0da981b35e
- Child:
- 3:b11d25e57ddd
--- a/main.cpp Fri Mar 01 00:10:00 2019 +0000
+++ b/main.cpp Sat Mar 02 23:16:18 2019 +0000
@@ -1,7 +1,28 @@
#include "mbed.h"
-Timer t;
+Timer t1;
+Timer t2;
+#define Thumb_mult(d,s) __asm {\
+ MULS d,s;}
+#define Thumb2_mult(d,m,s) __asm {\
+ MULS d,m,s;}
+
+
int main() {
- t.start();
+
+ register uint32_t r0= 0xA;
+ register uint32_t r1= 0x3;
+ register uint32_t r2= 0x0;
+ t1.start();
+ Thumb_mult(r1,r0);
+ t1.stop();
+ printf("The time taken was %f milliseconds\n", t1.read()/1000);
+ t2.start();
+ Thumb2_mult(r2,r1,r0);
+ t2.stop();
+ printf("The time taken was %f milliseconds\n", t2.read()/1000);
+
+
+
}