If you know the story about TempleOS and Terry Davis you will likely find this interesting.
I'm posting here because I think the vast majority of you will understand this for the undertaking that it is.
It is, admittedly, a combination of hand coding and vibe coding but I never would have finished it without AI assistance. Even with AI assistance it took a lot of trouble shooting to remain as true as possible to the original language as I could.
BUT DOES IT HAVE...? Yes, there's a list at the bottom.
Terry Davis' story is fascinating and I was contemplating making a documentary about him but I figured that in order to get inside his head I should learn HolyC, and then I should make a port, and now ... I think the CIA is following me (kidding).
This is not even close to finished but it will compile simple programs as windows executables. Running something like schismc.exe hellorld.hc
also works (as well as the ASM output) but there are limitations. I was more concerned with staying true to HolyC than I was with absolute practical functionality.
There is a lot more work to do, and, to be honest, adding in some sort of graphical component to this scares the living crap out of me - I mean, in Windows? Come on. There really hasn't been any significant testing with command line changes to the running program as of yet either.
WHY: Why would you do something like this? There is no monetary or practical reason for doing something like this. I jsut did.
WHAT'S UP WITH THE NAME? IFKYK - but you know a separation form the HolyC would be a ...
WHY WINDOWS, WHY NOT LINUX?: Okay, I get this one a lot ... simply put, I did most of this work late at night when I am writing scripts (the movie kind, not the python kind, ironic that, huh?) so I was able to easily switch back and forth when my brain need a break from one I would switch to the other. Windows is the OS I write film scripts in so that's what I ported to and what I typically write for anyway. Most of my little apps are solutions for filmmaking problems.
HOW: Originally I began by pulling everything I knew about the language, looking at the code and hand coding what I could. I ran into too many brick walls that I could not get past. I understood the concepts but the Windows (screw PE) part of the equation was too much and assembly was kicking my butt. It wasn't until I picked up full-on vibe coding that I was able to break through some of those walls.
WHAT: I feel like I should be giving my WHY answers here but it's basically a complete basic language and it will compile so I'm going to take my golden star and go home for a few weeks.
Here are some aspects of the project that are specific to HolyC/SchismC and you might find interesting that were implemented:
Again, thought that you all might find this interesting as an experiment, and AGAIN, there is still A LOT of work to do on this but I need a break for a few weeks as I have two movie scripts and a couple of foreign and casting deals to lock up.
Please feel free to look through it. Complaints will be ignored in the order that they are received.
Here is the HC and ASM output example for "Hello World"
helloworld.hc
I64 main() {
"Hello, World!";
return 0;
}
Assembly for same:
; Generated by SchismC - MASM Assembly Output
; Target: Windows x64
extrn GetStdHandle:PROC
extrn WriteConsoleA:PROC
extrn ExitProcess:PROC
.data
str_literal_0 DB "Hello, World!", 0
.code
; Main function
main PROC
push rbp ; Save caller's frame pointer
mov rbp, rsp ; Set up new frame pointer
sub rsp, 32h ; Allocate local space
; Get stdout handle
mov rcx, -11 ; STD_OUTPUT_HANDLE
call GetStdHandle
mov rdi, rax ; Save handle
; Write string to console
mov rcx, rdi ; hConsoleOutput
lea rdx, [str_literal_0] ; lpBuffer
mov r8, 13 ; nNumberOfCharsToWrite
mov r9, 0 ; lpNumberOfCharsWritten (NULL)
push 0 ; lpReserved (NULL)
sub rsp, 32 ; Shadow space
call WriteConsoleA
add rsp, 40 ; Clean up stack
mov rax, 0 ; Integer literal
mov rsp, rbp ; Restore stack pointer
pop rbp ; Restore caller's frame pointer
ret ; Return to caller
main ENDP
END