Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Low-level programming language
(section)
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!
== Low-level programming in high-level languages == During the late 1960s and 1970s, [[High-level programming language|high-level languages]] that included some degree of access to low-level programming functions, such as [[IBM PL/S|PL/S]], [[BLISS]], [[BCPL]], extended [[ALGOL]] and [[NEWP]] (for [[Burroughs large systems]]/Unisys Clearpath MCP systems), and [[C (programming language)|C]], were introduced. One method for this is [[inline assembly]], in which assembly code is embedded in a high-level language that supports this feature. Some of these languages also allow architecture-dependent [[Optimizing compiler|compiler optimization directives]] to adjust the way a compiler uses the target processor architecture. Furthermore, as referenced above, the following block of C is from the GNU Compiler and shows the inline assembly ability of C. Per the GCC documentation this is a simple copy and addition code. This code displays the interaction between a generally high level language like C and its middle/low level counter part Assembly. Although this may not make C a natively low level language these facilities express the interactions in a more direct way.<ref>{{Cite web |title=Extended Asm (Using the GNU Compiler Collection (GCC)) |url=https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html |access-date=2024-04-27 |website=gcc.gnu.org}}</ref> <syntaxhighlight lang="c"> int src = 1; int dst; asm ("mov %1, %0\n\t" "add $1, %0" : "=r" (dst) : "r" (src)); printf("%d\n", dst); </syntaxhighlight>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)