Advertisement
Xetos

asd

Mar 24th, 2016
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. TITLE Hello, Assembly! (32 bites)
  2. INCLUDE Irvine32.inc
  3.  
  4. .data
  5.    
  6.     A       DWORD 5
  7.     T       SDWORD  1,2,3,-56,1956,5 ; Meg a tomb
  8.     B WORD 4
  9.  
  10. .code
  11. ; Belépési pont
  12. main PROC
  13.    
  14.     ;A*T[2]+B
  15.  
  16.     MOVE AX, [T+4]  ;   AX = T[2]
  17.     CWDE            ;   EAX = T[2]
  18.     IMUL EAX, A     ;   EAX = A*T[2]
  19.     MOVSX EBX, B    ;   EBX = B
  20.     ADD EAX, EBX
  21.  
  22.     CALL WriteInt
  23.     Call Crlf
  24.  
  25.    
  26.  
  27.     INVOKE  ExitProcess,0
  28. main ENDP
  29.  
  30. END main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement