⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fscreen.for

📁 开放源码的编译器open watcom 1.6.0版的源代码
💻 FOR
字号:
* FSCREEN.FOR
* The following program shows how to access screen memory
* from a FORTRAN program under DOS/4GW or compatible
* DOS extenders.

* Compile & Link: wfl386 -l=dos4g fscreen

      program fscreen

* Allocatable arrays must be declared by specifying their
* dimensions using colons only (see Open Watcom FORTRAN 77
* Language Reference on the ALLOCATE statement for details).

      character*1 screen(:,:)
      integer SCRSIZE, i

      parameter ( SCRSIZE = 80*25 )

* Under DOS/4GW, the first megabyte of physical memory - the
* real memory - is mapped as a shared linear address space.
* This allows your application to access video RAM using its
* linear address.  The DOS segment:offset of B800:0000
* corresponds to a linear address of B8000.

      allocate( screen(0:1,0:SCRSIZE-1), location='B8000'x )

      do i = 0, SCRSIZE - 1
        screen(0,i) = '*'
      enddo

      end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -