home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / decpro300 / proreg.mac < prev    next >
Text File  |  2020-01-01  |  1KB  |  77 lines

  1. ;     AUTHOR:    P. KNUEVEN    DATE:    30-NOV-73
  2. ;
  3. ; THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
  4. ; OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
  5. ;
  6. ; COPYRIGHT (C) 1978 DIGITAL EQUIPMENT CORPORATION, MAYNARD,
  7. ; MASS. 01754
  8. ;
  9. ; File:   SAVREG.MAC
  10. ;
  11. ;    This work was supported by the Advanced Research
  12. ;    Projects Agency of the Office of the Secretary of
  13. ;    Defense (F44620-73-C-0074) and is monitored by the
  14. ;    Air Force Office of Scientific Research.
  15.  
  16. ; The BLISS-11 out-of-line routines to save and restore register contents.
  17. ;
  18. ; 30-Nov-73            P. Knueven
  19. ;
  20. ; The routine $SAVn is called at the beginning of a routine
  21. ; which modifies the contents of registers 1 thru n.  The calling
  22. ; sequence is the following:
  23. ;        JSR  R1,$SAVn
  24. ;
  25.  
  26. R1=%1
  27. R2=%2
  28. R3=%3
  29. R4=%4
  30. R5=%5
  31. SP=%6
  32. PC=%7
  33.  
  34.     .GLOBL    $SAV2,$SAV3
  35.     .GLOBL    $SAV4,$SAV5
  36.  
  37. $SAVE2::
  38. $SAV2:    MOV    R2,-(SP)
  39.     MOV    R1,-(SP)
  40.     MOV    4(SP),R1
  41.     JSR    PC,@(SP)+
  42.     BR    RE2
  43.  
  44. $SAVE3::
  45. $SAV3:    MOV    R2,-(SP)
  46.     MOV    R3,-(SP)
  47.     MOV    R1,-(SP)
  48.     MOV    6(SP),R1
  49.     JSR    PC,@(SP)+
  50.     BR    RE3
  51.  
  52. $SAVE4::
  53. $SAV4:    MOV    R2,-(SP)
  54.     MOV    R3,-(SP)
  55.     MOV    R4,-(SP)
  56.     MOV    R1,-(SP)
  57.     MOV    8.(SP),R1
  58.     JSR    PC,@(SP)+
  59.     BR    RE4
  60.  
  61. $SAVE5::
  62. $SAV5:    MOV    R2,-(SP)
  63.     MOV    R3,-(SP)
  64.     MOV    R4,-(SP)
  65.     MOV    R5,-(SP)
  66.     MOV    R1,-(SP)
  67.     MOV    10.(SP),R1
  68.     JSR    PC,@(SP)+
  69.     MOV    (SP)+,R5
  70. RE4:    MOV    (SP)+,R4
  71. RE3:    MOV    (SP)+,R3
  72. RE2:    MOV    (SP)+,R2
  73.     MOV    (SP)+,R1
  74.     RTS    PC
  75.  
  76.     .END
  77.