1
$\begingroup$

I'm sure this will benefit anyone else on a computer science fundamentals back-fill journey..

I'm slowly learning Assembly and while I'm starting to understand the core of it (MOV, JUMP, etc) and can see how these instructions translate to Opcodes for the CPU to process. I'm still struggling to understand how a modern program - Lets take an internet browser for example would translate into such machine code.

I have achieved primitive applications with assembly e.g. store 1 number in a register..another number in a second register and then add the 2 numbers together - Simple, Logical, Makes sense.

The next step I took was to work on a simpler system in hopes it would make things clearer - I worked on the almighty 6502 CPU in the NES.

I watched a few tutorials of people programming their own NES games and again the logic of it made sense. The sprites are stored in memory on the cartridge and are 'called' as required in effect making the games we all love.

Unfortunately the NES didn't clear up my computing confusion - It still doesn't make sense to me (on a hardware level) how an internet browser translates into such machine code.

My Learning Journey Summary:

  • Assembly Language & CPU Opcodes
  • Programming the NES 6502

EDIT:

Lets take a few steps back - Instead of the internet browser, lets just look at the Operating System itself - Windows 95. In particular its 'graphics'.

Would the PC (give or take) work in the same fashion as my NES example above? To clarify, would the thumbnails and icons etc be stored in memory like sprites on the NES and then used to construct what the end user would see as the desktop?

$\endgroup$
  • 6
    $\begingroup$ You're asking us to explain to you like you're a five-year-old, concepts that are inaccessible to five-year-olds. Honestly, all I think that can be said is "There's a program called a compiler that does it." And the more detailed version is "Look at a textbook about compilers." $\endgroup$ – David Richerby Mar 6 at 11:31
  • 2
    $\begingroup$ It doesn't really matter what program you use as an example. It's still converted by a compiler, which is a huge chunk of software that takes a whole book to explain. And your edit has replaced the internet browser with something even bigger! By the way, please don't write "Edit:" at the bottom to change the question. It's confusing when you write one thing and then say "Wait, I meant to say this." Just make the question say what it should say. Anyone who's interested in how the question has changed (trust me: that's nobody) can look at the edit history. $\endgroup$ – David Richerby Mar 6 at 11:41
  • 1
    $\begingroup$ I second the suggestion to read more about compilers. There are several standard textbooks. $\endgroup$ – Yuval Filmus Mar 6 at 11:46
  • 3
    $\begingroup$ CS is peculiar since it deals with objects which work at very different "magnitude orders" so to speak. Simplifying a lot, an hardware logical gate operates on the sub-nanosecond scale, an assembly instruction operates on the nanosecond scale, the OS on top of that provides system calls possibly involving thousands of assembly instructions, the language APIs provide a useful abstraction using maybe ten-ish syscalls, and an application like a browser could be written using millions of lines of code in a high-level language. It's impossible to visualize all these levels at the same time. $\endgroup$ – chi Mar 6 at 11:47
  • 2
    $\begingroup$ It is possible, however, to slowly understand the principles of each step in that "stack of technologies". How does an OS work? How does a compiler translate high-level C++ to low-level assembly? How does the browser run Javascript on top of that? And so on. Each step is non trivial, it takes a university-level course to only scratch the surface, covering the very basics. People often do their PhD on improving a single aspect of a specific step of this stack. $\endgroup$ – chi Mar 6 at 11:51
0
$\begingroup$

From what I can tell the actual question here is:

To clarify, would the thumbnails and icons etc be stored in memory like sprites on the NES and then used to construct what the end user would see as the desktop?

Yes.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.