Skip to main content
gamedev.net
🔒 Locked

text formatting

Started by santonel Feb 16, 2003 at 10:03 PM 5 replies 250+ views
Original Post
santonel
santonel
Ok I am an experience C programmer and I am in a Grade 12 C++ (i am in grade 11). So far it is all review for me. However my school was stupid enough to get Visual C++ 6 for writing DOS applications. Anyone who makes a console application with VC++ 6 knows that most of the dos functions are gone. So that means no gotoxy() or textcolor() or anything fun whatsoever. So i took it upon my self to write my own. So i tried to accomplish the effects by calling bios interrupts. Problem : no int86() function! gah! So i tried calling the interrupt with straight assembly language. the result : a blue screen. So anyone know how I can write a function to position the cursor or change the text color background in a win32 console app. Or at least how to make a bios interrupt call?
Lunatic Raven
Lunatic Raven
Look it up in the MSDN, it''s all there.
"...."
Martee
Martee
You can''t directly call BIOS interrupts like that from a Win32 application, so you''ll have to use the Win32 API. Look on MSDN for SetConsoleCursorPosition() and SetConsoleTextAttribute().
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
santonel
santonel
you can make win32 api calls in a console app?
Miserable
Miserable
quote:
Original post by santonel
you can make win32 api calls in a console app?

In a Win32 console application, yes, and this is what VC++ 6.0 will produce.

Keep in mind that those "DOS functions" are non-standard (AFAIK, there is no standard way of handling such things - which makes sense, because not all architectures may support them, let alone in a consistent manner). You may be used to Borland''s programming environment (I was, once), but (again, AFAIK) those are vendor-specific extensions.
daerid
daerid
You could try looking in conio.h
daerid@gmail.com
santonel
santonel
ok thanx for the help.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.