home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / fortran / mslang / memacces / api_test.for next >
Text File  |  1993-06-09  |  654b  |  30 lines

  1.       include 'dosx_api.fi'   !Interface statements for the memory functions
  2.  
  3.       program testVid
  4.  
  5.       integer real_addr
  6.       byte buf(2000)
  7.       integer j
  8.  
  9.       open(1,file='dosx_api.tst')
  10.  
  11.       call DosxInitInterface()
  12.  
  13.       real_addr = 16#B800 0000   !Location of Video Text
  14.  
  15.       do i = 0, 14
  16.           do j = 1, 80
  17.               buf(i * 80 + j) = 65
  18.           enddo
  19.       enddo
  20.  
  21.       !Write a few 'A's to the screen
  22.       call WriteMemQQ( real_addr, loc(buf), 15*80 )
  23.  
  24.       !Read back the 'A's (and a bit more)
  25.       call ReadMemQQ( loc(buf), real_addr, 2000 )
  26.  
  27.       write(1,'(2000(1x,Z2))') buf
  28.  
  29.       end
  30.