home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / developm / scnote / cplussmp.014 / TESampleGlue.a < prev   
Encoding:
Text File  |  1989-10-01  |  1.8 KB  |  66 lines

  1. ;
  2. ;    Apple Macintosh Developer Technical Support
  3. ;
  4. ;    MultiFinder-Aware Simple TextEdit Sample Application
  5. ;
  6. ;    CPlusTESample
  7. ;
  8. ;    TESampleGlue.a        -    Assembler Source
  9. ;
  10. ;    Copyright ⌐ 1988, 1989 Apple Computer, Inc.
  11. ;    All rights reserved.
  12. ;
  13. ;    Versions:    
  14. ;            1.20                    10/89
  15. ;            1.10                     07/89
  16. ;            1.00                     04/89
  17. ;    
  18. ;    Components:
  19. ;            CPlusTESample.make        October 1, 1989
  20. ;            TApplicationCommon.h    October 1, 1989
  21. ;            TApplication.h            October 1, 1989
  22. ;            TDocument.h                October 1, 1989
  23. ;            TECommon.h                October 1, 1989
  24. ;            TESample.h                October 1, 1989
  25. ;            TEDocument.h            October 1, 1989
  26. ;            TApplication.cp            October 1, 1989
  27. ;            TDocument.cp            October 1, 1989
  28. ;            TESample.cp                October 1, 1989
  29. ;            TEDocument.cp            October 1, 1989
  30. ;            TESampleGlue.a            October 1, 1989
  31. ;            TApplication.r            October 1, 1989
  32. ;            TESample.r                October 1, 1989
  33. ;
  34. ;    AsmClikLoop
  35. ;
  36. ;    This routine gets called by the TextEdit Manager from TEClick.
  37. ;    It calls the old, default click loop routine that scrolls the
  38. ;    text, and then calls our own Pascal routine that handles
  39. ;    tracking the scroll bars to follow along.  It doesn't bother
  40. ;    with saving registers A0 and D0, because they are trashed
  41. ;    anyway by TextEdit.
  42. ;
  43.  
  44. AsmClikLoop    PROC        EXPORT
  45.  
  46.             IMPORT        GETOLDCLIKLOOP
  47.             IMPORT        PASCALCLIKLOOP
  48.             
  49.             MOVEM.L        D1-D2/A1,-(SP)        ; D0 and A0 need not be saved
  50.             
  51.             CLR.L        -(SP)                ; make space for procedure pointer
  52.             JSR            GETOLDCLIKLOOP        ; get the old clikLoop
  53.             MOVEA.L        (SP)+,A0            ; into A0
  54.             
  55.             MOVEM.L        (SP)+,D1-D2/A1        ; restore the world as it was
  56.             JSR            (A0)                ; and execute old clikLoop
  57.  
  58.             MOVEM.L        D1-D2/A1,-(SP)        ; D0 and A0 need not be saved
  59.             JSR            PASCALCLIKLOOP        ; do our clikLoop
  60.             MOVEQ        #1,D0                ; clear the zero flag so TextEdit keeps going
  61.             MOVEM.L        (SP)+,D1-D2/A1        ; restore the world as it was
  62.             RTS
  63.  
  64.             END 
  65.  
  66.