System Subroutines - Mitsubishi Melsec A User Manual

Table of Contents

Advertisement

3.
SPEclFlcATloNs
/MELSEC
3.2.2 System subroutines
System subroutines are machine code programs used for special
AD51 functions (for example PC CPU transactions etc.). They are
already written i n channel
0
o f the AD51 at specified address loca-
tions. System subroutine operation is initiated by using the "CALL"
instruction in the BASIC program.
System subroutines on t h e ' ~ ~ 5 1
are shown in Table 3.3.
[Initializing the system subroutine]
1) The system subroutine is called from the GPC-BASIC program
using the "CALL" command.
2) The format of the CALL statement is as follows.
I
A
=
CALL (variable
1,
variable 2, [variable 3, variable 41
)
Variable 1: Always
0.
All system subroutines are located in
channel
0.
Variable 2: Head address of system subroutine in channel
0
(See table 8.2)
Variable 3: Variable for system subroutine stored in (D)(E)
registers.
Variable 4: Variable for system subroutine stored in (B)(C)
registers.
3) For information on variable 3 and variable 4, refer t o the GPC-
BASIC Handbooks.
4) Before executing the CALL command, transfer variables t o the
work area.
Function
I
Channel
I
Address
I
1
I
SAI
I
ASCII lhexadecimall -.BIN
I
0
I
8060H
I
2
1
SlA
I
BIN
-
ASCII Ihexadecimall
I
0
1
80631-1
1
3
5
SAN
1 7 1
SBF
I
Inteaer
-
real number
I
0
I
806CH
4
1
SNA
I
BIN -, ASCII ldecimall
6
1
SFA
I
Real number
-
ASCII
I
0
1
8069H
SAF
I
8
9
10
11
12
13
ASCII (decimal1
-.
BIN
14
0
ASCII
- r e a l
number
SFB
SEO4
SO84
SBD6
SOB6
SEA
0
8075H
Table
3.3
System Subroutine List (Continue)
SBS
8072H
0
Real number -, integer
BIN
-
4-digit BCO
4-digil 8 C O A BIN
BIN
-
6-dig,! BCD
6-digit BCD- BIN
BIN addition
124 bits1
8066H
BIN subtraction
124 b i t 4
0
0
0
0
0
0
806FH
8042H
8045H
8048H
804BH
804EH
0
8051H

Advertisement

Table of Contents
loading

Table of Contents