Check if a certain bit is 1, if you use the advanced language, you will have more trouble.
Function checkbit (abyte: Byte; POS: BYTE): Boolean; Assembler;
// 76543210
ASM
MOV CL, DL; // POS in DL
SHR Al, Cl; // Abyte IN Al
And Al, 1; // Result in Al
END;