/* .cod file support Copyright (C) 1999 James Bowman, Scott Dattalo This file is part of gpasm & gpsim - which are both a subset of the gnupic project. gpsim is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. gpsim is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with gpsim; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #if !defined(__COD_H) #define __COD_H #include "program_files.h" /* * .cod definitions * * A .cod file consists of an array of 512 byte blocks. There are two types * of blocks: a "directory" block and a "data" block. The directory block * describes the miscellaneous stuff like the compiler, the date, copy right * and it also describes the type of information that's available in the .cod * file. The "type of information" is specified by a range of blocks. For * example, if there are symbols in the .cod file then the directory block * tells the starting and ending blocks that contain the symbols. * * Types of data blocks: * short symbol table - a list of symbols in the "short format", which * means that the symbol name is restricted to 12 characters. This * is an old format and is not provided by gpasm. * long symbol table - a list of symbols in the "long format". Like the * short symbol table except the symbol names can be up to 255 chars. * list table - a cross reference between the source line numbers, list * line numbers, and the program memory. * Memory map table - describes the ranges of memory used in the processor. * Local variables table - [c files - not supported by gpasm] this describes * the memory locations used by functions. * Source file names - a list of the files used to assemble the source file. * Debug messages - [not supported by gpasm] this provides a list of messages * that can control the simulator or emulator. */ #define COD_BLOCK_BITS 9 /* COD_BLOCK_SIZE = 2^COD_BLOCK_BITS */ /* number of bytes in one cod block */ #define COD_BLOCK_SIZE (1<