
TO WORD WRAP THIS TEXT:

Click Edit on this screen's above toolbar and then click on Word Wrap.

TK3 MISCELLANEOUS FUNCTIONS NOTES - 08AUG04

Some of this information may update that given in the published EPE TK3 text.

Always check the Updates file for any information that affects these notes. It is normally issued whenever an update to TK3 is released and is accessible via the "Latest Updates" button at the bottom of the main TK3 screen.

CONVERTING HEX TO DECIMAL

This option is for information only and has no other practical purpose. It simply converts MPASM HEX file data to decimal for viewing. This decimalised data is not intended for editing or PIC programming use.

PIC ID and Config data lies between hex addresses H'4000' and H'4008' (decimal 16384 to 16392) (PIC addresses H'2000' to H'2008'). Message data lies between hex addresses H'4200' (decimal 16896) (PIC H'2100') upwards, depending on PIC type.

CALC BAUD

When writing code for a PIC which uses RS232 interfacing, a configuration value has to to included to set the Baud Rate in respect of the PIC's oscillator rate. This option provides an easy way of establishing the required value.

SHOW PIC CODES

This file shows the PIC commands, the subroutine number to which the software jumps during Assembly, their binary codes as used during Assembly, the file and data required (e.g. f,d), the flags affected by each command, and the function of the command. DO NOT CHANGE THIS FILE!

The commands shown are those appropriate to the PIC type selected via the main screen.

COMPARE FILES

The Compare Files facility is one used by the author when writing and testing TK3. It allows two binary (OBJ) or HEX file codes to be compared byte for byte as ASCII values, advising of any differences found. Values are shown in hex.

It includes its own access to the directory facility allowing paths and file names to be selected. An option button selects whether the directory shows files ending in OBJ or HEX. Double-clicking on the selected file name selects it for the comparison routine. The directory
normally has to be accessed twice, clicking on the DIR1 or DIR2 button as appropriate to select the two files needed. The file names are stored when the Compare window is closed via the Quit button, and recalled the next time the window is opened. The stored names are retained when TK3 is closed.

If files of differing lengths are compared, their lengths are reported as different and the comparison takes place just for the length of the shorter file, the comparison being terminated at that point. The number of comparison differences are shown at the top right of the screen.

Whilst the Compare facility is not one normally required for PIC programming, it is an option that has been retained beyond the author's development of TK3 in case some of you may find a use for it. If you want to just try and see how it works, select the same file name twice for one test, and then select two very different files and observe how comparison errors are reported.

With TK3 V2 the option to show any hex line as decoded text has been provided. Double-click on any hex line for the line interpretations to be shown in the two list boxes at the bottom of the screen. Any differences between the two boxes are highlighted. If the word UNFOUND shows for some commands this is likely to be because the PIC type for which the hex file has been assembled has not been selected correctly via the Select PIC Type facility on the main screen. If you do not already know the correct PIC type, there is no way to determine it from a hex file and you must use trial and error in this instance. There is, of course, the possibility that the unfound command may be due to corruption of the hex data file at that point.

CONVERTING MPASM ASM TO TASM ASM FILES

This option has been dropped from TK3 V2.0 onwards. Users are recommended to use MPASM grammar wherever it is found in ASM files. The author admits, though, that when writing code he prefers to use TASM grammar since there are fewer keystrokes - for example, using TASM's $1F instead of MPASM's H'1F' for hex coding is much quicker!

ADDING YOUR OWN NOTES

These notes are displayed via an "Active" text editor and you may add your own notes to them, saving them to disk in the usual way.
