1

I am working on an 8086 dos assembly project , using video mode i was able to draw some lines and stuff but now i want to print some characters and found that (interrupt 10,2) uses character (row,col) coordinates that is different than video mode coordinates

what is the most elegant way to map between those two coordinates ? or there is a better way to print characters in video mode ?

what i know currently is that i can do the mapping manually but it won't be accurate as there is no floating point operations in 8086...

Ahmed Kotb
  • 6,269
  • 6
  • 33
  • 52
  • Please clarify what you mean by "video mode coordinates". – user200783 Dec 06 '10 at 20:31
  • coordinates used for this interrupt (10,0c) http://www.htl-steyr.ac.at/~morg/pcinfo/hardware/interrupts/inte6r74.htm – Ahmed Kotb Dec 06 '10 at 20:46
  • 1
    Why would you need floating-point to convert screen coordinates? – Jens Björnhager Dec 07 '10 at 11:51
  • if 5 character cols corresponds to 50 pixels , then if i want to put a character at pixel number 60 i have to make something like that 60/50*5 = 1.2*5 = 5 (as 60/50 = 1 int division) ... also i didn't say that this is the best solution , if you a have a better solution just say it – Ahmed Kotb Dec 07 '10 at 16:46

3 Answers3

1

Since it wasn't allowed to use external libraries , i ended up doing a simple seven segment like procedure do draw numbers , it looks something like this 7segment numbers

the code can be found here if any one is interested

Ahmed Kotb
  • 6,269
  • 6
  • 33
  • 52
0

Here you'll find an outstanding ASM library implementing for example:

GPRINT prints ASCIIZ string on a graphics screen

HTH!

Dr. belisarius
  • 60,527
  • 15
  • 115
  • 190
  • seems great ,but i may not be able to use an external library , if i didn't get more answers i will accept that ... does that lib have a website ? is the source code available ? – Ahmed Kotb Dec 06 '10 at 21:14
  • 1
    @Ahmed The source code for that one was available for $$ years ago, I really don't know whether it's possible to buy it now. Here you can find a free source code example of text display : http://www.angelfire.com/rnb/byte/vga_vul.zip HTH – Dr. belisarius Dec 07 '10 at 13:05
0

Everything you need should be in the following book:

http://www.amazon.com/gp/offer-listing/091539135X/ref=dp_olp_0?ie=UTF8&redirect=true&condition=all

Unfortunately, with the advancement of time/how old that technology is and all, those books are getting harder to find and all the info that used to be floating around on the Internet seems to gradually dropping offline too.

Brian Knoblauch
  • 20,639
  • 15
  • 57
  • 92