×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Borland Pascal: Graphics Problem

Borland Pascal: Graphics Problem

Borland Pascal: Graphics Problem

(OP)
I wrote a DOS program that displays messages in graphics mode.  The program works well in most computers. But recently some people complaint that when run the program in a new laptop with Windows XP or 2000 and ATI video card, the alphabet characters appear OK on the screen but the digits and non-alphabet characters are garbled or just shows blank.  I thought it was the video card in the new laptop causing the problem so I bought a new PC with Windows XP Pro and tested my program in that PC with an ATI card and NVIDIA card but I could not duplicate the problem.

Does anyone have any idea?

RE: Borland Pascal: Graphics Problem

...Bad Luck?

j/k

Sorry No Idea...

Are you using standard pascal function to draw the characters or did you make your own procedures?

I have seen some laptops scramble the characters in QBasic when using the character maps from memory to draw the characters in graphics mode...

It might just be a laptop thing...

Have Fun, Be Young... Code BASIC
-Josh Stribling

http://cubee.topcities.com

RE: Borland Pascal: Graphics Problem

I don't know either, but if it is a system font problem, one way to fix it would be to catch the interrupt that is used to return the address of the system (bios) font, and replace it with your own that either calls the original if faced with a request it doesn't understand, or returns the address of a dummy proc in your own pascal unit, which you would write as an assembler proc containing dw's for all the codes of the font. To avoid making up a complete font yourself you could use the original interrupt on your own computer (that you know works), and take the character definitions from there.
Sorry, very longwinded, and there must be a neater way.
(I'm still stuck in Turbo 6.0 world, so not up on Borland pascal)

RE: Borland Pascal: Graphics Problem

(OP)
Thank you all for your help.  I used the standard "OUTTEXT" function.  I think that part of the font table or video buffer may be overwritten by some other software.  I tried to reserve the video memory start at $A000 in the CMOS setup but in some laptops, I don't see the Chip Set page anymore.  I am thinking of generating a font table for my program but this is very tedious.  While my DOS program has this problem in some laptops, I wrote a Delphi program to show messages.  The Delphi program works OK.

This is the first time I tried this group and I am surprised with the quick responses from Tek-Tips.

RE: Borland Pascal: Graphics Problem

Glad you like this site. So do I. People are often helpful, almost always courteous...
You are right that creating your own table would be tedious, but I'd imagine you could get the address of the font table in your PC and "steal" it - copy it to a file and use that on other systems. I might be wrong, but I think you can get the address by calling interrupt 010h with ah=011h (=character generator), al=030h (get font pointer info), bh=font you want to get (I can't remember the codes, but it's things like 0, 1, 2, 3, for 8*8, 8*14 etc., Abrash's big black book has full details embedded in it somewhere), and the interrupt returns address in es:bp, bytes per character in cx.
If you are interested in going this way and can't find Abrash or get stuck, I can try to dig out the proper details. I did do it once!
Lionel

RE: Borland Pascal: Graphics Problem

The fact is that modern BIOSes either have their own implementation of the second half of the ASCII table or don't implement the second half at all, using the memory for something else. And even though some (older) BIOSes do contain the second half, you can never be sure it's the way you want it because it's not standard (ASCII is a seven bit standard; the MSB was usually used for region specific characters).

What you can do is very easy: make a list of the characters you need on a computer that has a character set you want. You can do this by writing some assembly or you can switch to graphics mode, write a character with outtextxy and retrieve the font data with 8 x 8 = 64 getpixel calls and this 128 times (that's the way I've done it once).

Regards,
Bert Vingerhoets
vingerhoetsbert@hotmail.com
http://student.vub.ac.be/~bvingerh/
Don't worry what people think about you. They're too busy wondering what you think about them.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close