Đăng ký Đăng nhập
Trang chủ Công nghệ thông tin An ninh bảo mật Embeddedsystemsandlabsforarm v1 1 phần 4...

Tài liệu Embeddedsystemsandlabsforarm v1 1 phần 4

.PDF
29
407
84

Mô tả:

Embedded Systems Development and Labs; The English Edition Table 3-1 ARM Work Modes M [4:0] 3) Other Bits Other bits in the program status registers are reserved for future expansion. In general, programmers must take care to write code in such a way that these bits are never modified. Failure to do this might result in code which has unexpected side-effects on future versions of the architecture. 3. The Assembly (as) Syntax and Rules Used in This Lab 1) A label is written as a symbol immediately followed by a colon: The symbol then represents the current value of the active location counter. You are warned if you use the same symbol to represent two different locations; the first definition overrides any other definitions. 2) Some Instructions (1) LDR The LDR (Load Register) instruction loads a word from the memory address calculated by (See the ARM reference manual) and writes it to register . If the address is not word-aligned, the loaded value is rotated right by 8 times the value of bits [1:0] Please note that the as compiler will replace the LDR instruction with a MOV of MVN instruction if that is possible. Syntax Format: LDR , = Where “expression” is a 32 bit variable that needs to be read; “Rd” is the target register. Example: LDR r1,=0xff LDR r0,=0xfff00000 89 Embedded Systems Development and Labs; The English Edition (2) ADR ADR can read a value into a register from an address stored in the PC or other general register. The assembler will replace the ADR with a suitable instruction, ADD or SUB. Syntax Format: ADR
- Xem thêm -

Tài liệu liên quan