Advertisement
Mysoft

Untitled

Feb 25th, 2024
789
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. type SmallStruct
  2.   A as byte
  3.   B as byte
  4.   C as byte
  5.   D as byte
  6. end type
  7.  
  8. type BigStruct
  9.   A as long
  10.   B as long
  11. end type
  12.  
  13. function AddSmall naked ( byval tParms as SmallStruct ) as byte
  14.   asm
  15.     mov al,[esp+4]
  16.     add al,[esp+5]
  17.     add al,[esp+6]
  18.     add al,[esp+7]
  19.     ret 4
  20.   end asm
  21. end function
  22.  
  23. function AddBig naked ( tParms as BigStruct ) as long
  24.   asm
  25.     mov edx, [esp+4]    
  26.     mov eax,[edx]
  27.     add eax,[edx+4]    
  28.     ret 4
  29.   end asm
  30. end function
  31.  
  32. print AddSmall( type(100,20,5,-1) )
  33. print AddBig( type(5000,200) )
  34. sleep
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement