SALC - Set AL on CarryASM/8086

This small gem presents an undocumented opcode available on all Intel CPUs. The instruction mnemonic is called SALC and sets AL to match the carry flag, ie if the Carry is set, AL will be set to FF, else zero. The instruction macro looks like this:

;
; salc - set al to carry (undocumented opcode)
;
; input:
;   none
;
; output:
;   al = 0FFh * CF
;
; destroys:
;   nothing
;
        macro
                db      0d6h
        endm
It does not affect any flags. It was first documented officially when Intel released the Pentium Pro processor. It is officially named SALC.
Gem writer: John Eckerdal
last updated: 1998-03-16