pl02

Revision:
0:6f2271b58851
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/delay_asm.S	Tue Feb 23 14:35:55 2021 +0000
@@ -0,0 +1,16 @@
+
+
+
+
+
+                AREA |.text|, CODE, READONLY    // tells assembler to make an AREA of machine code
+delay_asm       PROC                            //begin process  
+                EXPORT delay_asm                //gives code in other files permission to read this code
+                LDR R0, =0x0109676B             //Load register with word for a 0.6211972 second delay
+                MOV R1, #1                      // move 1 into R1
+loop            SUBS R0, R1                     //subtract R1 from R0 store result in Link-register
+                BNE loop                        // branch to loop if lr!= 0
+                BX LR                           //exit loop when lr == 0
+                ENDP                            //End procedure
+                ALIGN                           //aligns generated data to modulo-integer bytes
+                END                             //end routine   exit to C++