Kernel and instruction in C
Kernel and instruction in C
write instruction in asm:
_next_line:
mov ah, 0Eh
mov al, 0Dh
int 10h
mov al, 0Ah
int 10h
ret
How write instruction in asm runinng in C??
_print: ........?
_scan: .........?
HELP!!!!!
_next_line:
mov ah, 0Eh
mov al, 0Dh
int 10h
mov al, 0Ah
int 10h
ret
How write instruction in asm runinng in C??
_print: ........?
_scan: .........?
HELP!!!!!
Re:Kernel and instruction in C
#include <stdio.h>
printf ("\n");
I don't know when you use it, but should be okay for now ::)
Else you could use inline assembly.
printf ("\n");
I don't know when you use it, but should be okay for now ::)
Else you could use inline assembly.
Re:Kernel and instruction in C
Dennis, that's nonsense. ???
You can't include anything from the standard library in kernel space because you don't have a standard library in kernel space (unless you ported or implemented one).
You can't include anything from the standard library in kernel space because you don't have a standard library in kernel space (unless you ported or implemented one).
Every good solution is obvious once you've found it.
Re:Kernel and instruction in C
Oops :-[Solar wrote: Dennis, that's nonsense. ???
You can't include anything from the standard library in kernel space because you don't have a standard library in kernel space (unless you ported or implemented one).
He should take a look at the website of Chris Giese www.execpc.com/~geezer
I'm sure he could find some information.
And another thing!
I'm not a C guru, I'm just trying to help
Re:Kernel and instruction in C
No offense intended. I wish it were that easy myself.
Every good solution is obvious once you've found it.
Re:Kernel and instruction in C
Thanks
I please demo function in asm please (printf and scanf)
a'la this:
_next_line:
mov ah, 0Eh
mov al, 0Dh
int 10h
mov al, 0Ah
int 10h
ret
Thanks all links is good idea
I please demo function in asm please (printf and scanf)
a'la this:
_next_line:
mov ah, 0Eh
mov al, 0Dh
int 10h
mov al, 0Ah
int 10h
ret
Thanks all links is good idea
Re:Kernel and instruction in C
Check out the FAQ entry Some small kernels with source.
I'm afraid you will not find "the" solution for your problem. printf() and scanf() both assume the existence of a stdin and a stdout, neither of which are available in kernel space (unless you implement them yourself). For the keyboard, you need an interrupt handler. You have the option to implement your output in text or graphics mode. Lots of design decisions - and that's why we're here in the first place, isn't it?
I'm afraid you will not find "the" solution for your problem. printf() and scanf() both assume the existence of a stdin and a stdout, neither of which are available in kernel space (unless you implement them yourself). For the keyboard, you need an interrupt handler. You have the option to implement your output in text or graphics mode. Lots of design decisions - and that's why we're here in the first place, isn't it?
Every good solution is obvious once you've found it.
Re:Kernel and instruction in C
Er, perhaps we should back up a bit. PJ, could you clarify what you need? Are you trying to call an assembly language function from C (or vis versa)? Trying to use inline assembly code in a C function? Trying to write a printf() function? Some combination of those? Something else?
Re:Kernel and instruction in C
I please links to all tutorials and FAQ of this my problem.
Please!!!
I lite speak english
Thanks ALL!!
Please!!!
I lite speak english
Thanks ALL!!
Re:Kernel and instruction in C
Hmm... I am not sure all the FAQ's and tutorials would help you since virtually all of them are in English... and, as Schol-R-LEA correctly pointed out, we're still not even sure what your problem is. You're probably better of trying to explain to us so we can explain to you...
BTW, what is your native language? Perhaps someone speaking the same language is in a mind of contacting you by e-mail...
BTW, what is your native language? Perhaps someone speaking the same language is in a mind of contacting you by e-mail...
Every good solution is obvious once you've found it.
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Kernel and instruction in C
Given the ".pl" extension of his mailbox, i guess he's from Poland (hope that's the correct spelling)...Solar wrote: BTW, what is your native language? Perhaps someone speaking the same language is in a mind of contacting you by e-mail...
Re:Kernel and instruction in C
You're right, of course... *stupidme*...
All I can offer is German... :-\
All I can offer is German... :-\
Every good solution is obvious once you've found it.
Re:Kernel and instruction in C
May I humbly offer my help? Polish- that's my native language.
W czym moge sluzyc, PJ? Zyczysz sobie napisac printf w asm, czy wykorzystac funkcje z asm w C, czy .. ?
(english:How can I help you PJ, do you want to write printf in asm or use an asm routine in C.)
Cheers,
Adrian
W czym moge sluzyc, PJ? Zyczysz sobie napisac printf w asm, czy wykorzystac funkcje z asm w C, czy .. ?
(english:How can I help you PJ, do you want to write printf in asm or use an asm routine in C.)
Cheers,
Adrian
Re:Kernel and instruction in C
Chodzi mi o jakieś wytłumaczenie na temat tworzenia funkcji C w asm tzn jak trzeba je konstruować, jak się dane pobiera, jakie są podstawowe przerywania itp może masz jakieś linki o tym a może nawet po polsku?
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Kernel and instruction in C
glad to see you finally found each other ... may i suggest you continue the discussion through a private channel ... the poor us that do not have cyrillic support installed see � everywhere ::)