After my research, I cannot take custom types (members are not 4 bytes, and they are taken to align structure pointers, such as members allocate 4 bytes to byte types), and non-decimals and integers. Text-type arrays cannot take pointers, and others can be used.
It should be noted that there is an EBP stack entry operation in front of Yi's subroutine, so there must be a stack entry operation
This is an example of the pointer I wrote to take integer type (byte type, short integer type, decimal type, date and time type, and double precision decimal type are all common, please note that the parameters should be referenced):
. Version 2
.Support library spec
.Subprogram Take integer pointer, integer type, and public
. Parameters integer, integer type, reference
'push ebp <--------------------- These two sentences are already the original ones
'mov ebp, espPut code ({ 139, 69, 8, 201, 194, 4, 0 })
' mov eax, dword ptr [ebp+08]
' leave <--------------- Assign to ESP, pop up from the stack to EBP
' ret 0004
Return (0)
Example of taking text pointer:
. Version 2
.Support library spec
.Subprograms: Take text-type pointers, integer-type, and disclose
. Parameters Text, text typePut code ({ 139, 69, 8, 139, 0, 201, 194, 4, 0 })
' mov eax, dword ptr [ebp+08]
' mov eax, dword ptr [eax]
' leave
' ret 0004
Return (0)
Example of taking a byte set pointer:
. Version 2
.Support library spec
.Subprogram: Take the byte set pointer, integer type, and expose
. Parameters byte set, byte set, referencePut code ({ 139, 69, 8, 139, 0, 131, 192, 8, 201, 194, 4, 0 })
' mov eax, dword ptr [ebp+08]
' mov eax, dword ptr [eax]
' add eax, 00000008
' leave
' ret 0004
Return (0)
The above is the entire content of introducing the embedded assembly variable pointer to you this time. Thank you for your support.