Lunduke
News • Science & Tech
Make Computers Fun Again - Linux, UNIX, Alternative Operating Systems, Computer History, and Retro Computing. Also dad jokes.
Interested? Want to learn more about the community?
January 04, 2023

First post for 8 bit week, I'll talk about a bug. An 8 bit bug.

I recently made a post about anonymous functions in NovaForth: you can surround some code with braces and it'll compile it and leave the address to it on the stack. For example: "{ 5 + }" will leave on the stack a pointer to some code that adds five to things. I have tests for all of this of course so I know it works.

Except it didn't: "execute" is a word that takes a pointer to a function and calls it. So, "{ 3 5 } execute" should be, create a function that pushes 3 and 5 to the stack, then call that function. But doing that in the NovaForth console ( http://sevendral.com/repl/ ) today did not work! It cleared the stack instead, which usually means that the thing crashed and called "quit". So, a conundrum: I know that brace functions work because they're tested all to hell, therefore the problem is in "execute," but "execute" isn't something that can really have a problem. Here's the entire source to that function:

jmp

A single jump with no arguments. Which is a single byte of code in Vulcan, byte 0x5c as a matter of fact. Like I said, it's an 8-bit bug. :) How can one byte have a bug in it?

The story here is that execute takes the pointer given it, calls it, and returns the result. But the pointer it's given is already on the stack, so we just need to call and return, and that's a tail call of course so we can just omit the extra stack frame and let what we're calling return for us, so, it's a jmp. Great, but, how can one instruction have a bug?

Well turns out it was a little bit trickier: I wanted brace functions to not take up space unnecessarily, so, if you make one from interpret mode it sticks it on the heap but doesn't increment the heap: as long as you're not compiling anything it'll be fine, and it means you can do things like "{ foo blah } 10 do-times" (if you were to write a word that takes a function pointer like that). Brace words written this way failed but brace words nested inside functions, even other brace words, worked great. More of a conundrum!

I'm proud that I figured this out without a debugger, although I do need to write a debugger: the answer was that more than just brace functions get built "temporarily" on the heap. As it turns out, a lot more: words being parsed use the heap as temporary storage, so my "execute" was getting written on top of the newly-compiler temporary function and then I was jumping into it. I've since fixed that but found a couple more things that cannot follow a brace function. I need to rearrange things to either use a separate internal scratch buffer for that stuff, or a separate internal scratch buffer for brace functions, I suppose...

Interested? Want to learn more about the community?
What else you may like…
Videos
Podcasts
Posts
Articles
A RISC-V $1,599 Linux Smartphone From Purism?

Don't get too excited just yet: "RISC-V is not yet drop-in and boot-up ready for PureOS. Most peripherals are not supported in mainline Linux."

The Lunduke Journal & LCOS:
https://lunduke.com/

00:22:26
November 15, 2026
LibreOffice Has Biggest Donation Day Ever Thanks to the Microsoft Outage

"The Document Foundation received over 1,000 donations in a single day, setting a new record."

(The Date in the video says Nov 13th, but this was actually recorded on Nov 15th.)

The Lunduke Journal & LCOS:
https://lunduke.com/

00:14:47
November 13, 2026
PCMag: "Here's an Award! Now Pay Us $10K!"

Paint.NET was given an award by PCMag. Just one catch: The developer can't show people unless he pays PCMag. The Tech Journalism world is dirty.

The Lunduke Journal and LCOS:
https://lunduke.com/

00:17:02
November 22, 2023
The futility of Ad-Blockers

Ads are filling the entirety of the Web -- websites, podcasts, YouTube videos, etc. -- at an increasing rate. Prices for those ad placements are plummeting. Consumers are desperate to use ad-blockers to make the web palatable. Google (and others) are desperate to break and block ad-blockers. All of which results in... more ads and lower pay for creators.

It's a fascinatingly annoying cycle. And there's only one viable way out of it.

Looking for the Podcast RSS feed or other links? Check here:
https://lunduke.locals.com/post/4619051/lunduke-journal-link-central-tm

Give the gift of The Lunduke Journal:
https://lunduke.locals.com/post/4898317/give-the-gift-of-the-lunduke-journal

The futility of Ad-Blockers
November 21, 2023
openSUSE says "No Lunduke allowed!"

Those in power with openSUSE make it clear they will not allow me anywhere near anything related to the openSUSE project. Ever. For any reason.

Well, that settles that, then! Guess I won't be contributing to openSUSE! 🤣

Looking for the Podcast RSS feed or other links?
https://lunduke.locals.com/post/4619051/lunduke-journal-link-central-tm

Give the gift of The Lunduke Journal:
https://lunduke.locals.com/post/4898317/give-the-gift-of-the-lunduke-journal

openSUSE says "No Lunduke allowed!"
September 13, 2023
"Andreas Kling creator of Serenity OS & Ladybird Web Browser" - Lunduke’s Big Tech Show - September 13th, 2023 - Ep 044

This episode is free for all to enjoy and share.

Be sure to subscribe here at Lunduke.Locals.com to get all shows & articles (including interviews with other amazing nerds).

"Andreas Kling creator of Serenity OS & Ladybird Web Browser" - Lunduke’s Big Tech Show - September 13th, 2023 - Ep 044
October 28, 2026
post photo preview
3 Days Left to get your name into LCOS 1.0’s About Window!

Holy imminent operating system release, Batman!

Three things worth knowing:

  1. Saturday, October 31st is the last day to get your name into the LCOS About Window by picking up a Lifetime Lunduke Journal Subscription.

  2. Saturday, October 31st is also the last day when Lifetime Subscriptions are massively discounted. (Crazy, how those two dates line up! What a coincidence!)

  3. Sunday, November 1st is the official release date for LCOS 1.0!

Want your name in the About window for the Lunduke Computer Operating System 1.0? You’ve got about 3 days left to make it happen!

Here’s what to do:

  1. Go to this page and pick up a Lifetime Subscription (aka “One Time Contribution with Lots of Perks”).

  2. Within a few hours, you’ll receive a confirmation email from yours truly with all the details.

  3. Reply to that email with how you want your name displayed in the LCOS 1.0 About Window (nick name, first name, or full name are all aok).

Just be sure complete step 3 before midnight (Central Time) on Saturday, October 31st so it definitely makes it onto the final LCOS 1.0 build! My advice? Do this by Friday, October 30th so there’s no chance you miss it!

Huge thank you to everyone who has been supporting The Lunduke Journal and LCOS! You make all of this possible!

-Lunduke

Image
 
Read full Article
October 17, 2026
post photo preview
LCOS 1.0 Ships on November 1st!

A release date has officially been selected!

The Lunduke Computer Operating System (LCOS) 1.0 will ship on November 1st… just two weeks from now!

A few quick tidbits worth mentioning:

Worth repeating: If you want your name in the LCOS About Window (see the screenshot below), you only have through October 31st to grab a Lifetime Subscription to The Lunduke Journal and make that happen.

Huge thank you to everyone who has contributed with both hardware testing and financial support. We’ve had absolutely tremendous momentum over the last few months, and that wouldn’t have been possible without all of you.

-Lunduke

 
Read full Article
October 13, 2026
post photo preview
LCOS 0.9.3 has Landed! Plus: How to Help.

The Lunduke Computer Operating System (LCOS) is flying towards the official, 1.0 release — with version 0.9.3 now available for testing!

Between now and 1.0, LCOS is laser focused on a) fixing bugs and b) making sure it runs (and runs well) on as much hardware as possible.

Right now, LCOS needs your help. Here’s how:

  1. Test the latest LCOS release on your hardware. Hit any snags? Report them on GitHub, the Lunduke Forum, or via DM on X.

  2. Donate to LCOS (and The Lunduke Journal), so that we can expand our hardware testing lab (among other expenses).

If you haven’t already, watch the LCOS Roadmap video, to get an idea for where we’re heading (in 1.0 and beyond).

Then check out this page, for details on how to support LCOS & The Lunduke Journal (and get your name on the LCOS 1.0 About window in the process).

A huge thank you to everyone who has already contributed (in both ways)! With your help, we are making LCOS into the best gosh darned system in all the land.

-Lunduke

Image
 
Read full Article
See More
Available on mobile and TV devices
google store google store app store app store
google store google store app tv store app tv store amazon store amazon store roku store roku store
Powered by Locals