[COFF] TECO variants

Dan Cross via COFF coff at tuhs.org
Wed Sep 24 06:09:18 AEST 2025


On Tue, Sep 23, 2025 at 8:13 AM Mike Markowski via COFF <coff at tuhs.org> wrote:
> [snip]
> What do you mean, it's unreadable? :-)  Curious what it was doing, I
> rewrote with comments:
>
> .UU                 ! Put dot in Q-reg U.                 !
> <                   ! Loop till finding white space.      !
>      0A-32"E0;'      !   Ascii code at dot == space? break !
>      0A-9"E0;'       !   Ascii code at dot == \t?    break !
>      0A-10"E0;'      !   Ascii code at dot == \n?    break !
>      C               !   Fwd 1 char.                       !
>  >
> .UL$                ! Put loc of 1st white space in L.    !
>
> QUJ                 ! Return to original dot.             !
> QL-QU<              ! Loop from U (orig dot) to L (1st white space). !
>      0A-64"G         !   If ascii code at dot >= 'A':      !
>          0A-91"L     !     If also <= 'Z':                 !
>              0A+32I  !       Insert lower case letter.     !
>              D       !       Delete upper case letter.     !
>              R       !       Back up 1 char to prepare for 'C' below. !
>          '
>      '
>      C               ! Fwd 1 char !
>  >$

Huh, neat (and very clear explanation; thanks for that). I suppose the
registers 'U' and 'L' are meant to be evocative of 'Upper' and 'Lower'
(bounds)?  It appears as though they're reversed here?  Perhaps I am
trying to ascribe meaning where none exists.

        - Dan C.


More information about the COFF mailing list