PicBuild84 is an assembler/disassembler designed specifically for the 
PIC16F84 processor.  This is a program for clunky old DOS machines; no
guarantee that it will run under Windows. The idea is to do away with the
edit-assemble cycle. Program instructions are built up and added to those
already there.  There are no syntax errors because you can't build an
invalid instruction.

The program is started by typing 'picbuild' at the DOS prompt.  Any files
to be loaded, (F3), or saved, (F2), must reside in the same directory as
PicBuild.  Quit at any time by using the Esc key, ( be sure to save your
work first).

There are a number of windows on the PicBuild screen.  Instructions are 
constructed in the operation window at center right. Use the arrow keys to 
select an operation from those listed in the lower part of the screen.  
Parameters to the instruction are changed with various keys.

Use PgUp and PgDn to select a register from the register window. For five
of the special function registers, the register selected depends on the bank 
select bit, (bit 5 in the status register), called RB0.  This bit indicates 
bank 0 or bank 1 is in use, and is shown on the screen. The value shown is 
the value RB0 has on completion of the instruction preceding the currently 
selected instruction, (red selection bar in program window).  Use Home and 
End keys to change the current selection.  RB0 is correct only if just the
two instructions BCF status,5 and BSF status,5 are use to change it.  Names
of the general purpose registers, (REG00-REG63) can be changed using the F5
key.

Literals, (numbers 0-255),  are produced in the literal window using keys 
in the top row of the keyboard.  A number key will toggle the bit having 
that number.  '+' and '-' keys will increment or decrement the number.

BCF, BSF, BTFSC and BTFSS instructions use the bit highlighted above the 
literal window.  To change the bit highlighted use the Ctrl-Leftarrow and 
Ctrl-Rightarrow keys.

GOTO's and CALL's require a destination.  The destination is set using 
Ctrl-Home and Ctrl-End to move the destination down and up.  To move large
distances use the F10 key to pick a line #. If the destination falls within
the program window it will be shown with a purple selection bar.  

Once an instruction is properly constructed, it can be put into the program 
in two ways. Pressing 'Enter' will replace the current instruction with the 
instruction in the operation box.  Pressing 'Insert' will insert the 
instruction in the operation box just before the current instruction.  All 
GOTO's and CALL's will be fixed up.  Pressing 'Delete' will remove the 
current instruction, (program window highlight).

Instructions have line numbers in the program window.  They can also have
labels and comments associated with them.  Use F6 to insert labels and F7
for comments.  Labels and comments will appear along with instructions in 
listings.  Use F4 to produce a listing which can be directed to the screen, 
disk or printer.  Press 'N' before 'S','D' or 'P' to force line numbering 
in the listing.  When the program is saved, two files are produced. 
One with an extension '.HEX' is the program and EEPROM memory in INHX8M 
format. The other with an extension '.F84' holds labels, comments and
register names. If you load a PIC program not produced by PicBuild you will 
get a warning saying XXX.F84 could not be loaded.  Just ignore it and press 
a key.

EEPROM data memory can be entered on the screen with various Crtl keys.  
Use Ctrl-PgUp and Ctrl-PgDn to move the selection cursor in the data 
window.  Bits in the selected memory byte can be changed using keys on the 
keypad.  Ctrl-Keypad '+' will increment the selection, Ctrl-keypad '-' will
decrement it.  Ctrl-Enter will toggle that bit in the selection that is 
highlighted underneath the data window.  

Use the F9 Key to quickly move to another spot in a large program. When using 
the F3 key to load a program, repeated pressing of the F3 key will run 
through the available '.HEX' program names in the current directory. The F8 
key can be used to edit a program.  When pressed the instruction at the red
cursor is copied just before the destination cursor (purple).  The source and
destination cursors are bumped up one so you can continually press F8 to copy
a sequence of instructions.  Another useful key is the F11 key.  When F11 is
pressed a copy of the current instruction is copied to the operation window
so it can be modified.

You can use PicBuild84 for the PIC16C84 but remember there are only 36 general
purpose registers (REG00-REG35).

Stan Ockers    ockers@anl.gov
