Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "crt.bi"
- dim shared as zstring*12 zText = "eax+ebx=%i"
- asm
- mov eax, 10
- mov ebx, 30
- add eax, ebx
- 'notice the parameters are pushed on the inverse order because you are pushing to a stack
- 'so the last pushed is the first in memory order... (string,number)
- push eax
- push offset zText
- call printf
- '(8 bytes were passed to the CDECL style function, the 4 byte pointer, and the 4 byte integer)
- 'so this is to clean up what the two PUSH stored. when calling a function that uses C calling convention)
- add esp, 8
- end asm
- 'mixed is simpler :P
- sleep
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement