Skip to content

Example leads to Immediate Stack Overflow #8

Open

Description

@cpiker

The example of using blink16 in README.md:

cd blink16
./blink16 banner ELKS

Leads to an almost immediate stack overflow as soon anything is pushed to the stack. The

push cx

line triggers the issue. Which is reported as:

Stack overflow SS:SP = 101b:199c

Is this the expected behavior? I'm assuming the example program might make it a bit further, at least getting to main() before exiting, but maybe I'm incorrect.

Since the program wasn't run by the ELKS loader, it possible that something wasn't placed in memory correctly, or some register wasn't set before execution.

Activity

  1. ghaerr commented on Feb 3, 2026

    @ghaerr
    Owner

    Hello @cpiker,

    Thanks for reporting this, this is not expected behavior. I will look into this and report back!

  2. ghaerr commented on Feb 3, 2026

    @ghaerr
    Owner

    @cpiker, I develop on macOS, and running ./blink16 banner ELKS works fine. Are you using 'c' to start the emulation, or some other keystroke? What OS are you running on, exactly? It seems there might be some incompatibilities between host OS systems.

    Here is a screenshot of my working ./blink16 banner ELKS just before typing 'c' to continue the emulation:
    Image

    I also tested with the latest ELKS banner and that works too.

  3. cpiker commented on Feb 3, 2026

    @cpiker
    Author

    Oh, sorry, maybe this is just pilot error. I started debugging using the s command, I take it that's a bad idea?

    I randomly used a Rocky Linux 8 system, since that's the current computer occupying the the comfy desk. I do have a mac I could use, but the keyboard is so infuriating to my ingrained typing patterns that I typically don't mess with it unless I happened to be debugging a MacOS specific problem.

    I can move over to an Ubuntu24 compatible system if you'd prefer.

  4. ghaerr commented on Feb 3, 2026

    @ghaerr
    Owner

    The s)tep command also works fine on my system, so I'm not sure what exactly the problem is. I would suggest trying biink16 on macOS to see if it works there, and if so, then trying on Linux. Perhaps there is a Linux compatibility bug, since I have no Linux system easily available to try running this on. Are you compiling the Linux versions in 64- or 32- bit?

  5. cpiker commented on Feb 3, 2026

    @cpiker
    Author

    I just ran:

    cd blink16
    make

    after checkout and didn't pay attention. It's a 64-bit system of course. Is a 32-bit build assumed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions