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
Revision 4:050482cd9d95, committed 2019-03-08
- Comitter:
- AkashGutha
- Date:
- Fri Mar 08 04:51:18 2019 +0000
- Parent:
- 3:b11d25e57ddd
- Commit message:
- ADD div
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r b11d25e57ddd -r 050482cd9d95 main.cpp
--- a/main.cpp Wed Mar 06 15:38:30 2019 +0000
+++ b/main.cpp Fri Mar 08 04:51:18 2019 +0000
@@ -10,6 +10,10 @@
ADDS d,s;}
#define Thumb2_add(d,n,s) __asm {\
ADDS d,n,s;}
+#define Thumb_div(d,s) __asm {\
+ DIVS d,s;}
+#define Thumb2_div(d,n,s) __asm {\
+ DIVS d,n,s;}
int main() {
@@ -44,9 +48,19 @@
printf("the answer is %d\n", r2);
printf("The time taken for thumb2 add was %f seconds\n", t1.read());
-
-
+ r1 = 0xA;
+ printf("\n");
+ t1.start();
+ Thumb_div(r1,r0);
+ t1.stop();
+ printf("the answer is %d\n", r1);
+ printf("The time taken for thumb div was %f seconds\n", t1.read());
-
-
+ r1=0xA;
+ printf("\n");
+ t1.start();
+ Thumb2_div(r2, r1,r0);
+ t1.stop();
+ printf("the answer is %d\n", r2);
+ printf("The time taken for thumb2 div was %f seconds\n", t1.read());
}