IMMEDIATE and INTERPRET

There are two commands which can be used to change how IDA behaves while it is in compilation mode. They are only used in a few special cases.

If IDA is in compilation mode but there is a command you want to execute immediately, you can start the command with the word IMMediate. The command is executed immediately. It does not become part of the procedure.

Uses of the IMMediate command are not very common. But you might use it if you were in the middle of defining a complicated procedure and you quickly wanted to check the names of some quantities. For example, if you had forgotten what the quantity names were in the IEVENTH bank, you could type

   Ida>  IMM PEEK IEVENTH
The peek would be executed immediately. It would not become part of the procedure.

IDA sometimes gets into trouble trying to parse your statements when it is in compilation mode. As long as everything you are typing is IDA's own commands and IDA variables, IDA knows what to do. But some of the commands you use are not IDA's own commands but are extensions to IDA (brought in by things called Command Processors, to be discussed in the next section of this workbook). PEEK, POKE, some Histogram commands, the DSP commands and the random number generator commands are common examples of this. In these cases, you need to preface some commands with the word INTERPret to tell IDA which parts of the statement are variables and which parts are the command itself.

An example xxx interp "DSP phi = " phi

Earlier try at writing this:

If IDA is in compilation mode but you want it compile a command in a slightly different way than normal, you can start the command with the word INTERPret. This is needed in a few cases in which IDA has trouble figuring out whether something you have typed is a string or is an IDA variable. After the INTERPret, everything that has double quotes around it is taken as a string and everything that does not is taken as a variable.

Uses of INTERPret mostly involve the commands HOPTN, PEEK and POKE. We'll give examples of this later when we talk about those commands.

xxx Interp "Poke Krfunpp.gathcut =" Values(3)

xxx interp "HOPTN KDDD HNORM" HKDD

xxx Interp "Poke Kcaclsp.adcthrsh(2) =" Values(1)

xxx Interp "DSP ISOLATE PHKAL" int(idk)

xxx interp "DSP high VTXCLUS " int(clusid)