Trailing-Edge
-
PDP-10 Archives
-
decuslib10-11
-
43,50530/pasdeb.mac
There are 4 other files named pasdeb.mac in the archive. Click here to see a list.
00100 title PASDEB - module to initialize PASDDT from DDT
00150
00175 twoseg
00200
00203 .text \sys:pasddt/debug\
00206
00300 t1=1
00400 t2=2
00450 t3=3
00500
00503 ;This module is obviously absurd. It assumes that DDT is loaded, so
00506 ;.JBDDT points to it. In order to get a PASCAL main program to
00509 ;start up PASDDT, .JBDDT must instead be pointing to DDTDB. Since
00512 ;we don't want to change .JBDDT, instead we change the location
00515 ;the main program looks at. We change it to look at a location
00518 ;in this program that does indeed contain DDTDB.
00521
00600 pasdeb::hrrz t1,.jbsa## ;look for place where startup looks at .jbddt
00700 hrli t1,-200 ;assume within 200 of start
00800 hrrz t2,(t1) ;get address field
00900 caie t2,74 ;is it .jbddt?
01000 aobjn t1,.-2 ;no - try again
01100 caie t2,74 ;did we find it?
01200 jrst notpas ;no -must not be PASCAL
01300 hrroi t2,14 ;be sure not sharable
01400 gettab t2,
01500 halt . ;oh, come now
01600 tlne t2,(1b1) ;sharable?
01700 jrst shar ;yes
01800 movei t2,[xwd 0,ddtdb.##] ;our pseudo-.jbddt
01803 movei t3,0
01806 setuwp t3, ;clear write protect
01809 jrst noset
01900 noset1: hrrm t2,(t1) ;replace ref to .jbddt with addr of this
01903 movei t3,1
01906 setuwp t3, ;set write protect
01909 jfcl
02000 jrst ddt## ;and return to ddt
02100
02200 notpas: outstr [asciz /
02300 ? Doesn't seem to be a PASCAL main program
02400 /]
02500 jrst ddt##
02600
02700 shar: outstr [asciz /
02800 ? Is sharable. Can't debug a sharable program
02900 /]
02903 jrst ddt##
02904
02906 noset: outstr [asciz /
02909 ? Couldn't clear write protect...continuing
02912 /]
02915 jrst noset1
03100
03200 end