4 ms·
It should in-principle be possible to write a branch where the code itself is single-bit-error resistant, in pseudo-machine-code something like: LOAD [launch
by caf 5y ago
It should in-principle be possible to write a branch where the code itself is single-bit-error resistant, in pseudo-machine-code something like:
LOAD [launch1]
COMPARE 0x89abcdef
JUMP_IF_NOT_EQUAL [fail_label]
LOAD [launch2]
COMPARE 0x01234567
JUMP_IF_NOT_EQUAL [fail_label]
LOAD [launch3]
COMPARE 0xfedcba98
JUMP_IF_NOT_EQUAL [fail_label]
BRANCH [launch_label]
You also need to ensure that launch_label and the location of the branch instruction are both more than one bit away from fail_label. You can duplicate the JUMP_IF_NOT_EQUAL instructions as needed - or indeed the whole block before the BRANCH - as necessary to ensure that.
- jacquesm 5y agoYour comment is one of the reasons why I still believe assembly has its place, when it really matters what kind of instructions you put out this is the sort of control you want. What your high level language is going to dump in the instruction stream is totally invisible (and interpreted languages are not even up for consideration in situations like these).