186 Debugging IMEM This function is a quick, convenient way to look at the contents of a specific location in memory. The result is a numeric value, in octal representation, for the contents of a specified address. The form is - .. 1- :. " .... _ :--.~ ( {assembled location} ) The function is similar in many respects to the IDUMP statement. It is easiest, perhaps, to list the differences - IMEM is a function, where IDUMP is a statement. IMEM deals only with a single address, where IDUMP can deal with many. IMEM represents the value only in octal, where IDUMP can use many different representa- tions. IMEM can be displayed and stored, where IDUMP can only be printed.
An obvious use for the function is in a routine called by an IBREAK statement. By using the function in such a manner, perhaps in a PRINT statement, you can ease the burden of checking variables from the keyboard. You can even use the value returned as a comparison against some set of limits so that you print only when the value exceeds those limits. There are many other possibilities for use.
Interrogating Registers and Flags Interrogating the processor register A, B, P, R, Pa, Cb, Db, Dmapa, Dmama, Dmac, C, D, Ar2, SE, and Arl yields meaningful results only when execution of an assembly language subprog- ram has been suspended due to detection of a break point, or due to the use of the @ill or 8 keys (see Stepping Through Programs). Further, the values of cetain processor flags are stored in specific memory locations when a subprogram is suspended as described above. The flags are then available for interrogation as follows: Decimal Carry least significant bit of location 308 Overflow least significant bit of location 318 Extend most significant bit of location 318