When you compile apps in C, without dos could you use "printf" still ?
Or do you have to integrate assembly into C.
could you use normal functions like "printf"
RE:could you use normal functions like "printf"
>On 2001-09-24 20:04:12, truenoteno wrote:
>When you compile apps in C, without dos could you use "printf" still ?
printf() will eventually call a function to send
text to stdout. No DOS, no stdout.
If you have cprintf(), it might work without changes. If not, you might be able to use sprintf():
char buf[64];
sprintf(buf, "%u score and 7 years ago", 4);
cputs(buf);
(write your own cputs() function)
The printf() functions call a lot of other
code, for different character sets, floating
point math, etc, so it might be difficult to
use them without an OS. If all else fails,
you can write your own printf() or use mine:
http://www.execpc.com/~geezer/osd/code/ ... doprintf.c
http://www.execpc.com/~geezer/osd/code/inc/_printf.h
http://www.execpc.com/~geezer/osd/code/inc/stdarg.h
>Or do you have to integrate assembly into C.
You can write printf() in C.
>When you compile apps in C, without dos could you use "printf" still ?
printf() will eventually call a function to send
text to stdout. No DOS, no stdout.
If you have cprintf(), it might work without changes. If not, you might be able to use sprintf():
char buf[64];
sprintf(buf, "%u score and 7 years ago", 4);
cputs(buf);
(write your own cputs() function)
The printf() functions call a lot of other
code, for different character sets, floating
point math, etc, so it might be difficult to
use them without an OS. If all else fails,
you can write your own printf() or use mine:
http://www.execpc.com/~geezer/osd/code/ ... doprintf.c
http://www.execpc.com/~geezer/osd/code/inc/_printf.h
http://www.execpc.com/~geezer/osd/code/inc/stdarg.h
>Or do you have to integrate assembly into C.
You can write printf() in C.
Re: could you use normal functions like
I am under the assumption that you can't use printf when you call it without DOS, unfortunately. Same with inputting data from what the user typed, or even letting the user see what they typed. This all has to be done by implementing C with ASM. I understand that normally you use 'extern void' to call an ASM function in C.
Re: could you use normal functions like
Seriously?? This thread is 8 years old!
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: could you use normal functions like
I'd say Necro and sheer stupidity. Please learn to read first.
you wrote:you can't use printf
Chris Giese wrote:you can write your own printf()
You wrote:This all has to be done by implementing C with ASM
Chris Giese wrote:You can write printf() in C.