Library to program x86 (amd64) hardware. Contains x86 specific data structure descriptions, data-tables, as well as convenience function to call assembly instructions typically not exposed in higher level languages.
//! Helpers to program the task state segment.
//! See Intel 3a, Chapter 7
pubusecrate::segmentation;/// Returns the current value of the task register.
pubfntr()->segmentation::SegmentSelector{let segment:u16;unsafe{llvm_asm!("str $0":"=r"(segment))};segmentation::SegmentSelector::from_raw(segment)}/// Loads the task register.
pubunsafefnload_tr(sel:segmentation::SegmentSelector){llvm_asm!("ltr $0"::"r"(sel.bits()));}