daily pastebin goal
28%
SHARE
TWEET

Untitled

a guest Dec 12th, 2018 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. TITLE MASM Template                     (main.asm)
  2.  
  3. ; Description: LAB 3
  4. ;
  5. ; Revision date: Oct 2 2012
  6.  
  7. INCLUDE Irvine32.inc
  8.  
  9. .DATA
  10. prompt      BYTE    "Enter A Valid Integer",0Dh, 0Ah, 0
  11. ipbuffer    Byte    "       "
  12. ipbuflen    EQU     $ - ipbuffer
  13. myecho      BYTE    "Echo: ",0
  14. TWO         DWORD   2d
  15. THREE       DWORD   3d   
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22. .CODE
  23. main PROC
  24. mov     edx, OFFSET prompt
  25. call    WriteString
  26. mov     edx, OFFSET ipbuffer
  27. mov     ecx, SIZEOF ipbuffer
  28. call    ReadString
  29. push    ecx
  30. call    CRLF
  31. mov     edx, OFFSET myecho
  32. call    WriteString
  33. call    CRLF
  34. mov     edx, OFFSET ipbuffer
  35. call    WriteString
  36. pop     ecx
  37. mov     edx, OFFSET ipbuffer
  38. call    parseinteger32
  39. add     eax, TWO
  40. sub     eax, THREE
  41. push    eax
  42. call    CRLF
  43. pop     edx
  44. call    WriteInt
  45. push    edx
  46. call    CRLF
  47. pop     edx
  48. ;call   clrf
  49. call    WriteHex
  50. RET
  51.  
  52. main ENDP
  53.  
  54. END main
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top