Operating Systems Lecture Notes

2014 October 28 • Basic Paging


For example, Intel x86 architectures have the BSF (bit-scan forward) and BSR (bit-scan reverse) instructions. bsf d,s scans the 32 bits in s from left to right. If bsf finds a 1 bit, it sets the FZ condition code bit and stores the index of the 1 bit in d. If s doesn’t contain any 1 bits, ZF is cleared and d contains an undefined value.
This page last modified on 2006 January 24.