Yes, the ASL stores the high bit (inverse video) into the carry, then pushed in the stack with the PHP, so the state is unknown at the SBC.
Right, but A bit 0 is then guaranteed to be 0 at that point and is discarded later with the ROR, so the SEC can be dropped and the SBC adjusted to SBC #$3F, or equivalently ADC #$C0 used. Did an exhaustive test of all 256 values and it seems to work fine.
does not change perocesor flags nor registers
delay6 .byte $80
delay5 .byte $80
delay4 .byte $80
delay3 .byte $04
delay2 .byte $1a
Thanks, but I'm avoiding including anything with illegal opcodes for now. Most of the time they are not necessary and I don't intend to encourage recreational use of them.