alien.png TASM Docs -- PROM Programming


[Previous] [Main] [Next]


A wide variety of PROM programming equipment is available that can use object code in one or more of the formats supported by TASM. Here are some notes concerning the generation of code to be programmed into PROMs:

PRESET MEMORY
It is often desirable to have all bytes in the PROM programmed even if not explicitly assigned a value in the source code (e.g. the bytes are skipped over with a .ORG statement). This can be accomplished by using the -c (contiguous block) and the -f (fill) command line option flags. The -c will ensure that every byte from the lowest byte assigned a value to the highest byte assigned a value will be in the object file with no gaps. The -f flag will assign the specified value to all bytes before the assembly begins so that when the object file is written, all bytes not assigned a value in the source code will have a known value. As an example, the following command line will generate object code in the default Intel Hex format with all bytes not assigned a value in the source set to EA (hex, 6502 NOP instruction):
  tasm -65 -c -fEA test.asm

CONTIGUOUS BLOCKS
To ensure that TASM generates object code to cover the full address range of the target PROM, put a .ORG statement at the end of the source file set to the last address desired. For example, to generate code to be put in a 2716 EPROM (2 Kbytes) from hex address $1000 to $17ff, do something like this in the source file:
  ;start of the file
      .ORG    $1000
  ;rest of the source code follows
  
  [
source code]
  
  ;end of the source code
      .ORG    $17ff
      .BYTE   0
      .END

Now, to invoke TASM to generate the code in the binary format with all unassigned bytes set to 00 (6502 BRK instruction), do the following:
  tasm -65 -b -f00 test.asm

(
Note that -b forces the -c option.)





TASM. Copyright (C) 1998 by Squak Valley Software.
All rights reserved.