[comp.sys.ibm.pc.programmer] Another VGA smooth panning question

8324155@max.u.washington.edu (03/09/90)

  First let me thank everyone who took time to answer my first question,
I did wind up using the Start Address Register and the scrolling now proceeds
quite smoothly.  However I have now come across another problem/question.
To pan an image I use the Horizontal Pixel Panning Register (port 3c0h, index
13h).  To write to this port you must do the following:  First, write to the
port the index number, then write the value with which you want to load the
register.  In practice it looks like this:
 
               mov     dx,3c0h
               mov     al,33h            ;  set register index
               out     dx,al
               mov     al,00h            ;  00h being what you want to change
                                         ;  the register to
               out     dx,al
 
This works fine.  However, I have the book "Programmer's Guide to the EGA and
VGA Cards" by Richard F. Ferraro.  In this book he has a small routine to
change this very same register.  His routine looks like this:
 
               mov     dx,3c0h
               mov     al,33h
               mov     ah,00h            :<<<<------ huh?
               out     dx,ax
 
   This does not work.  Is this just a bug that made it to the book?
What I am wondering is if he used this method on an eight bit VGA card,
and the word sent was split into two bytes and sent one after the other,
whereas on my 16 bit VGA card, the whole word is sent at once, and the
high byte is ignored.  Does anyone else have any ideas?  It would certainly
make for a serious incompatibility between 8 and 16 bit cards (or is it just
my card?).
 
   Thanks ahead of time,
     Mark