
About This Document

This document contains the following information:

*  how to use the GDS assembler
*  files included on this disk
*  programming the GDS using a programmer, IBM PC printer
   port, or custom hardware configurations.

Files Included On this Disk

The following files are included on this disk:
File Name           Description
GASM.C              'C' source for
                    assembler
                    
GASM.BAT            Batch file that
                    runs the
                    assembler.
GDSASM.EXE          Executable for
                    assembler
                    
                    
PREGASM.EXE,        Preprocessor for
                    GDSASM. Allows you
PREGASM.AWK         to have labels,
                    and place
                    inversions
                    anywhere you want.
                    The AWK source is
                    included, in case
                    you'd like to add
                    your own
                    enhancements.
                    

Using the GDS Assembler

The assembler will accept an ASCII text file containing the
GDS programming instructions, and will create JEDEC and DOC
files if it can assemble the GDS source code. Once the JEDEC
file has been created, the GDS can be programmed by either
downloading the JEDEC file to a programmer, or by using the
JEDTOISP utility to program using the parallel port of an
IBM compatible PC.

Assembling a File

To use the assembler, create an ASCII GDS source file, then
invoke the assembler from the DOS command line, like this:
     gasm test
where test is the name of the GDS source file. GDS will
create a JEDEC file with the same name, and a JED extension,
like "test.jed," and a doc file with a DOC extension, like
"test.doc."
  
  GDS Source Format
  
The following text is an example of a GDS source file.

"This is a comment (line begins with quote mark)
title = 'CDROM DIP SWITCH'

" the ispgds device type (ispgds22, ispgds18, ispgds14)
device = ispgds22

" pin 1 is an output connected to pin 28
pin 1 = pin 28
pin 2 = pin 27

" pin 3 is another output
connected to pin 28

pin 3 = pin 28

" pin 5 is always high
pin 5 = h

"pin 6 is always low
pin 6 = l
pin 8 != pin 22
!pin 9 = pin 20
pin 10 = !pin 19
" example of using labels. Note
" that you can put the label
" anywhere
a_label pin 17
pin 12 = a_label
pin 13 = pin 16
pin 14 = pin 15

  
  Known problems
  
If you duplicate output pin assignments, you will get a
bogus error about pin 0.  Look at the line number in the
error message, it should point you to the actual error.
Don't specify multiple output pins like this:
        pin 1, 2 = pin 28
since the assembler will concatenate 1,2 to 12. Instead use two lines, like this:
        pin 1 = pin 28
        pin 2 = pin 28
  
  Submitting a New Problem Report
  
If you find problems with the assembler, please ZIP the
following files together, and upload to the Lattice BBS at
(503)693-0215:
1.   the GDS source file
2.   the JEDEC file
3.   a description of the error
After the files are uploaded, please call the Lattice
Hotline at 800 327 8425 and inform them that the files have
been uploaded.


