TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Programming with Ones and Zeros

64 pointsby rainbowgardenover 10 years ago

5 comments

earlzover 10 years ago
I made an 8086 emulation library ( <a href="https://bitbucket.org/earlz/x86lib/src" rel="nofollow">https:&#x2F;&#x2F;bitbucket.org&#x2F;earlz&#x2F;x86lib&#x2F;src</a>) a while back and it was extremely fun to get so intimate with machine code.<p>I can&#x27;t remember the exact resource I used for the opcodes and their encodings, but it was the best resource ever. It included cycle information, a description of what the opcode did, and what flags and registers it affected. I haven&#x27;t been able to find that resource though in a couple years at least. It followed some common template that was used for a number of other topics as well (including DOS interrupts and some obscure programming language)<p>One of the other fun things I did was craft some self-modifying code... although I once had a bug in it and that was almost impossible to debug
评论 #8935140 未加载
wazooxover 10 years ago
Computers up until the early 80s had &quot;keys&quot; to flip bits directly in memory, from the hobbyist Altair 8800 and its clones ( see the close up panel image at the bottom of <a href="http://www.vintage-computer.com/altair8800.shtml" rel="nofollow">http:&#x2F;&#x2F;www.vintage-computer.com&#x2F;altair8800.shtml</a> ), the DEC PDP series ( <a href="http://home.earthlink.net/~n1be/pdp11/PDP11.html" rel="nofollow">http:&#x2F;&#x2F;home.earthlink.net&#x2F;~n1be&#x2F;pdp11&#x2F;PDP11.html</a> ), Data General Nova...<p>And back in ye old times, the legendary Seymour Cray cold-booted the CDC 1604 for the first time directly from the keys on the front panel before any OS or software existed to run on the machine.
rdc12over 10 years ago
If I run the fib example on a Linux 64bit install and forget the -m32 flag (both GCC and Clang) it will return 0 for each call (the earlier return 42 example worked thou), add the flag and it works. Curious to know what change caused that?
评论 #8938972 未加载
falcolasover 10 years ago
I have been personally diving into compilers lately, and the amount of research which obviously went into this is pretty high (there are at least 3-4 independent resources which are required to find the right opcodes and ordering and...).<p>Well done and presented!
kjakover 10 years ago
Very cool! Nice descriptions and presentation (and the movie reference at the end is great).<p>I look forward to going through this in finer detail.