home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / FORTRAN / SUPERT87.ZIP / RMHOME.ASM < prev    next >
Encoding:
Assembly Source File  |  1986-12-15  |  1.3 KB  |  64 lines

  1.         name    home
  2. ;
  3. ; subroutine home: assembly language routine that uses the video
  4. ; bios call to home the cursor
  5. ;
  6. ; fortran call is : call home
  7. ;
  8. ;
  9. ;    interface to IBM professional fortran 1.0
  10.  
  11. stack_size    equ    6    ; number of bytes needed on stack
  12.  
  13. data        segment
  14.         db    'home    '
  15. sp_save    dw    ?
  16.         dd    home
  17.         dd    0
  18. data        ends
  19.  
  20.  
  21.  
  22. ;
  23. code        segment    'code'
  24.         assume    cs:code,ds:data,es:nothing,ss:nothing
  25.         public    home
  26. home        proc        far
  27.  
  28.  
  29. ;----------execute Profort standard entry linkage--------------------
  30.  
  31.         push    ds
  32.         sub    bp,stack_size+6
  33.         mov    ax,data
  34.         mov    ds,ax
  35.         mov    sp_save,sp
  36.         mov    sp,bp
  37. ;---------------------------------------------------------------------
  38.  
  39. ;    make call for video parameters to get the number of the
  40. ;    active page needed by the video bios set cursor command
  41.  
  42.         mov    ah,15        ; get current video state
  43.         int    10h        ; call video bios
  44.  
  45. ;    active page is in bh. 
  46.         mov    dx,0        ; cursor to (0,0)
  47.         mov    ah,2        ; set cursor
  48.         int    10h        ; call video bios
  49.  
  50. ;-------------perform exit linkage------------------------------------
  51.  
  52.         add    sp,stack_size+2
  53.         ret
  54. ;---------------------------------------------------------------------
  55.  
  56. home        endp
  57. code        ends
  58.         end
  59.  
  60. stack        segment word stack 'stack'
  61.         db    stack_size dup(?)
  62. stack        ends
  63.         end
  64.