-
-
hylotus 发表于 2009/9/27 12:16:25
通过自己编制功能块实现此功能,比如可以一次进行40byte的操作:
Network 1
A #INPUT
AN #IN_ACTIVE
= #IN_START
A #INPUT
= #IN_ACTIVE
A #OUTPUT
AN #OUT_ACTIVE
= #OUT_START
A #OUTPUT
= #OUT_ACTIVE
AN #INPUT
AN #OUTPUT
JC END1Network 2 OUTPUT BUFFER
AN #OUTPUT
O #DONE_OUT
JC IN_1
AN #OUT_START
JC OP_1
OPN #SOURCE_DB
L DW#16#0
T DBD 40
T DBD 44
T DBD 48
T DBD 52
T DBD 56
T DBD 60
T DBD 64
T DBD 68
T DBD 72
T DBD 76
L #LOCATION
L 0
<=I
S #EMPTY
JC EROR
OPN #SOURCE_DB
CALL "BLKMOV"
SRCBLK :=P#DBX 80.0 BYTE 40
RET_VAL:=#RET_VAL1
DSTBLK :=P#DBX 40.0 BYTE 40
L #RET_VAL1
L 0
<>I
JC EROR
L 0
T #COUNT
OP_1: L #LOCATION
L 0
<=I
JC EROR
L #LOCATION
L #COUNT
<=I
JC OP_3
L #COUNT
L 2
+I
ITD
L P#40.0
*D
LAR1
OPN #SOURCE_DB
L DBD [AR1,P#40.0]
T DBD [AR1,P#0.0]
L DBD [AR1,P#44.0]
T DBD [AR1,P#4.0]
L DBD [AR1,P#48.0]
T DBD [AR1,P#8.0]
L DBD [AR1,P#52.0]
T DBD [AR1,P#12.0]
L DBD [AR1,P#56.0]
T DBD [AR1,P#16.0]
L DBD [AR1,P#60.0]
T DBD [AR1,P#20.0]
L DBD [AR1,P#64.0]
T DBD [AR1,P#24.0]
L DBD [AR1,P#68.0]
T DBD [AR1,P#28.0]
L DBD [AR1,P#72.0]
T DBD [AR1,P#32.0]
L DBD [AR1,P#76.0]
T DBD [AR1,P#36.0]
L #COUNT
L 1
+I
T #COUNT
L #SIZE
L -1
+I
L #COUNT
<=I
JC OP_2
JU END2
OP_2: L W#16#0
T DBD [AR1,P#40.0]
T DBD [AR1,P#44.0]
T DBD [AR1,P#48.0]
T DBD [AR1,P#52.0]
T DBD [AR1,P#56.0]
T DBD [AR1,P#60.0]
T DBD [AR1,P#64.0]
T DBD [AR1,P#68.0]
T DBD [AR1,P#72.0]
T DBD [AR1,P#76.0]
OP_3: SET
S #DONE_OUT
L #LOCATION
L -1
+I
T #LOCATION
JU END2Network 3 INPUT BUFFER
IN_1: AN #IN_START
JC END2
L #LOCATION
L #SIZE
>=I
S #FULL
JC EROR
L #LOCATION
L 2
+I
ITD
L P#40.0
*D
LAR1
OPN #SOURCE_DB
L DBD 0
T DBD [AR1,P#0.0]
L DBD 4
T DBD [AR1,P#4.0]
L DBD 8
T DBD [AR1,P#8.0]
L DBD 12
T DBD [AR1,P#12.0]
L DBD 16
T DBD [AR1,P#16.0]
L DBD 20
T DBD [AR1,P#20.0]
L DBD 24
T DBD [AR1,P#24.0]
L DBD 28
T DBD [AR1,P#28.0]
L DBD 32
T DBD [AR1,P#32.0]
L DBD 36
T DBD [AR1,P#36.0]
L #LOCATION
L 1
+I
T #LOCATION
SET
S #DONE_IN
JU END2
Network 4EROR: SET
= #ERROR
JU END2
END1: CLR
= #DONE_IN
= #DONE_OUT
= #ERROR
= #EMPTY
= #FULL
END2: NOP 0欢迎大家讨论!
引用 hylotus 2009/9/27 12:16:25 发表于2楼的内容