1: ldfps = 170100^tst
   2: rtt = 6
   3: /
   4: / oldsigill = ldfps(number);
   5: /
   6: /  This is a hacked version of ldfps that is designed to work
   7: /  in all three of the following situations:
   8: /	1.  PDP's with hardware floating point.
   9: /	2.  PDP's without an FPU using the floating point simulator.
  10: /	3.  PDP's without an FPU without the floating point simulator
  11: /	    (in programs not otherwise using floating point).
  12: /  It returns the previous signal value for SIGILL, since it isn't
  13: /  otherwise safe to test that with signal() when using the floating point
  14: /  interpreter.  This is used in main() to see whether it should catch SIGILL.
  15: 
  16: .globl  _ldfps
  17: _ldfps:
  18:         mov     r5,-(sp)
  19:         mov     sp,r5
  20:         sys     signal; 4; 3f           / see if SIGILL is being caught
  21:         mov     r0, 0f
  22:         beq     1f                      / if not, use our catcher
  23:         sys     indir; 8f               / if so, reset the old catch value now
  24: 1:
  25:         ldfps   4(r5)
  26: 2:
  27:         sys     indir; 8f               / restore the old signal (if we haven't)
  28:         mov     0f,r0                   / return old signal value
  29:         mov     (sp)+,r5
  30:         rts     pc
  31: 
  32: 3:                                      / trap here if no fp hardware
  33:         mov     $2b,(sp)                / adjust return address past ldfps
  34:         rtt
  35: 
  36:         .data
  37: 8:
  38:         sys     signal; 4; 0: 0

Defined functions

_ldfps declared in line 16; defined in line 17; used 1 times
  • in line 16
Last modified: 1983-07-26
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 275
Valid CSS Valid XHTML 1.0 Strict