home *** CD-ROM | disk | FTP | other *** search
-
- SCALED BIT MAP ASSEMBLY VERSUS C TUTURIAL PROGRRAM
-
- Written by John W. Ratcliff
-
- ========================================================================
-
- Contains Scaled bit map code for standard MCVGA 320x200 256 color
- graphics mode, in both assembly language and C form. Big, Big, warning
- about performance testing. The machine is spending huge amounts of it's
- time just accessing video ram. The only fair test would be to rewrite
- the routines to access system ram, and then time them. Well worth
- taking a look at but I'm not going to do it tonight.
-
- The C and Assembly algorithms are 100% exactly identitical. The only
- optimizations made were simply those afforded by being in assembly
- language! No C library function calls were invoked by the C
- implementation because that is an unfair test. C library functions are
- written in assembly language, and the point of the excercise was to
- compare C directly to assembly.
-
- To run the program type STEST <filename>
- where <filename> is the name of one of the BLT images provided. Just
- type STEST JOHN2, or STEST FAT1, etc.
-
- The program REQUIRES a 386 with VGA graphics to run.
-
- The first thing that comes up is an interactive blit display, using
- the C routines. The following keys are active.
-
- Part #1: Interactive bit map display.
-
- All Cursor keypad keys move the blit image around the screen.
- Hit - to shrink the image.
- Hit + to expand the image.
- Hit the SPACEBAR to toggle between Assembly routines or C routines.
- Hit the ESC key to go to the next part of the demonstration.
-
- Part #2: Display Full Size Blit Images in C.
-
- Randomly displays the blit image at full size using the C PutBlit
- routine. Hit a key to go to the next part.
-
-
- Part #3: Display Full Size Blit Image, in Assembly.
-
- Randomly displays the blit images at full size, but uses a
- high speed assembly language blit dump routine.
-
- Part #4: Display Blit Images SCALED in C
-
- Randomly displays the blit images at random sizes using
- the C PutBlitSize routine.
-
- Part #5: Display Blit Imags SCALED in Assembly
-
- Randomly display the blit images, at random sizes using
- the Assembly PutBlitSize routine.
-
-
- The scaling code algorithm uses a pre-computed scale table, per
- scale size, that has a look up from the source blit, to the
- destination output. There are faster ways to scale bit maps, but
- this is in the public domain, so you get what you pay for. This
- scaling routine doesn't make blit images larger, though that isn't
- that hard to do.
-
- The assembly language makes heavy used of 386 specific instructions
- because the processor is obviously what assembly programmers should
- be thinking about optimizing towards.
-
-
- PLEASE EXAMINE THE DESCRIPTION OF THE FILES INCLUDED IN THIS UPLOAD:
-
- 100% of this code was written, debugged, and tested, between 10:00pm
- and 1:00Am December 20, 1992, by John W. Ratcliff, for Jesse and the
- other guys on Compuserve's GAMFORUM. This source code is being released
- into the public domain by John W. Ratcliff, December 20, 1992. Improvements
- are to be shared with the general public. Send fixes, updates, or comments
- to John W. Ratcliff: CSERVE: 70253,3237, or BBS: 314-939-0200.
-
-
- KEYS H #define's extended key codes for cursor keypad.
-
-
- STEST C C source to the Scaling Test program.
- STEST PRJ Borland C Project file.
- STEST DSK Borland C DSK file.
- STEST OBJ Object file.
- STEST EXE Scaling test executable.
-
- CVIDEO H C prototype header for C version of video functions. CVIDEO.C
- CVIDEO C The C version of the video functions CPutBlit and CPutBlitSize
- CVIDEO OBJ Object code for CVIDEO.C
-
- 386 MAC Contains usefull 386 macros.
- PROLOGUE MAC Contains usefull assembly language macros.
- VIDEO H C prototype header file
- VIDEO ASM Assembly language source code to video functions.
- VIDEO OBJ Object produced.
-
- JOHN2 BLT A blit image file.
- JOHN2 RGB The palette for JOHN2.BLT
- JOHN3 BLT Another blit image file of yours truely.
- JOHN3 RGB The palette file for JOHN3.BLT
- JOHN4 BLT Me and my extremely lovely wife on our honeymoon.
- JOHN4 RGB My wife's lovely color palette.
- FAT1 BLT George Sanger, AKA The Fat Man, dressed up as Andy Worhol.
- FAT1 RGB The accompanying palette file.
-
-