You are on page 1of 4

7/7/2015

USINGECAL

UsingtheECALAssemblerandM6809Machine
Codeprogramming
The SC09 is a M6809 based microprocessor board for use on STEbus (BUSBOX).
The SC09 board is connected to the PC via a Serial interface COM1. The communication PC
to/from the microprocessor system is arranged through PC program ECAL. There two main
functions of ECAL software are:
1. Direct control/communications with M6809 microprocessor to write/run a program in
Machine Code.
2. To design a program in Assembly language, compile it into machine code and run it in a
microprocessor system.

Menu items are selected by typing highlighted letter or Ctrl key and highlighted letter. Select
edit window and enter source code assembly text. Note that you will be prompted for a File
name (e.g. to create a new file) or an already highlighted file will be selected by pressing
Enter. Remember that assembly source code should be saved in a file with the extension
.asm. To return to the main menu at any point, use the Esc key.
When the source code is entered, return to the main screen and choose a processor by
selecting the mNemonics option, e.g., 6809. Then select the assembly option, which will
prompt you to choose the output file mode (object code format). For the Motorola devices
this is SREC. Also, select the print out to be on, to produce a listing file.
If there are no errors then a simple beep will occur. If errors are present then the incorrect
lines of code will be highlighted (flashing). Note that the help function may identify the
problem for you.
To download the object code to the target system (BUSBOX), using a serial link, select the
watch window by pressing F7. An almost blank window should appear titled vdu/comms.
http://www.electronics.dit.ie/staff/tscarff/6800/using_ecal.htm

1/4

7/7/2015

USINGECAL

If another window with multiple windows appears just press F7 again. Now select mode
controls by pressing F4. Ensure that COM1 (APPEARS AT TOP OF SCREEN) using the interlace
option I. Now press ESC in order to now set the Baud rate etc.
Typically for the Busbox select COM1, 4800 baud, NO parity and 8 bits.
When the CABLE IS CONNECTED BETWEEN THE BUSBOX AND COM1 OF THE PC turn on the
busbox and a message will appear on the vdu/comms screen of ECAL. If no message appears
check the cables but also make sure another copy of ECAL is not running, as only one copy
can use the serial port.
Now return to the main screen and highlight the ".rec" file you wish to transmit. Select '0' for
the "others" option and then press 'T' for transmit option and press enter (a "box" showing
settings will have appeared check them.). Now check vdu/comms screen (F7). If the file
has transmitted with no problems then you will be requested to press space bar.
You can toggle between vdu/comms and the ECAL editor, very handy if you have .PRN file in
the edit window. Use F7 and ESC key to toggle.
To print the listing file (.PRN) on the network use a different package e.g., NOTEPAD.

ECALCommandSummary
(Note: Do not type angled brackets.)
A<value 1> <value 2> ; Returns hexadecimal sum and difference
BC<n> ; Clear a breakpoint [1 to 8]
BL ; List all active breakpoints
BS<n> <address> ; Set a breakpoint to an address [1 to 8]
C<source> <dest> <length> ; Copy a block of memory
D<start> ; Dump contents of memory
E<start> ; Enter ASCII into Memory
F<start> <end> <byte> ; Fill an area of memory with byte
G<start> ; Load user's registers and jump to start
H ; Give Summary of commands
I ; Intel hex read
L<start> <end> <byte or word> ; Locate a value in memory
M<start> ; Enter hex into ram
Q ; Cold restart
R<start> <end> <repeats> ; Ram test
S ; S format read
T<start> Single step through user's programme
V<start 1> <start 2> <length> ; Compare two blocks of memory
W<reg> <value> ; Load user's register with value
http://www.electronics.dit.ie/staff/tscarff/6800/using_ecal.htm

2/4

7/7/2015

USINGECAL

X ; Display user's registers


Z<start> ; execute a command line
Ctrl C ; Quit command
Ctrl H ; backspace
Ctrl S ; saves string in the ENTER command

The area from $ED80 to $EEFF is available to the user and can be utilised for user
programmes.

M6809AssemblyprogrammingwithECAL
AdjustingECALoptionstoM6809InstructionSet:
1. Connect SC09 MP board to COM I port of PC via serial link.
2. Run ECAL Program.
3. Press any key to access Main Menu. (To return to the main menu at any point, use the Esc
key)
4. Menu items are selected by typing highlighted letter or Ctrl key and highlighted letter.
5. Choose a processor by selecting the mNemonics option [N], e.g., 6809. Then select the
Assembly option [A], which will prompt you to choose the output file mode (object code
format). For the Motorola devices this is SREC. Also, select the print out to be ON, to produce
a listing (.prn) file.
6. Select the Watch Window by pressing F7. An almost blank window should appear titled
VDU/COMMS SCREEN. If another window with multiple windows appears just press F7 again.
Now select mode controls by pressing F4. You can now set the Baud rate (Interface option).
Typically for the Busbox YOU select COMI, 4800 baud, NO parity and 8 bits.
7. Now switch on Busbox. The message ARCOM SC09 MONITOR VI .2 should appear
8. Now you can check the content of Registers (enter X) and Memory (enter D ED8O) (see
http://www.electronics.dit.ie/staff/tscarff/6800/using_ecal.htm

3/4

7/7/2015

USINGECAL

Command Summary).
9. Use "M" command to change the content of memory i.e. to enter Machine Code program
into microprocessors RAM.
10. Use "G " command to run the program at once or "T" command to single step through the
program.

Toenter/editAssemblycode:
1. Select Edit Window [E] from main menu. You will be prompted for a tile name (e.g. to
create a new file) or an already highlighted file will be selected by pressing enter. Remember
that assembly source code should be saved in a file with the extension .asm.
2. Enter Assembly Source Code text.
3. When the source code is entered press F4 to assemble (compile) a program. If there are no
errors then a simple beep will occur. If errors are present then the incorrect lines of code
will be highlighted (flashing). Note that the help function may identify the problem.
Todownloadtheobjectcodetothetargetsystem(BUSBOX),usingaserial
link:
1. Select the watch window by pressing F7.
2. Now switch on Busbox. The message ARCOM SC09 MONITOR VI .2 FOOO appears.
3. To download the object code (from main menu) Select Other item by pressing the letter
'0'.
4. Select Transmit item by pressing T.
5. Select the object file (extension .rec) to transmit using the cursor or typing full name.
6. Press ENTER twice. The object file is now transmitted to SC09 RAM.
7. Press F7 for Watch Window and press any key.
8. Now check the contents of Registers (X), Memory (D), Run (G) or Trace (T) the program.

http://www.electronics.dit.ie/staff/tscarff/6800/using_ecal.htm

4/4

You might also like