Guest User

Untitled

a guest
Oct 9th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. TITLE Data Definitions               (DataDef.asm)
  2.  
  3. ; Examples showing how to define data.
  4. ; Last update: 06/01/2006
  5.  
  6. INCLUDE Irvine32.inc
  7.  
  8. ; ----------------- Byte Values ----------------
  9. .data
  10. value1  BYTE  'A'
  11. value2  BYTE   0
  12. value3  BYTE   255
  13. value4  SBYTE  -128
  14. value5  SBYTE  +127
  15. value6  BYTE   ?
  16. value7  BYTE  'AB'
  17. value8  BYTE  0ABh
  18.  
  19. list1   BYTE  10, 32, 41h, 00100010b
  20. list2   BYTE  0Ah, 20h, 'A', 22h
  21. array1  BYTE  20 DUP(0)
  22.  
  23. greeting1 BYTE "Good afternoon",0
  24.  
  25. ; ----------------- Word Values ---------------------
  26.  
  27. word1   WORD   65535    ; largest unsigned value
  28. word2   SWORD  -32768   ; smallest signed value
  29. word3   WORD   ?        ; uninitialized
  30. myList  WORD   1,2,3,4,5    ; array of words
  31.  
  32. ; --------------- DoubleWord Values --------------
  33.  
  34. val1  DWORD   12345678h
  35. val2  SDWORD  -2147483648
  36. val3  DWORD   20 DUP(?)
  37.  
  38. ; ------- QuadWord and TenByte Values ------------
  39.  
  40. quad1  DQ  234567812345678h
  41. ten1   DT  1000000000123456789Ah
  42.  
  43. ;------------------ Reals --------------------
  44.  
  45. rVal1  REAL4   -1.2
  46. rVal2  REAL8   3.2E-260
  47. rVal3  REAL10  4.6E4096
  48.  
  49. ; The following ranges were discovered by trial and error:
  50.  
  51. ShortRealMax REAL4 9.9E+37      ; maximum exponent
  52. ShortRealMin REAL4 9.9E-38      ; minimum exponent
  53.  
  54. LongRealMax REAL8 9.0E+307      ; maximum exponent
  55. LongRealMin REAL8 9.9E-308      ; minimum exponent
  56.  
  57. ExtRealMax REAL10 9.9E+4931     ; maximum exponent
  58. ExtRealMin REAL10 9.9E-5199     ; minimum exponent
  59.  
  60.  
  61. ShortArray REAL4 20 DUP(0.0)
  62.  
  63. ; ----------------- Pointers ---------------------
  64.  
  65. arrayB  BYTE  10,20,30,40
  66. arrayW  WORD  1000h,2000h,3000h,4000h
  67. ptrB    DWORD  arrayB           ; points to arrayB
  68. ptrW    DWORD  arrayW           ; points to arrayW
  69.  
  70. .code
  71. main PROC
  72.  
  73.  
  74.  
  75.     exit
  76. main ENDP
  77. END main
Add Comment
Please, Sign In to add comment