Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Intel MCS-51
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Programming == There are various [[high-level programming language]] compilers for the 8051. Several [[C (programming language)|C]] compilers are available for the 8051, most of which allow the programmer to specify where each variable should be stored in its six types of memory, and provide access to 8051-specific hardware features such as the multiple register banks and bit manipulation instructions. There are many commercial C compilers.<ref> Han-Way Huang. [https://books.google.com/books?id=PnXNNGG_jMMC "Embedded System Design with C8051"]. p. 238. </ref> [[Small Device C Compiler]] (SDCC) is a popular open-source C compiler.<ref> {{cite book |author=Lewin A. R. W. Edwards |url=https://archive.org/details/pdfy-MKFMCCNbqENoR3Ft |title=So, You Wanna be an Embedded Engineer: The Guide to Embedded Engineering, from Consultancy to the Corporate Ladder |date=2006 |page=51|isbn=978-0-7506-7953-4 }} </ref> Other high level languages such as [[C++]], [[Forth (programming language)|Forth]],<ref name="camelforth"> {{cite web |author=Bradford J. Rodriguez |url=http://www.camelforth.com/page.php?4 |title=CamelForth/8051}} </ref><ref name="bradford"> {{cite web |author=Brad Rodriguez |url=http://www.bradrodriguez.com/papers/moving7.htm |title=Moving Forth Part 7: CamelForth for the 8051}} </ref><ref>{{cite web |url=http://www.forth.com/embedded/swiftx-embedded-systems-development-tools.html?MCU=8051 |title=8051 SwiftX Forth development |archive-url=https://web.archive.org/web/20150924014750/http://www.forth.com/embedded/swiftx-embedded-systems-development-tools.html?MCU=8051 |archive-date=2015-09-24 |url-status=dead}}</ref><ref>{{cite web |url=http://www.mpeforth.com/xc7.htm |title=MPE VFX Forth 7 cross compilers |archive-url=https://web.archive.org/web/20141023215234/http://www.mpeforth.com/xc7.htm |archive-date=2014-10-23 |url-status=dead}}</ref> [[BASIC]], [[Object Pascal]], [[Pascal (programming language)|Pascal]], [[PL/M]] and [[Modula-2]] are available for the 8051, but they are less widely used<ref>{{Cite web |last=Agarwal |first=Tarun |date=2014-09-16 |title=Detailed Explanation about 8051 Programming in Assembly Language |url=https://www.elprocus.com/8051-assembly-language-programming/ |access-date=2024-10-21 |website=ElProCus - Electronic Projects for Engineering Students |language=en-US}}</ref> than C and [[Assembly language|assembly]]. Because IRAM, XRAM, and PMEM (read only) all have an address 0, C compilers for the 8051 architecture provide compiler-specific [[Directive (programming)|pragmas]] or other extensions to indicate where a particular piece of data should be stored (i.e. constants in PMEM or variables needing fast access in IRAM). Since data could be in one of three memory spaces, a mechanism is usually provided to allow determining to which memory a pointer refers, either by constraining the pointer type to include the memory space or by storing metadata with the pointer.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Intel MCS-51
(section)
Add topic