home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / screen / stest / readme.prn < prev    next >
Encoding:
Text File  |  1992-12-22  |  4.2 KB  |  111 lines

  1.  
  2.     SCALED BIT MAP ASSEMBLY VERSUS C TUTURIAL PROGRRAM
  3.  
  4.          Written by John W. Ratcliff
  5.  
  6. ========================================================================
  7.  
  8. Contains Scaled bit map code for standard MCVGA 320x200 256 color
  9. graphics mode, in both assembly language and C form.  Big, Big, warning
  10. about performance testing.  The machine is spending huge amounts of it's
  11. time just accessing video ram.    The only fair test would be to rewrite
  12. the routines to access system ram, and then time them.    Well worth
  13. taking a look at but I'm not going to do it tonight.
  14.  
  15. The C and Assembly algorithms are 100% exactly identitical.  The only
  16. optimizations made were simply those afforded by being in assembly
  17. language!  No C library function calls were invoked by the C
  18. implementation because that is an unfair test.    C library functions are
  19. written in assembly language, and the point of the excercise was to
  20. compare C directly to assembly.
  21.  
  22. To run the program type STEST <filename>
  23. where <filename> is the name of one of the BLT images provided.  Just
  24. type STEST JOHN2, or STEST FAT1, etc.
  25.  
  26. The program REQUIRES a 386 with VGA graphics to run.
  27.  
  28. The first thing that comes up is an interactive blit display, using
  29. the C routines.  The following keys are active.
  30.  
  31. Part #1: Interactive bit map display.
  32.  
  33.     All Cursor keypad keys move the blit image around the screen.
  34.     Hit - to shrink the image.
  35.     Hit + to expand the image.
  36.     Hit the SPACEBAR to toggle between Assembly routines or C routines.
  37.     Hit the ESC key to go to the next part of the demonstration.
  38.  
  39. Part #2: Display Full Size Blit Images in C.
  40.  
  41.     Randomly displays the blit image at full size using the C PutBlit
  42.     routine.  Hit a key to go to the next part.
  43.  
  44.  
  45. Part #3: Display Full Size Blit Image, in Assembly.
  46.  
  47.     Randomly displays the blit images at full size, but uses a
  48.     high speed assembly language blit dump routine.
  49.  
  50. Part #4: Display Blit Images SCALED in C
  51.  
  52.     Randomly displays the blit images at random sizes using
  53.     the C PutBlitSize routine.
  54.  
  55. Part #5: Display Blit Imags SCALED in Assembly
  56.  
  57.     Randomly display the blit images, at random sizes using
  58.     the Assembly PutBlitSize routine.
  59.  
  60.  
  61. The scaling code algorithm uses a pre-computed scale table, per
  62. scale size, that has a look up from the source blit, to the
  63. destination output.  There are faster ways to scale bit maps, but
  64. this is in the public domain, so you get what you pay for.  This
  65. scaling routine doesn't make blit images larger, though that isn't
  66. that hard to do.
  67.  
  68. The assembly language makes heavy used of 386 specific instructions
  69. because the processor is obviously what assembly programmers should
  70. be thinking about optimizing towards.
  71.  
  72.  
  73. PLEASE EXAMINE THE DESCRIPTION OF THE FILES INCLUDED IN THIS UPLOAD:
  74.  
  75. 100% of this code was written, debugged, and tested, between 10:00pm
  76. and 1:00Am December 20, 1992, by John W. Ratcliff, for Jesse and the
  77. other guys on Compuserve's GAMFORUM.  This source code is being released
  78. into the public domain by John W. Ratcliff, December 20, 1992.    Improvements
  79. are to be shared with the general public.  Send fixes, updates, or comments
  80. to John W. Ratcliff: CSERVE: 70253,3237, or BBS: 314-939-0200.
  81.  
  82.  
  83. KEYS     H     #define's extended key codes for cursor keypad.
  84.  
  85.  
  86. STEST     C    C source to the Scaling Test program.
  87. STEST     PRJ    Borland C Project file.
  88. STEST     DSK    Borland C DSK file.
  89. STEST     OBJ    Object file.
  90. STEST     EXE    Scaling test executable.
  91.  
  92. CVIDEO     H    C prototype header for C version of video functions. CVIDEO.C
  93. CVIDEO     C    The C version of the video functions CPutBlit and CPutBlitSize
  94. CVIDEO     OBJ    Object code for CVIDEO.C
  95.  
  96. 386     MAC    Contains usefull 386 macros.
  97. PROLOGUE MAC    Contains usefull assembly language macros.
  98. VIDEO     H    C prototype header file
  99. VIDEO     ASM    Assembly language source code to video functions.
  100. VIDEO     OBJ    Object produced.
  101.  
  102. JOHN2     BLT    A blit image file.
  103. JOHN2     RGB    The palette for JOHN2.BLT
  104. JOHN3     BLT    Another blit image file of yours truely.
  105. JOHN3     RGB    The palette file for JOHN3.BLT
  106. JOHN4     BLT    Me and my extremely lovely wife on our honeymoon.
  107. JOHN4     RGB    My wife's lovely color palette.
  108. FAT1     BLT    George Sanger, AKA The Fat Man, dressed up as Andy Worhol.
  109. FAT1     RGB    The accompanying palette file.
  110.  
  111.