On Tue, 10 Dec 2019 22:03:35 -0500, Thomas DeBellis wrote:
The first instruction is a branch-on-bit-set and it
looks like it is
testing a bit and branching if it is set. It would appear that bit is
associated with V7 DAP, based both on the symbolic value and comment.
Correct. I'm far from being proficient at VAX assembly, but...
| 596 CHECK_PROTOCOL_VERSION: ; Set appropriate DAP$Q_DCODE_FLG bits
| 597 MOVZBL DAP$B_VERNUM(R9),R0 ; Combine version number and ECO
| 598 ASHL #8,R0,R0 ; number fields into one 16-bit
| 599 ADDB2 DAP$B_ECONUM(R9),R0 ; value for easy comparison
| 600
| 601 ;
| 602 ; Set status flag if partner implemented to DAP spec since V4.1.
| 603 ;
| 604
| 605 CMPW R0,#^X0401 ; Did partner implement since DAP V4.1?
| 606 BLSSU 10$ ; Branch if not
| 607 $SETBIT #DAP$V_GEQ_V41,(R9) ; Set flag
|
| [Same for V4.2, V5.2, V5.4, V5.6, and V6.0]
|
| 650 ; Set status flag if partner implemented to DAP spec since V7.0.
| 651 ;
| 652
| 653 CMPW R0,#^X0700 ; Did partner implement since DAP V7.0?
| 654 BLSSU 10$ ; Branch if not
| 655 $SETBIT #DAP$V_GEQ_V70,(R9) ; Set flag
| 656
|
| [Same for V7.1 and V7.2 too]
If that branch isn't taken, then an unconditional
branch is taken to what
appears to be an unsupported function return.
It seems so:
| 2462 ;++
| 2463 ; The ACCFUNC field value is unsupported for state table context.
| 2464 ;--
| 2465
| 2466 FAL$UNS_ACCFUNC:: ; Entry point
| 2467 MOVL #DAP$_ACCFUNC,R0 ; Get field ID code
| 2468 BRW ERR_UNSUPPORT ; Return error in Status message
| ....
| 3165 ;++
| 3166 ; Return DAP unsupported error.
| 3167 ; R0 contains DAP field ID code on input.
| 3168 ;--
| 3169
| 3170 ERR_UNSUPPORT: ; Entry point
| 3171 MOVZBL DAP$B_TYPE(R9),R1 ; Get DAP message type
| 3172 MOVL #DAP$_UNSUPPORT,R2 ; Get DAP MACCODE value
| 3173 BRB EXIT_STS_FAIL ; Send Status message
| ....
| 3183 ;++
| 3184 ; Build and send (failure) Status message to partner.
| 3185 ; Declare this last message of a response sequence and exit state with failure.
| 3186 ; R0 contains RMS completion code on input.
| 3187 ;--
| 3188
| 3189 EXIT_STS_FAIL: ; Entry point
| 3190 BISL2 #FAL$M_LAST_MSG,(R8) ; Declare this last message to block
| 3191 BSBW FAL$ENCODE_STS ; Build Status message
| 3192 BSBW FAL$TRANSMIT ; Send Status message to partner
G.