      interface to function setvideomode(mode)
      integer*2 setvideomode[far,c,alias:"__setvideomode"]
      integer*2 mode
      end
      interface to subroutine
     + getvideoconfig[far,c,alias:"__getvideoconfig"](s)
      structure/videoconfig/
       integer*2 numxpixels
       integer*2 numypixels
       integer*2 numtextcols
       integer*2 numtextrows
       integer*2 numcolors
       integer*2 bitsperpixel
       integer*2 numvideopages
       integer*2 mode
       integer*2 adapter
       integer*2 monitor
       integer*2 memory
      end structure
      record/videoconfig/s [far,reference]
      end
c      interface to subroutine setcrt[c] (al)
c      integer al [reference]
c      end
c      interface to subroutine scolor[c] (al)
c      integer al [reference]
c      end
c      interface to subroutine setmod(a)
c      integer*2 a
c      end
      SUBROUTINE PXZ42O
C     SET TERMINAL TO GRAPHICS MODE
C     AND BACKGROUND COLOR TO BLACK
C     AND INITIAL DRAWING COLOR TO WHITE
C
C
$INCLUDE:'pxz99.cmn'
      include 'fgraph.fd'
c      INTEGER AL,BL,EVER
      integer*2 bl
      DIMENSION DUM(16)
      record/videoconfig/       myscreen
c      DATA DUM/16*0./,EVER/#00000070/
C
      GO TO (100,100,100,100,100,100,100,
     1 100,20,30,40,50),IPLTR
C
C     TANDY 2000(COLOR)
c   10 CALL GETCOL(0,JCODE)
c      AL=8
c      BL=0
c      CALL SETCRT(AL)
c      CALL SCOLOR(0)
c      GO TO 100
C
C     CGA(320X200)
c   20 CALL GETCOL(0,JCODE)
c      AL=0
c      BL=0
c      CALL SETCRT(AL)
c      CALL SCOLOR(0)
c20    bl=4
c      call setmod(bl)
20    bl=setvideomode($MRES4COLOR)
      GO TO 100
C
C     PC(EGA-16 COLORS)
C     640 x 350
c   30 CALL GETCOL(0,JCODE)
c      AL=1
c      BL=0
c      CALL SETCRT(AL)
c      CALL SCOLOR(0)
c30    bl=16
c      call setmod(bl)
30    bl=setvideomode($ERESCOLOR)
      GO TO 100
C
C     PC(VGA-16 COLORS)
C     640 x 480
c   40 CALL GETCOL(0,JCODE)
c      AL=2
c      BL=IPLTR-11
c      CALL SETCRT(AL)
c      CALL SCOLOR(0)
c40    bl=18
c      call setmod(bl)
40    bl=setvideomode($VRES16COLOR)
      GO TO 100
C
C     PC(VGA-256 COLORS)
C     320 x 200
c   50 CALL GETCOL(0,JCODE)
c      AL=3
c      BL=IPLTR-11
c      CALL SETCRT(AL)
c      CALL SCOLOR(0)
c50    bl=19
c      call setmod(bl)
50    bl=setvideomode($MRES256COLOR)
c  100 RETURN
100   if(bl.eq.0) stop 'Error: cannot set graphics mode'
      call getvideoconfig(myscreen)
      return
      END


