8 programming, Sample program, Xfer instruction (message receive) – Toshiba SX 2000 User Manual

Page 52: Programming, Gg0g3 mgu sugggt, [end

Attention! The text in this document has been recognized automatically. To view the original document, you can use the "Original mode".

Advertising
background image

1.4.8

Programming

(1) Changing the trailing code

The default setting of the trailing code is CR (carriage return code = HOD).

The trailing code can be changed by writing the desired code into SW068 at the
first scan.

1.4 Free ASCII mode

SW068

HOO

8 7

New trailing code

Sample program:

(Sub-program 1)

(H0003)

GG0G3 MGU SUGGGT-

14

2-[END

1

The above program is an example to change the trailing code to H03. The

new trailing code H0003 is written into SW068 in the sub-program 1 (initial

program).

(2) Data receive operation

When a message is received, it is stored in the receive buffer. The receive

buffer is a temporally memory, which has 512 bytes capacity. The expanded

transfer (XFER) instruction is used to read the message from the receive buffer
and to store it into user registers.

XFER instruction (message receive):

Input ^ ^ ^ER e ^ C J— Output

Operand

A:

Source

F__________________8 7

A

HOO

I

A+1

HOOOO

H30

Operand 6: Parameter

F

В

B+1

B+2

Transfer length

Execution status

Receive message length (bytes)

Operand C: Destination register

F

8 7

C

C+1

<4

■ S2T link port (receiving)

■ 256 (256 words) fixed

HOO

Register type

-----

starting register address

Indirectly designated register

HOO: XWrrW

H01: W

H02: LW

H03: RW

H04: D

H05: F

6F8C0926

35

Advertising