Text in graphics - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Text in graphics

Hey...

How do i display text in graphics mode.


Thanks


Comments

  • Two methods:

    1. use the dos bios interrupt calls to display your text in the standard dos fonts (in pascal this would be very easily accomplished by doing a directvideo:=false);

    2. create your own font-routines (this second method makes ofcourse way more sense), that just draw every single character by putting pixels in the right place.


    The Watcher^TUHB


  • Hi,


    On booting your machine, the bios loads an standard

    font image to your memory. I think there

    is an interrupt routine which gives you a reference

    to the font. Or the font will already load on

    an default address.

    Note: This font has 1 bit per pixel.


    Anyone i had the same problem, but i never solve

    it. :-)

    But i hope, i could help you a little bit.





  • : Hey...

    : How do i display text in graphics mode.


    : Thanks


    THATS VERY easy!

    Make a procedure (in pascal anyway...) to take a string on enter... Loop like this:




    procedure writeMe(string_name: string);

    var no : integer;

    hehe : char;

    For no:= 1 to length(string_name) do

    begin

    hehe := string_name[no];

    asm

    mov ax (?) , hehe....

    the bios call to write a char...

    check in helppc if you don't know it...

    or mail me...

    end;

    end;


    And you have the string on screen....

    some x,y coords vill be needed and colors...




    If you would like to have my proc... (It's working)... mail me, and maybee we also can trade some code... / JeZeX





Sign In or Register to comment.