Arm Storage Method
The ARM architecture regards memory as a linear combination of bytes starting from zero addresses. Place the first stored word data from zero byte to three bytes, and place the second stored word data from the fourth byte to the seventh byte in sequence. As a 32-bit microprocessor, the maximum addressing space supported by the ARM architecture is 4 GB.
The ARM architecture can store word data in two ways, namely big-end format and small-end format. The details are as follows:
1. Large-end format
In the big-end format, the high byte of word data is stored in the low address, while the low byte of word data is stored in the high address, as shown in:
31 24 23 16 15 8 7 0
1. Small-end Mode
In contrast to the large-end storage format, the low-byte storage of word data is in the high address, and the high-byte storage of word data is in the low address, as shown in:
31 24 23 16 15 8 7 0
|
11 |
10 |
9 |
8 |
|
7 |
6 |
5 |
4 |
|
3 |
2 |
1 |
0 |
When I made a logo today, I suddenly met a function in the s3c2440display. cpp function:
If (dwstatus = error_success & dwtype = REG_DWORD)
{
Dwsize = sizeof (DWORD );
Dwstatus =Regqueryvalueex (hkdisplay, _ T ("lcdvirtualframebase"), null, & dwtype, (lpbyte) & gdwlcdvirtualframebase, & dwsize );
}
I don't understand. Well, there is no way. Who told me not to be too much? The bottom is thin. Fortunately, my face is thick. I found the function prototype during the msdn process:
Long regqueryvalueex (
Hkey,
Lpcwstr lpvaluename,
Lpdword lpreserved,
Lpdword lptype,
Lpbyte lpdata,
Lpdword lpcbdata
);
Here, the lptype parameter value may be reg_dword_big_endian or reg_dword_little_endian, which will involve the arm storage method, so I read the book again. The first chapter of this book will be detailed in the ARM embedded common modules and integrated system design examples! Alas, sweat!