Using User-Written Microcomputer Programs - Mitsubishi MELSEC-A Series Programming Manual

Type acpu/qcpu-a (a mode)
Hide thumbs Also See for MELSEC-A Series:
Table of Contents

Advertisement

8. MICROCOMPUTER MODE

8.3 Using User-Written Microcomputer Programs

A source program written by the user in the 8086 assembly language is converted to
a machine language using assembler commands of CP/M or MS-DOS.
converted program is called "the object program" and is to be stored in the
microcomputer program area of the CPU using the system floppy disk for a
peripheral device which has microcomputer mode.
(1) Processes from writing the source program to storing it in the microcomputer
program area
The flow chart below describes processes from writing the source program to storing
it in the microcomputer program area in the CPU using the CP/M 86 which is booted
with the SW
C-BAS type GPP-BASIC package.
CP/M 86 system booting
Write the source program
using the ED (text editor)
command.
Assemble
the
source
program using the ASM86
(assembler) command.
Generate the load program
using the GENCMD (CMD
file generation) command.
Unite the microcomputer
program with the sequence
program using the UPC
(unite) command.
(2) Precautions on preparing the microcomputer program
1) Provide the PUSH instruction at the start of the microcomputer program so
that contents of the registers used during execution are saved in the stack
areas. Also, provide the POP instruction at the end of the program so that
the contents of registers saved in the stack areas are returned.
2) Initialize the registers to be used in the microcomputer program at the start of
the microcomputer program.
microcomputer program is called from the sequence program are not
definite.
3) Since the microcomputer program is executed only when it is called from the
sequence program with the SUB(P) instruction, the sequence program is
always required.
Insert the SW C-BAS system disk in drive A of the A6GPP
........
to boot CP/M 86.
Use the ED command to write the source program in the
........
8086 assembly language, and to store it on a user's floppy
disk. (File identifier: .ASM)
Assemble the source program written in assembly language
........
and generate the object program using the ASM86 command.
(File identifier: .HEX)
Use the GENCMD command to generate the load program
........
from the object program which can be executed. (File
identifier: .COM)
Unite the load program which can be executed with the
........
sequence program and store it on a user's floppy disk using
the UPS command.
Contents of the registers when the
8 − 4
MELSEC-A
This

Advertisement

Table of Contents
loading

This manual is also suitable for:

Acpu-common-p-e13j741AcpuQcpu-a

Table of Contents