home *** CD-ROM | disk | FTP | other *** search
/ POINT Software Programming / PPROG1.ISO / pascal / swag / screen.swg / 0039_Move to Screen Pages.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1993-11-02  |  1.1 KB  |  35 lines

  1. { Updated SCREEN.SWG on November 2, 1993 }
  2.  
  3. {
  4. GREG ESTABROOKS
  5.  
  6. >I know how to block-Write directly into $B800:0000, which is the Video
  7. >page, using the MOVE command. Is there a way to do this to a specific
  8. >Page (ie. Page 1, or Page 2)? I've tried it With my routines, but it
  9. >just sends it to whatever page I'm looking at - I assume becuase it is a
  10. >direct access.
  11.  
  12.   Actually if you understand how to use MOVE to blockmove
  13.   everything into $B800:0000 then you already know how to move
  14.   it into the other pages. All you need to do is calculate the
  15.   offsets of the different pages.
  16.   Page 0 = $B800:$0000
  17.   Page 1 = $B800:$0FA0
  18.   Page 2 = $B800:$1F40
  19.   Page 3 = $B800:$2EE0
  20.   (Note These might differ if your using 43/50 line modes)
  21.  
  22.   So if you wanted to move/copy a screen from a buffer to page 1
  23.   you'd do it like this:
  24. }
  25.  
  26. Const
  27.   PageOffs : Array [0..3] of Word = ($0000, $0FA0, $1F40, $2EE0);
  28.  
  29.   Move(Buffer[1], Mem[$B800 : PagesOffs[1]], 4000);
  30.  
  31. { Or from screen 1 to 0 then : }
  32.  
  33.   Move(Mem[$B800 : PageOffs[1]], Mem[$B800 : PageOffs[0]], 4000);
  34.  
  35.