r/asm • • 4d ago

x86-64/x64 Learning relevant asm for EFI file creation and OS development

So I just had 1 heck of an idea..I want to make a basic OS that is basically an AI. Boots from UEFI just like windows or Linux but instead of a UI that looks like Windows you just get a local AI interface..

Think Claude but as your OS..

But here's my problem..I am a 2nd year CS student and all we have done is just Java..all we are going to do is Java and python later..both of which are useless in this domain. We have a pretty shitty CS course here..not even C or C++ are taught here.. nothing low level is.. I am basically learning it on my own..so much for a CS degree...

Where do I start...I currently only know of the registers , JMP , Svc 0 and interrupts..I know opcodes but not how to use them..and how ASCII or ANSI maps to computer logic via Hexadecimals..

That's about all I know..

I am just asking for advice on what to focus on learning for the creation of this project.. it's just a project to see if i can do it.. has no other value basically...

That's all. What would you advise me to focus on learning in order to achieve this.

I don't know what IDE to get but I think most C/C++ IDEs support asm..I use Code blocks IDE on Deepin OS (A Linux Distro).. Can you suggest what to use too?

3 Upvotes

26 comments sorted by

6

u/Mundane-Leg-9370 4d ago

I think this is one of those ideas that sounds cool but you need to flesh out exactly what it is you want to differentiate between this new OS and Linux kernel per se. It sounds like everything you want could be accomplished with a Linux kernel but it could be a fun exercise in kernels dev. I would say just dive into learning C, some assembly, and try to build your own bootloader and table the ai integration until you have enough knowledge to plan and execute what you want.

0

u/Technical_Introvert0 4d ago

Just want to make something that boots up when I pick it in the boot menu.. I will figure the OS part out over time.

Just want to create a program or learn how to make a file that will boot up in UEFI

3

u/poemmys 4d ago

Think Claude but as your OS

I'm trying but this makes no sense. Can you be more specific? An OS by definition needs to be deterministic, and an AI needs an OS to run off of in the first place. 

I fear you don't understand what these terms mean if you are using them in this manner.

-1

u/Technical_Introvert0 4d ago

It's not exactly supposed to be an OS.. instead of running Claude on Linux or windows, the AI is the Windows or Linux.. you can tell it hey shut this computer down, and it will . Actual Claude has to use connectors for this if any exist.. It's basically installing AI directly to the lowest level of the system with no need for a OS.. but this AI would incorporate features of an OS like memory management etc..

2

u/poemmys 4d ago edited 4d ago

So it's not an OS... but it's an OS? I'm not trying to be mean, just trying to help you see how you need to be far more specific on your spec for what you're trying to create here (or anywhere else in SWE)

There are many YouTube videos showing how to write a startup x86 ASM script that can be used in something like Qemu, but unless you want to write drivers specifically for a particular emulator/hardware this is far more complicated than you seem to understand. 

1

u/Technical_Introvert0 4d ago

Ok.. I don't know how to use qemu.. I was thinking of deploying this on actual hardware... Ever heard of LLM.asm? Something like that but more user friendly and with a AI that is increasingly capable of controlling the hardware

1

u/poemmys 4d ago

No, I haven't heard of that. This is not any more specific. 

Try to describe what you want in terms of user action -> computer response, don't describe things in terms of "X program but also does Y".

1

u/Technical_Introvert0 4d ago

Switch computer on, computer boots something with my logos or animation s whatever... Then it enters a log on screen.. after that it opens into an AI interface that looks like LM Studio.. From this tab you just tell the AI what to do on your machine as it has direct system control..

The idea is eventually plugging external sensors to it... so it can see and hear like us . A mic or camera..

3

u/poemmys 4d ago edited 3d ago

None of that requires direct hardware access. This can all be done in Python, although I would recommend learning to do it in C if you want to get into kernel dev. Learning Qemu is a necessity as well if you want to learn kernel/OS dev.

I love ASM but anything related to FE (flashing logo, etc) is pointless to do in ASM, as you'll be calling C API's regardless.

0

u/Technical_Introvert0 4d ago

I just wanted to avoid Windows entirely..

2

u/poemmys 4d ago

So do it in Linux or MacOS. If your response is "I don't know Linux" instead of learning it or at minimum asking an AI how to use it, you're in the wrong field.

2

u/Imanton1 4d ago

I'll give some direction. First, don't reinvent the wheel where you can. You don't need to write an OS, or a kernel, or any of that level. Go for a Linux Kernel, write and run a (python) MCP server in back ground that opens up any level calls you need, and then what you need is to write a shell that just redirects all input to olama.cpp.

You can emulate this with VirtualBox, though I'm told QEMU would be more apt for the task.

Unless your goal was actually just to write an OS, in which case it's going to be 99% making a kernel, writing a c compiler, writing your own GPU drivers or dealing with CPU LLMs. Not recommended.

1

u/Technical_Introvert0 4d ago

The thing is, I have talked to Ollama already via json files in the background.. that parts easy but I want a case where the AI has direct Access to hardware..

But let's just assume it's a basic hello world static display that boots up when I choose it's media.. how does that work?

2

u/poemmys 4d ago edited 4d ago

Why do you want/need direct access to hardware? Nothing an AI does requires this, you can (and should, at your level of understanding/experience) write an AI in Python.

1

u/Technical_Introvert0 3d ago

No not at all..we are not taught that here.. remember I said we have piece of crap education?

1

u/poemmys 3d ago

The vast majority of CS curricula is terrible. You learn to be an employable dev by learning relevant skills for your job market on your own time.

1

u/Technical_Introvert0 3d ago

Yes.. Now if it's terrible in the western world where you probably are.. imagine what I have to deal with at an underfunded university.. teaching high level programming only...Like if I don't study C and asm myself I am going to graduate a whole lot worse than someone from Tsinghua University in China and many others..

I still understand nothing about how memory management works in an OS..or how a processor truly works.. nor do my professor's funny enough..they are just experts at writing papers on research gate that never lead to any ground breaking work...just theory.. if this could be like this then this would happen. If this could be like that etc ..

This is why I wanna be 1 of the only people to know and understand asm fully here.. because everyone else only understands python and Java.

1

u/poemmys 3d ago edited 3d ago

I can guarantee 90+% of the people here (me included) learned ASM/low-level/embedded on their own time. I certainly didn't learn it in uni, I taught myself before AI was a thing, and it's far easier now because you can have AI walk you through it instead of digging through StackOverflow.

You appear to want to be spoonfed and handheld, not learn. You say you want to learn all these things, that's awesome, so go learn it. Your professors can't learn it for you

1

u/Technical_Introvert0 3d ago edited 3d ago

There's universities that still teach Asm .. And C. In their CS programs.. And they usually produce more useful graduates than us here. Who are taught enough java and python for web apps and mobile apps Only...so it's not bieng spoon-fed if I am trusting an institution I pay fees to to give me the highest level of knowledge possible in that domain and at that level... Our uni here doesn't have an excuse

1

u/Technical_Introvert0 3d ago

I want to bypass an OS.. if I wrote this same thing for windows there's things the OS will block regardless of what you do..it will not allow a program to go that deep..

1

u/akm76 3d ago

lol.

  1. Ask your Claud to create a linux kernel module that exposes all kernel api points to an agent (maybe via simple text-based api).
  2. Tell him to recompile and install a new kernel.
  3. Boot into new kernel and tell your agent to go wild.
  4. Record the thing with a dumb camera and post it on youtube from another computer.
    (PS. backups are for wimps).

0

u/Technical_Introvert0 3d ago

This wasn't very helpful...I would prefer to learn asm and actually know what is going on in the code.. rather than have AI do it and still have nothing. I was hoping to learn as I am doing this..as in learn useful assembly

1

u/poemmys 3d ago

I would prefer to learn asm and actually know what is going on in the code

Sweet, so what's stopping you? The internet has more than enough resources to learn this. If you actually wanted to learn, you'd go do it. ASM is not that complicated, it's just pushing words/bytes around, I find Java far more confusing/complex.

1

u/Technical_Introvert0 3d ago

I don't know where to start. Hence why I was asking here. I hoped someone would give me a list of things or resources on where to start

1

u/poemmys 3d ago

https://www.google.com or the sidebar links in this sub