delay_asm.S

Committer:
cbaxte16
Date:
2021-02-23
Revision:
0:6f2271b58851

File content as of revision 0:6f2271b58851:






                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++