FTN4,L
      PROGRAM GNCRC(3)
         WRITE(1, 90) 
C 
C  GNCRC - VERSION 1.0 - JULY 19, 1977
C 
C  GNCRC GENERATES THE CRC AND CHECKSUM THAT IS 
C  STORED AT THE END OF A 2K ROM BLOCK FOR 264X 
C  ROMS. THE CHECKSUM IS USED BY THE TERMINAL 
C  SELF-TEST TO VERIFY PROPER OPERATION OF THE
C  ROMS.
C  THE CRC-16 USES THE FOLLOWING POLYNOMIAL:
C 
C 
   90    FORMAT(/"COMPUTE CHECKSUM FOR 264X ROMS"/) 
   10    WRITE(1, 100)
  100    FORMAT(/"ENTER THE ROM BLOCK SIZE (K)")
         READ(1, *)N
         IF(N .GT. 0 .AND. N .LE. 24) GO TO 30
   20    WRITE(1, 110)
  110    FORMAT(/"ILLEGAL VALUE-  SPECIFY 1,2,4,6,8,10,12,14,16,",
     1     "18,20,22, OR 24") 
         GO TO 10 
   30    IF(N .EQ. 1) GO TO 40
         IF(MOD(N, 2) .NE. 0) GO TO 20
   40    N = N * 1024 
         WRITE(1, 120)
  120    FORMAT(1X) 
      CALL GTCRC(-(N-3))
         END
END$
::
