Mysoft

Untitled

Dec 13th, 2020
780
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "crt.bi"
  2.  
  3. dim shared as zstring*12 zText = "eax+ebx=%i"
  4.  
  5. asm
  6.  
  7.   mov eax, 10
  8.   mov ebx, 30
  9.   add eax, ebx
  10.  
  11.   'notice the parameters are pushed on the inverse order because you are pushing to a stack
  12.   'so the last pushed is the first in memory order... (string,number)
  13.   push eax
  14.   push offset zText
  15.    
  16.   call printf
  17.   '(8 bytes were passed to the CDECL style function, the 4 byte pointer, and the 4 byte integer)
  18.   'so this is to clean up what the two PUSH stored. when calling a function that uses C calling convention)
  19.   add esp, 8
  20.  
  21. end asm
  22.  
  23. 'mixed is simpler :P
  24. sleep
  25.  
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×