Assembly Language Programming
Data Transfer Introduction
Until now, all of the program examples have loaded numbers into registers, using the MOV or MVN instructions, or have assumed that the data has already been loaded (somehow) into one or more registers.
In reality, few programs have the luxury of being able to do everything without recourse to memory, either to load in data or to store results. In addition, communicating with the outside world, whether it be to peripherals such as keyboards and monitors or to a network, uses memory-mapped input/output.
The ARM has three classes of data transfer instructions:
- Single register swap instructions, i.e. MOV and MVN, which were covered in Lecture 2
- Single register load and store instructions, which will be covered in this lecture
- Multiple register load and store instructions, which will be covered in the next lecture.
The load instruction is LDR (Load into Register), while the store instruction is STR (Store from Register).