(*
WATCHES2 TXT   :based upon file "WATCHES.TXT", giving an example for
                ASM registers as watches. Probably better to read
                "watches.txt" first.
                See/text-search in file WATCHES.TXT for "WATCHES2.TXT".



         ALT-D, R displays the registers, but sometimes you might want to
         see eg. "AL as a char" or decimally rather than hexa-decimally,

         program x;
         begin
           ASM
             mov ah, 'a'
             mov al, 'b'
           END
         end.
         [] Watches
          al: 98
          al,c: 98
          al,h: $62
          al,mc: 'b'
          ax,h: $6162
          ax,m: 62 61
          ax,mc: 'ba'
          ax,d: 24930
          ax,md: 98 97
          char(ah): 'a'

         "AX" as Watches displays 'ba' where AX displayed hexa-decimally
         via ALT-D, R would be 'ab'.

         ((
           I would assume, that the debugger stores the variable AX as a
           word variable in memory, which hence "swaps" the bytes
           "as usually" with Intel based systems - as mentioned in file
           Watches.txt under "VALUE & HOW IT IS STORED"
           The ALT-D, R register values have therefore the advantage of
           displaying the 8-bit values "as it is expected" for registers.
         )

           WATCHES:
             ax,m: 62 61
             ax,mc: 'ba'

           ALT-D, R:
             [] CPU 3ͻ
              AX 6162 DX 55AD 



        About not using one line for each Watch as discussed
        in file Watches.txt under "MANY VARS TO DISPLAY"
*)

         program x;
         begin
           ASM
             mov ah,97   {'a'}
             mov al,98   {'b'}
             mov bh,99
             mov bl,100
             mov ch,101
             mov cl,102
             mov dh,103
             mov dl,104
           END
         end.

         After the above code is run:

         ALT-D, R:
           [] CPU 3ͻ
            AX 6162 DX 6768 
            CX 6566 BX 6364 
            IP 001F CS 6020 
            SI 0264 DS 6025 
            DI 015E ES 6025 
            SP 3FFE SS 6051 
            BP 3FFE         
            c=0 z=0 s=0 o=0 
            p=1 i=1 a=0 d=0 
           ͼ

         WATCHES:
           [] Watches 
            ax,h: $6162
            ax,m: 62 61
            ax,4h: $6162,$6364,$6566,$6768
            al,8m: 62 61 64 63 66 65 68 67
            al,8mc: 'badcfehg'
            al,8: 98,97,100,99,102,101,104,103
            ax,4: 24930,25444,25958,26472
            ax,4c: 24930,25444,25958,26472

   As you noticed, "ax,4h" displays ax,bx,cx,dx in just one line, yet
   practically as found with ALT-D, R

   The other formats don't seem to be terribly helpful, because of the
   in this case undesirable swapping of word-"variables".


   BTW, FWIW
     Adding ",c" is unfortunately ignored, if used "by itself":
     Eg. "al,c" displays "al" decimally, but not as a char.

     While "swap(ax)" is possible, "swap(ax),mc" is of no avail.
      swap(ax): 25185
      swap(ax),mc: 25185




Oct-1995
jC,v960224
