Sometimes, compilation is more easy to understand than senior languages.

xiaoxiao2021-03-06  64

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;

转载请注明原文地址:https://www.9cbs.com/read-83690.html

New Post(0)