	LOADINT utility for IDA
	-----------------------

The LOADINT utility creates/updates the interrupts database file IDA.INT
Command line:

	LOADINT COMMENT.CMT IDA.INT

If the output file doesn't exist, LOADINT will create it, otherwise LOADINT
will update it. You may compress IDA.INT afterwards (optionally):

	IDACOMP IDA.INT

Input files are:

INS	 HPP	- enumeration of instructions for all processors.
		  don't modify this file
COMMENT  CMT	- main comments file
ARM      CMT    - ARM	      instruction comments
I51      CMT    - Intel 8051  instruction comments
I860     CMT    - Intel 860   instruction comments
INT      CMT	- Intel 80x86 "int" instruction comments
JAVA     CMT    - Java	      instruction comments
M65      CMT    - 6502	      instruction comments
MC68     CMT    - 680x0	      instruction comments
MC8      CMT    - 68xx	      instruction comments
PC       CMT    - Intel 80x86 instruction comments
PDP      CMT    - PDP-11      instruction comments
PORTIN   CMT	- Intel 80x86 "in"  instruction comments
PORTOUT  CMT	- Intel 80x86 "out" instruction comments
TMS320   CMT    - TMS320Cx    instruction comments
VXD      CMT	- Intel 80x86 virtual device driver comments
Z80      CMT    - Z80	      instruction comments

You can modify *.CMT files. Brief description of these files follows:

	The comments database is one big 'switch' instruction in the
	C-language sense. When IDA needs to find a comment for an instruction,
	it 'executes' this big switch and retrieves a comment.
	So, we have the following construction:

		switcher ? value1 : comment
			   value2 : comment

	For example,

		cmd ? NN_mov : "comment for 'move' instruction"


More strictly (terminals UPPERCASE), alternatives on different lines:

	switch  :=  switcher ? cases
	cases   :=  case cases
		    case
	case    :=  values : comment
	values  :=  value
		    value || values
	value   :=  NUMBER
		    IDENT
		    KEYWORD_other
	comment :=  STRING
		    STRING { switch }			     (*)
		    { switch }

	i.e. switches may be used recursively.
	When the rule marked with (*) is used, the STRINGs of several
	switches are concatenated and form one comment. For example:

	  idp ? idp_M65 : "6502 - " {
	    cmd ? M65_adc : "comment for ADC"
	  }

	Comment for ADC instruction will be "6502 - comment for ADC"

	The possible switchers are:

	idp		IDP internal number (see comment.cmt)
	filetype	Input file format   (see comment.cmt)
	auxpref		Processor dependent value
	cmd		Instruction	    (see ins.hpp)
	op1		First  operand of instruction
	op2		Second operand of instruction
	ah,al,ax,bh	Intel 80x86 registers
	bl,bp,bx,ch	Intel 80x86 registers
	cl,cs,cx,dh	Intel 80x86 registers
	di,dl,ds,dx	Intel 80x86 registers
	es,si,sp,ss	Intel 80x86 registers (sorry for other processors)

	The possible cases are:

	a number		(c-notation)
	an ident		(the ident should be defined in enumeration)
	keyword "other" 	anything else (default)

	You may combine several cases using || operator:

	cmd ? NN_mov || NN_push || NN_pop : "a comment for move,push,pop instructions"

	You may use several string constants instead of one string:

		"This is a big comment\n"
		"On several lines\n"
		"Formatted nicely"


Enumerations:

	To ease use of LOADINT there are enumerations in the language.
	Formal definition:

	  enum	:= KEYWORD_enum IDENT { enum_list };

	i.e. absolutely the same as in C.

	Please don't modify enumerations.


Extern:

	For compatibility with C LOADINT simply skips "extern" instructions.
	Just FYI.


	For examples of using this 'language' please take a look
	at *.CMT files :)

Again just FYI: LOADINT uses IDA.HLP file from the IDA distributive.
It looks for IDA.HLP in directories from PATH and NLSPATH env. variables.
----------------------------------------------------------

That's all about LOADINT. Any questions, unclear things etc - please
tell me.

Ilfak Guilfanov, <ig@datarescue.com>
18.08.96
10.12.97 (updated)
13.03.99 (updated)