Live data from Hacker News

Donkey – A computer game included with early versions of PC DOS

github.com

61–70 of 183 posts

Re: Donkey – A computer game included with early versions of PC DOS

#61
post #53

Earlier quoted context omitted.

Could line numbers be out of order? Like, if I did this: 10 PRINT "1" 30 PRINT "2" 20 GOTO 10 What would print out? Just a bunch of "1"s or "12"s?

If you typed those lines, then issued a LIST command, the interpreter would return 10 PRINT "1" 20 GOTO 10 30 PRINT "2" You don't have to type LIST to reorder the lines, that just shows the re-ordering to you. If you didn't type LIST, but did type RUN (with the "unordered" listing) the interpreter would run each line in sequence of line number. If you ran out of line numbers you could sometimes RENUMber the listing.…

[deleted]

Re: Donkey – A computer game included with early versions of PC DOS

#62

Earlier quoted context omitted.

The line numbers in BASIC were arbitrary. People often started at higher numbers and jumped by 10 in case they had to put code or comments before or between lines.

Could line numbers be out of order? Like, if I did this: 10 PRINT "1" 30 PRINT "2" 20 GOTO 10 What would print out? Just a bunch of "1"s or "12"s?

Not an especially valuable comment from me here, but the fact that people who are probably very technically literate can ask this question makes me feel really rather old.

Re: Donkey – A computer game included with early versions of PC DOS

#63
post #52

Earlier quoted context omitted.

Many people did dump on the PC as inferior, but it was a marvelous platform for tinkerers of every sort, and tinker they did. The result was a firehose of applications and hardware add-ons of every sort imaginable, including some unimaginably good ones like Doom. Programmers were utterly amazed by Doom. Nobody had thought that was possible on the PC hardware. The first PC Flight Simulator was another astonishing piec…

> The result was a firehose of applications and hardware add-ons of every sort imaginable, including some unimaginably good ones like Doom. Huh? Doom was developed on NeXT workstations, under the NEXTSTEP operating system. The Doom game engine was programmed in C, and the editing tools were written in Objective-C. The engine was first compiled with Intel's C compiler for DOS, but later Watcom's C/C++ compiler was use…

People were amazed at it running on the PC, and running very well.

Re: Donkey – A computer game included with early versions of PC DOS

#64
post #42
post #32

This reminds me about my time writing games in Basic on my calculator during math class. I suck at math because of this, but at least I'm an ok programmer.

I was rather sad when Dijkstra said anyone who learnt on BASIC was irrepairably broken : "It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration." http://www.cs.virginia.edu/~evans/cs655/readings/ewd498.html The second line of code I ever wrote was in BASIC : goto 10

That line of code reminded me of the following thing you could do to the Commodore PET[1], one of the first computers to use Microsoft BASIC.

   10 GOTO 10
   RUN
Oops. No way to recover without power cycling the computer. I remember Commodore brought their product to an early computer show, and all the annoying nerds (like me) kept entering that one-line program into the demo computers, much to the annoyance of the nearby sales critters.

And it wasn't possible to patch that quickly, since BASIC was in ROM. They probably had a fix about 12 weeks later.

[1] https://en.wikipedia.org/wiki/Commodore_PET

Re: Donkey – A computer game included with early versions of PC DOS

#65
post #8

Context here (Jeff Atwood's blog post dated 2007): https://blog.codinghorror.com/bill-gates-and-donkey-bas/

I love that right rear view mirror attached to the left front wheel! ;-)

Now I want to see what Donkey .NET is like ^^

Re: Donkey – A computer game included with early versions of PC DOS

#66

Earlier quoted context omitted.

Just to add that some BASIC dialects had a RENUMBER or RENUM command that would change all line numbers and references to use a consistent interval. Without that, programs could become hard to modify due to the "gaps" between the lines closing-up.

Couldn't you just increment by 100? Or even 1000? Why did everyone use 10? Was it some interpreter limit that didn't allow line numbers above a certain amount (like 2^15 on a 16-bit CPU)?

Certainly, it would in part depend on the support of the interpreter, though. Realistically, incrementing by 10 was easy, and if you really needed more you could use goto to jump down and back (though obviously that's not nice for readability).

Re: Donkey – A computer game included with early versions of PC DOS

#67
post #16

Andy Hertzfeld recollects how Macintosh team dissected the new IBM PC and what they thought of donkey.bas: http://www.folklore.org/StoryView.py?project=Macintosh&story...

Agree with the article, the code is not to be proud of. One thing about the Macintosh, it was better but the price was way higher. Most people stayed with the z80s that costed a fraction and were as good for games.

The IBM wasn't cheap when it came out - when comapared to a PET or Apple ][

I recall working on a Grey Import IBP Pc in the UK - Our electronics shop built an inverter to convert 240v to 110.

Re: Donkey – A computer game included with early versions of PC DOS

#68

GORILLAS.BAS for the win

My 386 didn't have a color graphics adapter, which required using a program called "Phix" - a terminate-stay-resident that emulated VGA on monochrome. Sadly this completely broke QBASIC (the editor was just a black screen), so I had to reboot the machine (to remove the TSR) in order to hack on GORILLAS.BAS. Compilation times nowadays are still longer than that rigmarole.

Re: Donkey – A computer game included with early versions of PC DOS

#69
post #44
post #30

How old was gates when he wrote this thing??

Ah, programmers. I love how we can show the logic behind 3 correct ages for Bill when he wrote this :)

However, since only one age value can be actually correct in this case, the use of logic looks less like a feature of the programmer's mind and more like a bug.

Re: Donkey – A computer game included with early versions of PC DOS

#70
post #68

GORILLAS.BAS for the win

My 386 didn't have a color graphics adapter, which required using a program called "Phix" - a terminate-stay-resident that emulated VGA on monochrome. Sadly this completely broke QBASIC (the editor was just a black screen), so I had to reboot the machine (to remove the TSR) in order to hack on GORILLAS.BAS. Compilation times nowadays are still longer than that rigmarole.

But it should have some kind of display adapter, what was it, Hercules? I didn't know of any 386-class computers that didn't carry EGA or higher.
Post reply on HN