ldb #'S'
andb #%11101111 ; mask out bit 4 just for the test
ldbt B,1,4,$00 ; this instruction should copy the value of bit 1 in $00 of Direct Page memory to bit 4 in the B register
tfr B,A
jsr [$A002] ; just tells BASIC to print the char in A register
INFINITY
bra INFINITY
END START
The correct output on a coco with a 6309 CPU should be to print a "S" character and then wait in an infinite loop (so BASIC interpreter doesn't overwrite our outputted character). The LDBT instruction seems to just clobber the B register and load it with the value $EF instead under VCC v2.1.8.3 and the outputted character is a blue solid block instead of the character "S". The same thing happens in older versions as well.
I wrote a simple program to reproduce/illustrate:
START lda #%00000010 sta <$00
INFINITY bra INFINITY END START
The correct output on a coco with a 6309 CPU should be to print a "S" character and then wait in an infinite loop (so BASIC interpreter doesn't overwrite our outputted character). The LDBT instruction seems to just clobber the B register and load it with the value $EF instead under VCC v2.1.8.3 and the outputted character is a blue solid block instead of the character "S". The same thing happens in older versions as well.