Arm Storage Method

Source: Internet
Author: User

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

8

9

10

1

4

5

6

7

0

1

2

3

 

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!

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.