home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / gnu / gcc / help / 2078 < prev    next >
Encoding:
Internet Message Format  |  1992-09-07  |  4.0 KB

  1. Xref: sparky gnu.gcc.help:2078 comp.os.msdos.programmer:9097
  2. Path: sparky!uunet!mcsun!uknet!edcastle!eonu24
  3. From: eonu24@castle.ed.ac.uk (I Reid)
  4. Newsgroups: gnu.gcc.help,comp.os.msdos.programmer
  5. Subject: djgpp 2.2.2 Q's: mouse/svga/assembler/bios
  6. Message-ID: <25586@castle.ed.ac.uk>
  7. Date: 6 Sep 92 13:33:54 GMT
  8. Distribution: gnu, comp
  9. Organization: Edinburgh University
  10. Lines: 88
  11.  
  12. Subject: DJGPP 2.2.2 questions (mouse/video/assembler)
  13.  
  14. I updated my copy of djgpp to version 2.2.2 and have been happily using
  15. it for some VGA/SVGA graphics programming in the 256 color modes (+ a
  16. little bit in the 32K colour Hicolor modes... nice!). As a consequence
  17. of all this, I have a few questions which I haven't been able to answer
  18. as yet.
  19.  
  20. Thanks in advance for any information which anyone can give me. I
  21. will, of course, summarise anything I receive and post it here if
  22. there is a demand.
  23.  
  24. Iain Reid [Iain_Reid@ed.ac.uk]
  25.  
  26. Those questions.... 
  27.  
  28. Summary:
  29.  
  30. 1. Where is the best place to ask djgpp questions ?
  31. 2. Problems with Trident 8900 chipset and djgpp ?
  32. 3. Mouse support (non libgr.a)? 1 svga bank only ok ?
  33. 4. Interrupt routines ?
  34. 5. 386 assembly & bios
  35.  
  36. Question 1: Asking questions about djgpp
  37.  
  38. Where is the best place to ask programming questions about djgpp? Is
  39. there a mailing list/Usenet group that I should be looking at. Most of
  40. my djgpp specific code will be for 8 bit graphics with assembly
  41. routines for palette manipulation etc. Are there groups of people
  42. working on/with similar things?
  43.  
  44. Question 2: Trident 8900 driver problems.
  45.  
  46. I have a Tseng ET4000 based svga board with a Sierra HiColor RAMDAC
  47. and the standard driver (tseng4k.grd) works perfectly for everything I
  48. have tried so far. Unfortunately my flatmate has not had the same
  49. success with his trident 8900 based board (in a 486-50). We have tried
  50. the trident.grd and tridnt89.grd without any success. I know my test
  51. code is running perfectly on his machine in text mode so the problem
  52. is definitely something to do with the graphics. Has anyone else had
  53. this difficulty and found a solution?
  54.  
  55. Question 3: Murine musings
  56.  
  57. Much of the code I have been writing recently has been to aid
  58. manipulation of sets of 8 bit graphics data files and I wanted to add
  59. mouse support to it. I dug out some source to a previous version of
  60. djgpp, temporarily copied libsrc\gr\int33.s to my source tree and have
  61. been experimenting with that as a usable interface to the int33 mouse
  62. driver. I tried to get a visible cursor using int33 (ax = 3) and
  63. although this works succesfully in mode 0x13 (320x200x256) it doesn't
  64. work in mode 0x2e (640x480x256). Is there any way to use this method
  65. to get a visible cursor in all modes? My guess is that it works in
  66. mode 0x13 because either there is only support for it in strictly VGA
  67. modes or it works because 320x200x256 fits into the 64K vga window
  68. without paging. Is either of these correct and is there a solution
  69. that allows the use of the mouse driver to display the cursor in all
  70. modes (including 800x600 and 1024x768 (both x256))?
  71.  
  72. Question 4: Interrupt routines
  73.  
  74. Are interrupt handlers possible using djgpp? Can anyone give me an
  75. example of source code for one?
  76.  
  77. Question 4: 386 assembler and BIOS
  78.  
  79. 2 questions really...
  80.  
  81. 1. I'm fairly comfortable with 80x86 assembly language and make extensive
  82.    use of the inline assembly features of Borland's Turbo C compiler. I
  83.    read somewhere in the djgpp docs that it supports inline assembly? Can
  84.    anyone send me an example of some to point me in the right direction?
  85.  
  86. 2. Some BIOS functions require arguments in the ES:BP or ES:DX format
  87.    (e.g int 10h, ax = 1130h (get font information)). What is the best
  88.    way to interface to these from C. For example, int 33h function 9
  89.    (set graphics cursor) requires ES:DX to point to a 16 byte bitmap.
  90.    What would need to be done to this code fragment to achieve this?
  91.  
  92.    #include <sys/registers.h>
  93.    char bitmap [16];
  94.    REGISTERS reg;
  95.  
  96.    fill_bitmap (bitmap);    /* Fill bitmap with bits */    
  97.    reg.ax = 0x9;
  98.    reg.dx = ??;  <-- what goes here before the call to int33?
  99.    int33 (®);
  100.