logoalt Hacker News

10 REM"_(C2SLFF4

55 pointsby ingvetoday at 11:58 AM10 commentsview on HN

Comments

JSR_FDEDtoday at 2:44 PM

See this is why I never understood LISP people proudly proclaiming that “code is data and data is code”… we were doing this in BASIC for decades already!

show 1 reply
alfiedotwtftoday at 2:45 PM

That was a wild ride!

summa_techtoday at 2:21 PM

It always feels a bit like lost magic. But at the same time, it's also something that was only enabled by the very high determinism of these old home systems. The design relies on having fixed RAM locations, no multiprocessing, etc.

Incredible to find out that typing the paper program would not have worked, though. And in such a disappointing way no less.

show 1 reply
classifiedtoday at 1:58 PM

Those were the times when programming a computer was an adventure in and of itself, bastardizing BASIC with assembler. Doubtlessly the first Make Your Own Adventure setting!

ErroneousBoshtoday at 1:51 PM

This is exactly how we used to do machine code on the Sinclair ZX81, too, where there was no way to declare a block of memory as "off limits" to BASIC, and no DATA statements like in the later (and much bigger) ZX Spectrum BASIC.

Then you'd do "RANDOMISE USR 16514" to start it. Actually USR was interesting because it would pass back the contents of BC when your machine code routine returned to BASIC.

show 1 reply
aa-jvtoday at 1:16 PM

The Oric Atmos won the 10-line BASIC Programming Competition in 2022 with a 1000-room dungeon crawler named "SNAKE TEMPLE":

https://bunsen.itch.io/the-snake-temple-by-rax

IN 10 LINES OF BASIC!!

I thought it was cute that it used the RND() function to seed things necessary to generate each room .. so I used that technique in my own Oric game, which generates a large blob of graphics data using the RND() seed, meaning I don't have to ship that data in the program itself. I find the pseudo-ness of the RNG infinitely resourceful in that regard ..

Another cute trick on the Oric Atmos is to seed the 14 registers of its synth chip with ROM data .. meaning the Oric Atmos has literally THOUSANDS of onboard sound presets to choose from - once you find them, of course. So I wrote a program to find the most interesting ones and have been accruing a list of "synth presets" that come onboard with the Oric, for use in my game.

Its quite rewarding to go back to these machines and use such techniques to generate nearly-infinite levels/sounds/etc.

show 1 reply