Trailing-Edge
-
PDP-10 Archives
-
tops10_tools_bb-fp64a-sb
-
10,7/snup/mstcks.mac
There are 4 other files named mstcks.mac in the archive. Click here to see a list.
TITLE MSTCKS - COMPUTE MONITOR SYMBOL TABLE CHECKSUM
SUBTTL G.M. UHLER/GMU
SEARCH JOBDAT,MACTEN,UUOSYM,SNUP
.REQUIRE SNUP
SALL
T1==1
T2==2
T3==3
T4==4
P==17
PDLLEN==50
MONREF MSTCKS
BRKPNT SYSCRH
START: JFCL ;NO CCL ENTRY
RESET ;RESET EVERYTHING
MOVE P,[IOWD PDLLEN,PDL] ;SETUP A PDL
PUSHJ P,GETINF## ;DEFINE THE BREAKPOINTS
MOVE T1,MSTCKS ;GET THE ADDRESS OF MSTCKS
PEEK T1, ;GET THE OLD VALUE
MOVEM T1,OLDSUM ;SAVE OLD VALUE OF CHECKSUM
OUTSTR [ASCIZ/[Current monitor symbol table checksum = /]
MOVE T1,OLDSUM ;GET THE CHECK SUM
PUSHJ P,.TXWDW ;TYPE AS HALF WORDS
OUTSTR [ASCIZ/]
/]
OUTSTR [ASCIZ/[Computed monitor symbol table checksum = /]
MOVE T1,CHKSUM ;GET THE CHECK SUM
PUSHJ P,.TXWDW ;TYPE AS HALF WORDS
OUTSTR [ASCIZ/]
/]
MOVE T1,OLDSUM ;GET CURRENT MONITOR CHECKSUM
CAMN T1,CHKSUM ;DIFFERENT FROM COMPUTED VALUE?
JRST DONE ;NO, JUST FINISH UP AND EXIT
MOVE T1,[3,,T2] ;SETUP ARG FOR POKE
MOVE T2,MSTCKS ;GET ADDRESS TO POKE
MOVE T3,OLDSUM ;GET OLD VALUE OF CHECKSUM
MOVE T4,CHKSUM ;GET NEW VALUE OF CHECKSUM
POKE. T1, ;CHANGE THE VALUE
JRST [OUTSTR [ASCIZ/?POKE. failed to change the value
/]
JRST DONE]
OUTSTR [ASCIZ/[Monitor value changed]
/]
DONE: RESET
MONRT.
JRST .-1
.TXWDW: PUSH P,T1 ;PRESERVE ARGUMENT
HLRZ T1,T1
PUSHJ P,.TOCTW
OUTSTR [ASCIZ/,,/]
POP P,T1 ;RESTORE ARGUMENT
HRRZ T1,T1
.TOCTW: MOVEI T3,10 ;INITIALIZE FOR OCTAL RADIX
TRDXW1: IDIV T1,T3 ;DIVIDE BY RADIX
MOVMS T2 ;GET MAGNITUDE
HRLM T2,(P) ;SAVE REMAINDER
SKIPE T1 ;SEE IF ANYTHING LEFT
PUSHJ P,TRDXW1 ;YES--LOOP BACK WITH PD LIST
HLRZ T1,(P) ;GET BACK A DIGIT
ADDI T1,"0" ;CONVERT TO ASCII
CAILE T1,"9" ;SEE IF OVERFLOW DIGITS
ADDI T1,"A"-"9"-1 ;YES--SWITCH TO ALPHABETICS
OUTCHR T1
POPJ P,
PDL: BLOCK PDLLEN
OLDSUM: BLOCK 1
END START