home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / cpm / utils / asmutl / asmlib.lbr / INLINE.AZM / INLINE.ASM
Encoding:
Assembly Source File  |  1991-06-25  |  896 b   |  47 lines

  1. ;----------------------------------------------------------------
  2. ;         This is a module in the ASMLIB library
  3. ;
  4. ;
  5. ;
  6. ; Print the string which follows the call instruction that got
  7. ; us to this point. NOTE that a JMP must never be done to
  8. ; enter this routine.
  9. ;
  10. ;
  11. ;
  12. ;            Written         R.C.H.     16/8/83
  13. ;            Last Update    R.C.H.       22/10/83
  14. ;----------------------------------------------------------------
  15. ;
  16.     name    'inline'
  17. ;
  18.     public    inline
  19.     extrn    dispatch
  20.     maclib    z80
  21. ;
  22. inline:    
  23.     xthl                ; get address of string (ret address)
  24.     push    psw
  25. inline2:
  26.     mov    a,m
  27.     inx    h            ; point to next character
  28.     cpi    '$'
  29.     jrz    inline3
  30.     call    dispatch
  31.     jr    inline2
  32. inline3:
  33.     pop    psw
  34.     xthl                ; load return address after the '$'
  35.     ret                ; back to code immediately after string
  36. ;
  37. ;
  38. ;
  39. ;
  40. ;
  41. ;
  42.     end
  43.  
  44.  
  45.  
  46.  
  47.