KUBES modules ======== KUBES ======================================================= Organisation module IL Project : 667_COPY Network : Module : ORG No.: 1 created : Aug 17 1995 11:28 User : changed : Aug 17 1998 08:47 ====================================================================== 1: ; ------------------ Test program "Copy data blocks" ----------------- *************************************************************************** 3: ; To be able to easily repeat the test, the provided data is modified 4: ; by a randomizer via I00.00 (see module "DAT_SET"). *************************************************************************** 6: 7: ; Jump to "Provide data" 8:
; ---------------------- 9: L SET_DAT I00.00 ; (set data) 10: JPCP DAT_SET 1 11: 12: ; First steps 13: ; ----------- 14: ; Clear offset memory to be on the safe side 15: CLR OFFSET BM01.00 ; (points to oper. in data field) 16: 17: ; Specify length of data fields (here: BM01.01 chosen) 18: L 16 ; 16 byte 19: = DAT_LEN BM01.01 ; (length of data fields) 20: 21: ; Program for copying (designed as a loop) 22: ; ---------------------------------------- 23: LOOP NOP 24: ; Specify start of source memory (SBM00.00) 25: SOURCE LD $0300 ; interm. code of 1st source addr. 26: =D ADDR_1 FBM00.00 ; (1 st addr. of operand range) 27: JPK RD_OFFS ; source data to BM00.02...03 28: ; Transfer data 29:
LD DATA_RD BM00.02 ; (data from source memory, byte) 30: =D DATA_WR BM00.00 ; (data to target memory, byte 1) 31: ; Specify start of target memory (SBM01.00) 32: DEST LD $0310 ; interm. code of 1 st target addr. 33: =D ADDR_1 FBM00.00 ; (1 st addr. of operand range) 34: JPK WR_OFFS ; data from BM00.00...03 to target 35: ; Increment offset (twice because your’re copying by word 36: INCOFFS INC OFFSET BM01.00 ; (pointer to oper. in data field) 37: INC OFFSET BM01.00 ; (pointer to oper. in data field) 38: ; Complete range copied? 39: L OFFSET BM01.00 ; (pointer to oper. in data field) 40: CMP DAT_LEN BM01.01 ; (length of data fields) 41: JP get next set of data 42: END_COPY NOP 89