Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
AFAIK, bits 12-15 on 8086 always set to '1'and bits 12-15 on 80286 always set to '0'. This code inverts bit 14 and tries to save it back to FLAGS. If FLAGS is changed it means that the processor is not 80286 & 8086, but higher.
Note, that the code doesn't restore previous value of bit 14 (may be it does it later in 'cpugood' branch?). If not, you have to add something like: