Settings

Theme

Wozmon for x86-64

github.com

60 points by ianseyler 2 years ago · 31 comments

Reader

k8svet 2 years ago

Read the readme, consider myself a mostly-not-total-idiot. Would buy author a beer to add a whole two sentences to illuminate what wozman is. If it's just that niche and I'm ignorant feel free to ignore me.

rendaw 2 years ago

I have this image of you spending years painstakingly rewriting this, just for Apple to release their ARM processors.

FWIW I have no idea what Wozmon is, just a sentence or two at the top for people not familiar with the original.

  • selcuka 2 years ago

    > I have this image of you spending years painstakingly rewriting this

    Initial commit: 5 days ago

gabrielsroka 2 years ago

What a coincidence. I recently converted the 6502 version to Python and then worked with ChatGPT to convert the Python to C. (I'm not a C programmer.)

https://github.com/gabrielsroka/gabrielsroka.github.io/tree/...

  • asveikau 2 years ago

    To support running code you'll need to call mprotect(2) on the buffer to make it executable.

    If you hit Ctrl-d on this code it will burn through that loop constantly with no input. You need to check fgets()'s return code, it will be NULL on error or eof.

    • gabrielsroka 2 years ago

      Thank you. I saw a warning about that from the compiler. But like I said I'm not a C programmer. Feel free to submit a PR if you like.

      I assume you're talking about Linux/Unix. I'm mostly a Windows guy.

      • asveikau 2 years ago

        I am knowledgeable about both. Unix guy at heart but used to work for MSFT on windows.

        The Windows version of mprotect(2) is VirtualProtect. It would probably make more sense to allocate the buffer with VirtualAlloc with the correct flags, rather than modify a stack buffer. The Unix version of that would be to allocate with mmap(2).

        Edit: https://github.com/gabrielsroka/gabrielsroka.github.io/pull/...

  • ianseylerOP 2 years ago

    Interesting to see it written in higher-level languages!

atcalan 2 years ago

I remember vapor locking on figuring out addresses in hand assembled 6809 machine code in middle school. It was amazing what Woz pulled off with this. I wish I knew that the apple ii plusses in the computer lab probably had something like wozmon on them.

bArray 2 years ago

Very cool.

When it mentions a bare metal kernel, I thought about the BareMetal OS by ReturnInfinity: https://github.com/ReturnInfinity/BareMetal-OS

vbitz 2 years ago

Awesome. Nice and easy to get working as well.

danbruc 2 years ago

wozmon.sh run will start Wozmon in a QEMU virtual machine.

Does it also run without the virtual machine?

  • creatonez 2 years ago

    From the author's BareMetal exokernel repository:

    > Key features

    > [...]

    > Physical and virtual hardware support with full virtualization, using x86 hardware virtualization whenever available (it is on most modern x86-64 CPU's). In principle BareMetal should run on any x86-64 hardware platform, even on a physical x86-64 computer, given appropriate drivers. Officially, we develop on QEMU and VirtualBox, which means that you can run BareMetal on both Linux, Microsoft Windows, and Apple macOS.

    There's no indication of specific real-world testing, though.

  • hsnewman 2 years ago

    Why would it not?

    • danbruc 2 years ago

      Should have been more specific, can I run it on Linux or Windows and mess with the memory content? So why not? Because of dependencies on BareMetal or having to overcome the isolation build into the operating system it runs on top of.

DeathArrow 2 years ago

I understand what this is. What I don't understand is what is the purpose of doing it.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection