• Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
AnonyViet - English Version
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
AnonyViet - English Version
No Result
View All Result

How to view code as Assembly

AnonyViet by AnonyViet
May 13, 2023
in Tips
0

Once you’ve decided to take the path of security, sooner or later you’ll have to come into contact with Assembly. I know this is a very difficult language to understand, even for readers who understand binary strings. So, in this article, I will introduce you to the website Compiler Explorer, helps you to view your code as Assembly. Especially this website can see each line and highlight for you.

Join the channel Telegram belong to AnonyViet ???? Link ????

How to view code as Assembly

What is Compiler Explorer?

Compiler Explorer is a free and open source website that allows you to write, compile, and analyze source code to Assembly code, all in one browser tab. You can paste any C or C++ code (or one of 30 other supported languages), choose a compiler, run the program and see the Assembly code that corresponds to each line of code. You can also choose a lot of different compilers for each language you want.

Here you can view the warnings, errors, and Assembly code generated by the compiler, as well as view the output of the program.

What about interpreted languages ​​like Python? Python source code can be compiled into bytecode to run on Python Virtual Machine .

You can see a C++ function compiled to Assembly code x86-64 in the image below.

How to view code as Assembly 6

Here is the Python code compiled into Python bytecode.

How to view code as Assembly 7

One of the features I like most about this site is that it can generate a link to your existing code. For example, when accessing this link, you will still see the lines of code that you code, the assembly code, and the output of the program. You can use this feature to share the code you want to your friends.

Why you should use Compiler Explorer

You can see what your source code is compiled to. Although any compiler can do that, Compiler Explorer will tell you exactly how each line of your code is converted to Assembly code.

One of the main uses of Compiler Explorer is to study low-level performance optimization. By knowing how your computer executes each line of code, you can analyze how those lines of code affect execution speed.

Compare compilers and architectures

You can analyze the different optimizations by seeing how the compiler affects the generated binary. The image below shows a compiled C++ function without optimization (-O0).

How to view code as Assembly 8

The image below also uses the same C++ function as above, but it is compiled using optimizations -O3.

How to view code as Assembly 9

As you can see, the compiler gcc will create another binary file. You can also choose a different system architecture. As shown below, I choose ARMv7-a architecture.

How to view code as Assembly 10

Compiler Explorer is extremely flexible and convenient because it allows you to do many compiler related things in a single browser tab.

Compiler Explorer has helped me a lot in self-studying Assembly and understanding how compiler works. I think this site is also for those of you who are studying code optimization.

Rate this post

Tags: AssemblyCodeview
Previous Post

[FaceBook]Instructions on how to “stealth” completely on Facebook

Next Post

How to hack the hot Doggo Go puzzle with the golden boy

AnonyViet

AnonyViet

Related Posts

How to change the Windows 10 interface to a very beautiful Windows 11
Tips

How to change the Windows 10 interface to a very beautiful Windows 11

June 28, 2026
How to create Comic style advertising photos that attract millions of Likes
Tips

How to create Comic style advertising photos that attract millions of Likes

June 27, 2026
How to change the default font in Word
Tips

How to change the default font in Word

June 27, 2026
11 reasons to buy a Macbook instead of a Windows Laptop
Tips

11 reasons to buy a Macbook instead of a Windows Laptop

June 26, 2026
Instructions on how to change Gmail address without worrying about losing data
Tips

Instructions on how to change Gmail address without worrying about losing data

June 25, 2026
8 quick tips for learning Excel that anyone can learn
Tips

8 quick tips for learning Excel that anyone can learn

June 25, 2026
Next Post
How to hack the hot Doggo Go puzzle with the golden boy

How to hack the hot Doggo Go puzzle with the golden boy

0 0 votes
Article Rating
Subscribe
Login
Notify of
guest

guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

Recent News

How to change the Windows 10 interface to a very beautiful Windows 11

How to change the Windows 10 interface to a very beautiful Windows 11

June 28, 2026
How to create Comic style advertising photos that attract millions of Likes

How to create Comic style advertising photos that attract millions of Likes

June 27, 2026
How to change the default font in Word

How to change the default font in Word

June 27, 2026
Tips for browsing the web with Safari on iPhone

Tips for browsing the web with Safari on iPhone

June 26, 2026
How to change the Windows 10 interface to a very beautiful Windows 11

How to change the Windows 10 interface to a very beautiful Windows 11

June 28, 2026
How to create Comic style advertising photos that attract millions of Likes

How to create Comic style advertising photos that attract millions of Likes

June 27, 2026
How to change the default font in Word

How to change the default font in Word

June 27, 2026
AnonyViet - English Version

AnonyViet

AnonyViet is a website share knowledge that you have never learned in school!

We are ready to welcome your comments, as well as your articles sent to AnonyViet.

Follow Us

Contact:

Email: anonyviet.com[@]gmail.com

Main Website: https://anonyviet.com

Recent News

How to change the Windows 10 interface to a very beautiful Windows 11

How to change the Windows 10 interface to a very beautiful Windows 11

June 28, 2026
How to create Comic style advertising photos that attract millions of Likes

How to create Comic style advertising photos that attract millions of Likes

June 27, 2026
  • Home
  • Home 2
  • Home 3
  • Home 4
  • Home 5
  • Home 6
  • Next Dest Page
  • Sample Page

6789 kv999

No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office

6789 kv999

wpDiscuz
0
0
Would love your thoughts, please comment.x
()
x
| Reply