5/22/2012 8:12 AM | |
Posts: 139 Rating:
|
_____________________________________________________________________________ Hello Saravana kumar, Could u please explain to me this part of code?why u take numbers of row and multiply with Size/length of one row? i am confuse on that code (40*52) to AR1 and point to (result + 100) [code] L 40 NEXT: T #pointer_1 L 51 >I JC endf L #pointer_1 SLD 3 LAR1 P#DBX100.0 // Start Address of DB +AR1 L D [AR1, P#0.0] T #temp_var // comparision code // here // code end L #pointer_1 +1 JU NEXT endf: NOP 0 [/code] |
Last edited by: C.kt at: 5/22/2012 8:37 AMadd test writing code |
|
5/22/2012 9:43 AM | |
Joined: 2/6/2009 Last visit: 8/19/2024 Posts: 939 Rating:
|
Hello Saravana kumar, Could u please explain to me this part of code?why u take numbers of row and multiply with Size/length of one row? i am confuse on that code (40*52) to AR1 and point to (result + 100) L 40 NEXT: T #pointer_1 L 51 >I JC endf L #pointer_1 SLD 3 LAR1 P#DBX100.0 // Start Address of DB +AR1 L D [AR1, P#0.0] T #temp_var // comparision code // here // code end L #pointer_1 +1 JU NEXT endf: NOP 0 Hi, Please check the complete logic, I am using the LOOP instrucation for logic, For loading 40: Loading the 40 into the pointer and loading the same pointer before LOOP instruction is the structure of the Loop instruction. With the help of that instruction the 40 will be decreased by 1 for the each execution LOOP. (i.e 40 to 0) Go to Help => STL => Type LOOP for the more information about the loop instrucation. For Multiplying with 52: 52 is the size of one Row as per the requirement. So that will multiplied by the Pointer which will be changing its value from 40 to 0 via LOOP instruction. For Pointer Load with DBW100 (L DBD [AR1,P#100.0] It is Start byte address of the DB so it has to added with the DB pointer. REVERT BACK FOR MORE CLARIFICATION. |
_______________________________________________________________ |
|
This contribution was helpful to
1 thankful Users |
5/22/2012 5:40 PM | |
Posts: 139 Rating:
|
Hi Saravana kumar, Thanks for ur explain. but i have still missing on below this code. [code] L DBD [AR1, p#100.0][/code] that should be point to DBW 2180, correct? but when i test, that pointed to DBW 2182. I have construct DB with array start from zero base, bcos of zero based array? wait for ur answer and thanks. when LOOP counter ZERO, also pointed to DBW 102? p.s i have tested with manual input [40,....0] instead of using LOOP counter to see result details. |
Last edited by: C.kt at: 5/22/2012 5:48 PMLast edited by: C.kt at: 5/22/2012 5:41 PMremove quote |
|
Follow us on