Gustavo Duarte writes illustrated explanations of how computers, operating system kernels, and memory work.
Commenters call his posts great and awesome, recommending his writing on kernel memory management, CPU rings, and what a computer does while you wait.
Does anyone, (the author?), know the best reference for x86-64 assembly? I have been a loath to teach it to students because there I haven't found great material for it. I use "Programming from the Ground Up"* as my main text for 32 x86 but haven't found anything comparable for 64 bit. I also use:
* http://download.savannah.gnu.org/releases/pgubook/ProgrammingGroundUp-1-0-lettersize.pdf
http://duartes.org/gustavo/blog/post/anatomy-of-a-program-in-memory/
Sun Microsystem Assembler Reference http://docs.oracle.com/cd/E19455-01/806-3773/index.html (not because we use that assembler, we use gas for gcc compat, but it very clearly describes all of the usual 32 bit opcodes)
The Intel manuals http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html
Another Intel manual http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-vol-1-manual.pdf
EDIT: I agree with everyone one, I also learned via doing, decompiling small C programs, gdb, and manuals. However, I am looking for something a bit gentler. That process will work for the top 10% but the rest will struggle and at the end of the day they need to write an x86 code generator so without knowing how to write assembly they are in trouble.
http://stevehanov.ca/blog/ -- Updates infrequently. Very good programming articles.
http://duartes.org/gustavo/blog/ -- Updates infrequently. Good articles on Linux and Programming. Start here: http://duartes.org/gustavo/blog/best-of
http://catonmat.net -- He doesn't update much anymore since he's working on his startup but the archives are still good. Mostly unix tools and CompSci stuff IIRC.
http://chneukirchen.org/trivium/ -- Curates unix and plan9 articles and some lower level/systems programming stuff with a few other peculiarities sprinkled in.
http://www.foldl.org/ -- Curated programming/compsci stuff from certain subreddits. Didn't last long, archives still have some gems.
http://lambda-the-ultimate.org/ -- I actually don't read the articles that often anymore but I scan the titles as if it were a ticker of what's going on in the programming world.
If someone could point me to more curated sources like foldl, I'd appreciate it.
Non-programming:
http://ryanholiday.net -- http://www.ryanholiday.net/an-introduction-to-me/
http://thelastpsychiatrist.com/ -- I skip the pharma articles that are way over my head. Cultural deconstructionism.
No. ASM is just a slightly easier mnemonic version of the raw machine language. All software basically compiles down to this form.
The OS functions are provided here. The "game" is just an application in the OS (kinda). The BIOS provides whatever the OS needs to hook into to use the hardware. Here's a high-level overview of how this works http://duartes.org/gustavo/blog/post/how-computers-boot-up/
OS's don't need to be very complicated, just a few bytes in some cases depending on what you want to do. For example, you can just use the standard VGA modes (here, he's using 13h) to get something to display, and just write directly to the video memory. The BIOS helps handle some of the interface work to the various standard components.
This is the real old-school way of doing things and the code is really well done and commented. If you know x86 asm basics, you can read through most of the system-level stuff without too much trouble.
I went back and forth on whether use read() or fread() in my example, and I wasn't sure which to choose. For the purpose of this example, I don't think there is a functional difference between them.
In current Linux, I'm pretty sure both of them use the same underlying page cache. fread() adds a small amount of management overhead, but read() does just as much system level buffering. mmap() uses the same cache, but just gives direct access to it.
But it's possible I'm wrong, and I don't seem to be able to find a solid source for this online. This page references this, though:
http://duartes.org/gustavo/blog/post/page-cache-the-affair-between-memory-and-files
I feel like I've read other more explicit descriptions, although possibly offline.
Listing very old sites which may have still some perl fragments somewhere in there infrastructure doesn't mean perl isn't dead.
I don't know of any major sites written in perl today.
Also, i thought slashdot used perl a long time ago but have already written an new system, but i may remember that wrong...
http://duartes.org/gustavo/blog/post/programming-language-jobs-and-trends has some interesting trends. From what i see there, i'd say perl is probably still alive but slowly dying.
My hopes have been on parrot for perl. But after reading about the new perl version and its ridiculous new "features", i am convinced that perl will die when parrot breaks module compatibility with cpan, because noone will port modules, yet care for the new perl.
Here are other resources that I'm tracking:
http://www.sal.ksu.edu/faculty/tim/ossg/index.html
http://joelgompert.com/OS/
http://www.csi.ucd.ie/staff/jcarthy/home/alp/alp-05.pdf
http://www.superfrink.net/athenaeum/
http://www.cs.utah.edu/flux/oskit/html/oskit-www.html
http://duartes.org/gustavo/blog/post/how-computers-boot-up/
http://duartes.org/gustavo/blog/post/kernel-boot-process/
http://www.ibm.com/developerworks/library/l-linuxboot/index.html
http://www.osdever.net/bkerndev/Docs/title.htm
http://sourceforge.net/p/oszur11/code/ci/master/tree/
http://www.codeproject.com/Articles/737545/Writing-a-bit-dummy-kernel-in-C-Cplusplus
http://freevideolectures.com/Course/2653/CSE-30341-Operating-Systems/1