Somebody in the answers already figured out that the code belonged to MS-DOS 3.30 COMMAND.COM as previously attested by Al Lowe. https://retrocomputing.stackexchange.com/a/29580/3986
Comments have been moved to chat; please do not continue the discussion here. Before posting a comment below this one, please review the purposes of comments. Comments that do not request clarification or suggest improvements usually belong as an answer, on Retrocomputing Meta, or in Retrocomputing Chat. Comments continuing discussion may be removed.
And this is how useful sites die.
Stackexchange's karma policy has effectively kept this 39-year veteran of computing from contributing so much as a word. I'm okay jumping through a hoop or two to prove I'm not a bot, but I never figured out how to earn enough points to comment without being able to comment. This is how useful sites die.
I never figured out how to earn enough points to comment
By posting questions or answers, especially ones which get upvoted.
Comments are, intentionally, treated as lower value by the site. They're intended for discussing and correcting issues which may exist with a question or answer, not for revealing new information.
I'll echo OP's frustration / lament. I have domain expertise in a specific platform, and it is pretty common that I'll see an answer which could use some clarification or additional detail about edge cases to consider. However, 1) I never ask questions on SO, and 2) I don't have time to wade through unanswered questions. As a result, though I would like to give them free labor by adding useful comments, I will never be able to.
The point is that SO is missing out here.
If you feel you can improve an answer, you can always just add your own answer. That should quickly give you enough to comment.
IIRC, you can also propose edits to existing answers, and having those edits accepted will give you a bit of reputation too.
Suggested edits still require a bit of karma. Questions and answers are the only things new users can do.
... though note also that once you get karma on one site you get some base karma on all sites.
Suggested edits still require a bit of karma.
You only need reputation to have your edits applied immediately, without review. You can suggest edits at any rep level (even while logged out).
It feels wrong and an anti-pattern to copy-paste a 98% subjectively correct answer as your own, just to sprinkle the 2% (again, subjectively) that it was missing to be the Answer.
Why can’t we highlight specific content and create a discussion thread hinged off the highlighted part?
Creating a properly written, end-to-end answer for a complex question is an heroic task if all you wanted to point out was that there was a demonstrably better way to do Item 15(a)(5)(iii) and the author missed it.
It’s funny that we, collectively as programmers, use git all day long to solve this problem for modifying discrete blocks of programming language text with discussion and more, but can’t seem to ever apply the same tools and fascination to written English.
Even more interesting now that we use the best answers to train models. You’d think there would be more discipline involved in making the best answer even bestier. (Like, say, Wikipedia)
The unique offering of their platform, for better and for worse, is not having to "go through" the discussion of why the best answer is the best - you just get right to the best, complete answer.
That would be great if it worked like that, but for the same reasons that the parent comments lamented about, it rarely does. Often the answer marked "correct" isn't as correct as something in a comment or another answer.
If you can improve an answer, you could always give a new answer?
> The point is that SO is missing out here.
Unfortunately, if comments were open to all initially the site would quickly fill with “me too” comments and other things that would fill the page with low quality content that would be effort to moderate. This already happens to an extent with answers.
My point being that the potential gain from automatically open comments may be less than the potential hassle from less useful users. Balancing these matters is difficult, many places get it even more wrong than SO and related sites do, and there is probably no perfect answer that doesn't put off some useful contributions.
Other things about comments:
You don't need karma to comment on your own questions/answers (i.e. in reply to someone else's comment on what you posted).
Basically anyone can flag comments obsolete and this can make them be deleted without review.
My last comment was "this code breaks for obscure input X" but I can no longer locate it.
The real main problem with StackOverflow is that all the easy questions have already been asked and answered, and all the hard questions get little attention, so it's hard to get karma honestly. Many people have luck operating in obscure language tags.
The Internet is shit now, swarmed by bots (even ones some people argue are sentient). Useful sites are less possible than before.
You are too late.
I’m using SO occasionally and was actively participating in 201x-ish. Even then people cried SO was over, but I never felt that. Comments were moved to the chat, well, then I click on a link and read them. It’s not any different from clicking on expand-comments link. Excuse me if I’m getting something wrong here, but to me it feels like a good thing to keep such drama from a site.
That said, sometimes moderators could lock questions which were different from where they redirected to and insist that’s correct. This was one of the worst issues, imo.
By enforcing quality standards?
At least this chat page is live. Often, IME, the linked chat page is not found (as in, requests return a 404). What a mess.
Especially so given that if you read through all the moved comments, you can see that they actually end up uncovering where the code originated from. So in short, the actual correct answer to the question was found in the comments and then the moderator decided to move those comments away.
We should call this Redditification
While I don't know if this is really true, but there was a time when chips like the 8080 ran at a speed that was close to AM frequencies. Programmers figured out that certain patterns produced sounds on their radio. So they would insert garbage code that accessed the address bus at the right speeds.
Perhaps this is something along those lines?
I think you've misinterpreted the question pretty wildly. The code in question is in the game as text displayed on screen, not as part of the executable.
Besides, IBM PC-compatible systems already had a reliable way of making basic sounds - the PC speaker. There was no need for the techniques you're describing on that platform.
Where in the article does it say "the code in question ... is displayed on screen"?
I've read it a few times (half-heartedly) and then just to be sure (quite a few glasses of wine consumed already) I did a search for the word "screen" - nope, but not exactly conclusive.
There are several theories espoused but one comment is: "In a brief email conversation with Al Lowe ... he probably used the COMMAND.COM file as the basis for this code ..."
Your assertion about "reliable way of making basic sounds" is sort of true, if you ignore the shonky hardware that used to and get shipped as a "speaker". It's better nowadays and largely an anachronism. Back in the day you'd wedge a Soundblaster into an ISA slot along with some reasonable speakers or really good headphones and job done.
Your parent may be thinking of the silly games that used to be played with big old Winchester discs on big IDM gear and the like.
"Where in the article does it say "the code in question ... is displayed on screen"?"
Nowhere. It is shown in the animation posted in the article, which you may have not noticed was animated if your eyes jumped over it quickly enough.
Where in the article does it say "the code in question ... is displayed on screen"?
As someone else mentioned, it shows up in the GIF animation, about 45 seconds in, as a sequence of text boxes.
https://i.stack.imgur.com/8Aznd.gif
Your assertion about "reliable way of making basic sounds" is sort of true, if you ignore the shonky hardware that used to and get shipped as a "speaker".
On the IBM PC, one of the channels on the PIT (programmable interval timer) was hooked up to a speaker. It didn't sound great, but it could at least make simple tones on its own, and even music, without sucking up too much CPU time:
https://www.youtube.com/watch?v=1IOL4q5tDDQ
The Apple II had it much worse. It had a built-in speaker as well, but no timers -- the speaker was connected directly to the memory address $C030, such that performing a read or write operation on that address would toggle the state of the speaker (on/off). Playing a tone required the CPU to hit that address in an appropriately sized loop; since the CPU wasn't particularly fast to begin with, it was nearly impossible to play audio while anything else was going on.
Somewhere between the Sound Blaster and using RF leakage in the AM band to generate sound was the Covox Speech Thing, which used the pins from your parallel port and a resistor ladder to generate PCM sound. You could solder one together yourself. Some games supported it, and Disney marketed an improved version with a built-in speaker and powered amplifier as the Disney Sound Source.
Where in the article does it say "the code in question ... is displayed on screen"?
The post says "there's a part in the game where the main character (Larry) has to write a program in 8088 assembly language as part of his tribal initiation. [...] The code shown in the game is:"
Emphasis mine.
I think you’ve misunderstood the personality of hackers if you think they would make chips play sounds via radio because it was useful
I saw demos of this at either blackhat or defcon, various methods to exfiltrate data by bitbanging pins, running garbage code, or otherwise triggering hardware or peripherals to generate unintended radio signals to be picked up at a distance.
I’m pretty sure I’ve heard of old games doing this for fun too.
Van eck phreaking is some crazy stuff!
In college I had a PC with a 100Mhz bus. One day I was defragging the hard disk--as one did in those days--and by chance had the PC case cover off and also the FM radio on. As I swept past 100Mhz I picked up the unmistakable KKSSHH CHKS CHKS CHKS coming from the data going over the bus. For a minute or two I thought the NSA bugged me.
Wow... that explains 90mhz and 133mhz chips as targets and bases for front side busses.
Try compiling and running tempest for Eliza if you have a nearby linux/bsd machine.
in college
At Caltech some students would see how bright an LED could get if you immersed it in a liquid nitrogen bath.
There was always something fun going on.
Just last week I spent a few hours using an AM radio to better understand what a locked-up i.MX7 processor was doing. (Unsuccessfully, but it was fun trying.)
You may try FM too. I used this technique with AVRs. It was midly useful, as reading from eeprom produced distinct sound.
I have an old thinkpad x200 that I can hear operating over an AM radio close enough to the laptop but I have a feeling I'm hearing something else besides the CPU because the CPU would run too fast... right?
Was Eunuchs, an OS that runs only on 8088 CPUs, a joking reference to Linux?
Um, not sure if you’re joking or just young, but you have heard of this thing called Unix, right?
Yes, I know about it, it's just that Linux come first to mind due to all the early discussions about it being Torvalds' toy project. Plus I assumed Unix supported also other architectures, given how much variety there was in the early days.
Leisure Suit Larry predates Linux by quite a bit (as I recall the first 8-bit versions of the game came out in the early 80s). As for Unix, in the olden days there were a lot of Unix variations (so there was a tendency to refer to ix as a generic term for all the variations) running on any platform that was at least 16-bit (I don’t think* there were ever any 8-bit Unix variations, but I could be wrong).
The first Leisure Suit Larry game was released 1987.
Huh, I was pretty sure that it was out while I was in high school so before 1986, but I guess that must have been some other adult video game paving the way for LSL.
Maybe you were thinking of Softporn Adventure from 1981. It's a text adventure game by Sierra (at the time they were called On-Line Systems), and Leisure Suit Larry 1 is a graphical adaption of it. Source Wikipedia.
Also, an 8088 cannot run Linux (but it can ran ELKS, which at least has "Linux" in the acronym), while there were a few Unices for 8086-class CPUs - with SCO Xenix being probably the most functional of them all.
Minix can.
Yes, but technically an Unix-like :)
There were a couple more, Coherent (also Unix-like) and PC/IX come to mind too
Neither. It’s a play on “Unix.”
So LSL2 came out in 1988, Linux in 1991, so definitely NOT a reference to Linux. However both the game and Linux are a reference to Unix (Bell Labs, released in 1970s). The LSL2 developers clearly knew about Unix. And the play on word "Eunuchs / Unix" is a reversal of the pun of the original Unix i.e. the authors of Unix were themselves making a pun on the word "Eunuchs". Here, what Unix was "castrating" was an even earlier (1960s?) operating system called Multics developed by Ken Thompson, who got frustrated by all the bloat and complexity, so sought to castrate down the complexity by writing the now famous Unix, whose paradigm spread far and wide and was re-implemented in Linux.
LSL2 was released in 1988. The first Linux kernel release was in 1991 and required an 80386 or later.
From Ralphs Interrupt List, INT 21H with AH=4D ->
https://www.delorie.com/djgpp/doc/rbinter/id/88/29.html
INT 21 - DOS 2+ - GET RETURN CODE (ERRORLEVEL)
more in the link above. That took me like 30+ years ago back ;)
It’s mentioned in one of the answers. With a much better-formatted RBIL edition linked.
Should I be concerned?
A bit like how Lorem Ipsum looks like Latin if you didn't learn any in school.
It's corrupted Latin. It's mostly taken from a book by Cicero.
No-one in the comments there seems to have twigged that OBEAh is simultaneously a hex address and a word for JuJu, magic. Which I suppose is appropriate in the context of a tribal initiation?
"Someone" pointed that out about the same time as your comment here.
Also, it is by coincidence as seen in the COMMAND.COM disassembly which would be the correct answer.
I love that games used to have jokes like this, and that someone was able to ask this question three decades later and get an answer from the author. I'm only sad I didn't get this far in the game!
Yet the top answer is "this is gibberish". Go figure.
Well the top answer was written 3 days ago, the correct one 3 hours ago. Give it some time.
It was just as confidently incorrect then as it is now.
I agree, why did they even say it if it was never correct?
It looks correct to me?
Well it wasn't, as established by the parent parent parent ... comment.
I disagree with it.
You disagree that the code belonged to MS-DOS 3.30 COMMAND.COM?
Nope. I just think that going “this seems like it was just some randomly chosen bit of real code” is an accurate description of the snippet.
Welcome to StackExchange?
And likely will remain the "accepted" answer, unless who made the question comes bothers to come back to it.
This is a huge problem with SO, the person making the question is not usually the most qualified to decide and they usually won't come back to check for further answers.
One of many reasons I stopped answering a long time ago.
Actually, the best answer was written by the question poster himself. Who is probably still not going to mark it as accepted out of a misguided sense of politeness.
They said they don't think their answer is best because the question was "What does it do" not, "Where is it from".
That's an excuse. The real reason is to avoid drama by withdrawing Internet points. Some people can be very salty about this.
That's why "accepted answer" isn't supposed to be treated as "best answer", but just "answer that helped the asker" (and, yeah, often it's the blind leading the blind).
IIRC they recently changed the default sorting of answers to not always put the accepted one first to try to help with that common misconception.
well lets see what happens when they train a llm on all this ”knowledge”.. oh wait
They're not wrong really. It is gibberish on it's own. We don't know where in memory that it starts or the places it is referencing in the jumps. If it were ASM source code those jumps would likely contain labels instead of just raw dogging memory locations.
The fact that it just so happens to be from COMMAND.COM from MS-DOS 3 is a wonderful bit of detective work, but it doesn't make the snippet any less gibberish.
By that definition, any language I don't speak is gibberish, and yet if someone asked me "what does 'Je n'ai pas mangé depuis six jours' mean", replying that it's gibberish is obviously wrong.
That's not really a good comparison, no. The code snippet is more comparable to a sentence fragment, which more often than not is "gibberish".
For example, taken out of its original context, this sentence fragment from your comment is meaningless:
"that definition, any language"
Seems to me, your comment presumes a certain completeness on the part of the utterance/code snippet that isn't necessarily given.
No it is not "gibberish". Gibberish would be a stream of invalid opcodes, zeros and FFs. The code is incomplete, true, but it easily deducable what it is doing. The only thing that looks strange is IRET, but not entirely misplaced.
Isn't it stack overflow wisdom by now to always look for the second or third answer?
It is not on stackoverflow.
It's the same perverse FGITW mechanics though. Worse even, given that the RC site did not implement the change of unpinning accepted answers. Also it's regularly subject to herd voting from Hot Network Questions visitors.
stackexchange = stackoverflow
well, it sort of is gibberish. it starts in the middle of a system call, omitting to state not only the system call's arguments but even which system call to invoke; that's no way to write a program
Yeah
The code is not gibberish, but the way it was put there, missing information, etc, makes it so
yeah, exactly
Go and upvote the real answer below that one.
Not just "somebody", the original questioner posted that answer. Someone suggested they auto accept and they declined as they felt the answer they accepted answered their original question better (what it does, not where it is from).
So there is no unfairness here. Put your pitch forks down.
Didn't think of it was unfair at all. I was just amazed how quickly we could discover such stuff.
Sorry, that was more addressing an assortment of the comments downthread.
It was DOS then. Not eunuchs. How disappointing.
It was sufficiently eunuchs-like for the time.
exactly. the best answer way down there.