home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c329 / 2.img / EXAMPLES / GET_ADDR.S < prev    next >
Encoding:
Text File  |  1989-09-27  |  840 b   |  39 lines

  1. page    ,132
  2. title    GET_ADDR Return the address of a data object
  3.  
  4. ;***************************************************************
  5. ; Call:
  6. ;
  7. ; integer get_addr(data_object)
  8. ; data_object is any legitimate data item in Fortran-386
  9. ;
  10. ;***************************************************************
  11. ;
  12. ; Fortran has no pointer type, or offset operator. This function
  13. ; acts as an offset operator for those cases in which the address
  14. ; of a Fortran data object must be assigend to a Fortran variable
  15.  
  16. page
  17.         assume  cs:codeseg
  18.  
  19. codeseg segment dword er public use32 
  20.  
  21.         align   4
  22.  
  23.         public  _get_addr_
  24.  
  25.  
  26. _get_addr_ proc    near
  27.  
  28.     push    ebp            ; Set up frame.
  29.     mov    ebp,esp
  30.     mov    eax,[ebp+8]        ; address into eax
  31.     pop    ebp            ; Restore old frame.
  32.  
  33.         ret                
  34.  
  35. _get_addr_ endp
  36.  
  37. codeseg ends
  38.     end
  39.