Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .386
- .model flat, stdcall
- .stack 4096
- ExitProcess proto, dwExitCode:dword
- include Irvine32.inc
- .data
- num1 dword 2
- .code
- modify PROC var : DWORD
- mov eax, [var]
- mov DWORD PTR [eax], 6
- ret
- modify endp
- main proc
- ; Call modify and pass the address of num1
- invoke modify, addr num1
- ; Print the updated value directly from num1
- mov eax, num1 ;Error, after the function call, num1 doesn't have the updated value of 6
- call WriteDec
- call Crlf
- invoke ExitProcess, 0
- main endp
- end main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement