Answer the question
In order to leave comments, you need to log in
How to build a binary with an assembler entry point for a C kernel?
Tell me ways, perhaps links, names, how you can transfer control to code written in C.
It’s just that earlier everything that I wrote was in one file and in one language, but here I don’t understand how to combine everything so that it works ..)
Answer the question
In order to leave comments, you need to log in
Here's a tutorial on how to call code written in C from assembler:
https://wiki.osdev.org/Bare_Bones_with_NASM
Full guide:
https://wiki.osdev.org/Bare_Bones
You need to define the function you want to call, as extern (if you use NASM) in assembly code (as far as I understand, you have this function in another object file compiled from C code). Then just call it. (Just don't forget to arrange everything correctly.)
It seems to be what you need.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question