helpp in output

8 views
Skip to first unread message

subiksha

unread,
Jul 22, 2005, 6:01:45 AM7/22/05
to CppF...@googlegroups.com
how to output any charactor on to screen without using "printf"
fuction.(through video buffer-how to?)

anan...@sifycorp.com

unread,
Jul 22, 2005, 6:09:19 AM7/22/05
to CppF...@googlegroups.com, subiks...@gmail.com
if hope ur using turboc , under dos or windows, this works only on those

you can do an output to screen by directly accessing the video ram




char far * video_ram = (char far *)0xB8000000; //if your card is CGA use
0xB0000000;
char * data="Ananth.G";
int i=0;

while (data) {
*(video_ram+i)= *data;
*(video_ram+i+1)= 50; // 50 is the color, try something else if u
dont get any char on screen
i+=2;
++data;
}

hope this works, i dont have turboc for checking...

yours,
ananth.g

subiksha wrote:

>how to output any charactor on to screen without using "printf"
>fuction.(through video buffer-how to?)
>
>
>
********** DISCLAIMER **********
Information contained and transmitted by this E-MAIL is proprietary to
Sify Limited and is intended for use only by the individual or entity to
which it is addressed, and may contain information that is privileged,
confidential or exempt from disclosure under applicable law. If this is a
forwarded message, the content of this E-MAIL may not have been sent with
the authority of the Company. If you are not the intended recipient, an
agent of the intended recipient or a person responsible for delivering the
information to the named recipient, you are notified that any use,
distribution, transmission, printing, copying or dissemination of this
information in any way or in any manner is strictly prohibited. If you have
received this communication in error, please delete this mail & notify us
immediately at ad...@sifycorp.com

Venkatesh Raja

unread,
Jul 22, 2005, 7:01:28 AM7/22/05
to CppF...@googlegroups.com
 
 
 


 
On 7/22/05, subiksha <subiks...@gmail.com> wrote:

how to output any charactor on to screen without using "printf"
fuction.(through video buffer-how to?)




--

Regards,

Venkatesan P.R,
India.

------------------------------------------------------

Babu Subiksha

unread,
Jul 22, 2005, 8:29:43 AM7/22/05
to CppF...@googlegroups.com
thanks ananth;Because im a novice;i feel hard to understand this;but
soon i will.

VASANTH

unread,
Jul 22, 2005, 10:50:20 AM7/22/05
to CppF...@googlegroups.com
hey babu,
with the help of Video Ram we can easily achieve this.

For this you have to use far pointer.

char far *video=(char far*) 0xb0008000L;

and in VRAM each charecter take 2 bytes one for charecter to be display and another for colour of that charecter.

You just use these address for printing .

Refer :-
Let US C
             -Yashwant Kanetkar


On 7/22/05, Babu Subiksha <subiks...@gmail.com> wrote:

thanks ananth;Because im a novice;i feel hard to understand this;but
soon i will.



--
with love
vasanth
Reply all
Reply to author
Forward
0 new messages