计算机语言中call,雅马哈编程语言CALL的作用

2010-09-05 14:42

call的解释怎么写的,贴上来啊。

2010-09-05 20:06

8-4-8 CALL

Function:

Format:

Example:

Explanation:

Calls and executes another program.

CALL

CALL

,

5, 2

Other:

8

Calls program 5 and executes it twice. Program execution then proceeds

to the next step.

When repeating the same operation a number of times, the CALL state-

ment is used as needed to call and execute the subroutine defined as a

separate program.

(1 ) Program number

The program number is a number used to identify the 100 individual

programs from 0 to 99.

(2) Number of times

This is the number of times that the program is to be repeated. This

can be specified from 1 to 255.

• The nesting level is 6.

• When the end of the program initiated by the CALL statement is de-

tected, program execution advances to the step following the CALL

statement in the main program.

• An error occurs and program execution stops if the program being

executed is called by the CALL statement.

• Even when the program number is changed by the CALL statement,

resetting it will return to the original program number when program

execution begins.

• An error "stack overflow" might occur if a jump is made to another

program by the JMP or JMPF statement in a program called as a sub-

routine by the CALL statement.

2010-09-05 21:04

例题的程序也贴出来看看吧。

2010-09-05 22:00

Program

[NO0]

001:MAT

002:MAT

003:MAT

004:CSEL

005:C

006:CSEL

007:C

008:CSEL

009:C

010:L

011:MOVA

012:CALL

013:CALL

014:JMPB

015:JMPB

016:JMPB

017:JMP

018:L

019:CALL

020:JMP

021:L

022:CALL

023:JMP

024:L

025:CALL

026:JMP

3,

3,

4,

0

1

1

1

2

1

0

0,

3,

4,

4,

0

1

2

100

10, 1

5,

1,

2,

3,

0,

1

1,

0,

2

2,

0,

3

3,

0,

1

1,

2,

3,

0

1

0

1

0

1

0

1

1

1

Comment

<>

; Defines 3劒3 matrix (for workpiece A)

; Defines 3劒4 matrix (for workpiece B)

; Defines 4劒4 matrix (for workpiece C)

; Sets array element of counter array variable C to 0

; Sets counter array variable C[0] to 1

; Sets array element of counter array variable C to 1

; Sets counter array variable C[1] to 1

; Sets array element of counter array variable C to 2

; Sets counter array variable C[2] to 1

; Label definition

; Moves to feed point

; Waits for workpiece and calls workpiece identification routine

; PICK routine call

; Jumps to L1 when DI1=1 (workpiece A)

; Jumps to L2 when DI2=1 (workpiece B)

; Jumps to L3 when DI3=1 (workpiece C)

; Jumps to L0

; Label definition

; Calls subroutine NO1

; Jumps to L0

; Label definition

; Calls subroutine NO2

; Jumps to L0

; Label definition

; Calls subroutine NO3

; Jumps to L0

2010-09-05 22:22

001:MAT      6  4  0

002:MAT      3  4  1

003:MAT      3  4  2

004:C           1

005:D           1

006:L            0

007:MSEL    0

008:MOVM   C  100

009:CALL     1   1

010:MSEL    1

011:MOVM    D  100

012:CALL     2   1

013:JMPD    1   12

014:C+

015:D+

016:JMP       0   0

017:L            1

018:C+

019:D            1

020:L             2

021:MSEL     0

022:MOVM    C   100

023:CALL      1    1

024:MSEL     2

025:MOVM    D   100

026:CALL      2    1

027:JMPD     3    12

028:C+

029:D+

030:JMP       2     0

031:L            3

2010-09-05 22:36

看上去确实应该有子程序10和子程序5。前者用于判断工件是否到位,后者用来指挥机械手捡起工件。

2010-09-05 23:10

谢谢您的回答 我的QQ905083847 您方便的时候 跟您学学

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值