the first. Indirect addressing.
second. Library memory. Subroutines use more than 16 incoming and outgoing parameters, you can do the following to explain briefly.
Indirect addressing requires recalculating the pointer inside the subroutine before it can be read or written. Because you no longer have extra parameters to connect to the subroutine. Do this every time you use extra parameters.
Because indirect addressing is a parameter, there is only one method (which can be modified as appropriate), that is, the &Xyyyy is passed as a parameter to the subroutine, and then the next address of the parameter target &X(yyyy+1) is passed through the double word plus instruction pair pointer. Add the operation, then read and write. As for this double word plus calculation, you can find any address by adding any value (or subtraction) to the subroutine.
It takes a lot of time for the subroutine to calculate the double word plus instruction every time. I want to ease this thing a little, you can write the value of the frequently used address to the L.
For example: the incoming parameter is &vb0. Vb0 this parameter can be read and written directly using the incoming parameters, no need to calculate. The vb16 address is also used frequently, and I hope I can directly quote it. You can use the double word to calculate the result of vb0+16, and then save the result (80000010) in LD56. In the future, you can directly refer to *LD56 to find the destination address. At this point, the L area can help you save several standby pointer values.
However, the range of LD is quite limited. When you record the results of several direct references, the LD area is almost exhausted. The rest of the space is left to be used for the temp parameter. The input and output parameters are even more necessary. That's it. So if there are parameters to be passed in, they can only be calculated again by double word. Time-consuming situations are inevitable.
At this time you still want more space to quote directly, then the topic is coming. Library memory.
Write the result of the above calculation directly into the library memory, which has a considerable space to save the standby pointer value.
Further, by writing the parameters directly in the library memory, you can directly read the parameters. Wrong, wrong, this is wrong, you can not directly save the parameters in the library. Because a subroutine is called multiple times, and the parameters of each subroutine are different. You can predict when you are a library program and reserve this subroutine to use n parameter space. So you can only save more standby parameters in the library. (It may be difficult to understand here, reply again)
The above L area is equivalent to the L1L2 cache of the computer cpu, and the library is equivalent to the conventional memory of the computer. Cache is the storage of frequently used data. A subroutine is called once, and an address may be used several times a few times. It is necessary to buffer the pointer to the cache.
In summary, the use of indirect addressing allows for very flexible expansion of parameters to arbitrary.
So what about the library?
Simply put, the library cannot load parameters directly unless the subroutine is used only once.
Puncture Power On Off Current Transformer
Puncture Power On Off Current Transformer,Current Transformer,Current Transformer With Puncture,Split Electric Quantity Acquisition Module
Zibo Tongyue Electronics Co., Ltd , https://www.tongyueelectron.com