MCPcopy Create free account
hub / github.com/LibertyOS-Development/kernel / cur_show

Method cur_show

src/graphics/vga/mod.rs:213–237  ·  view source on GitHub ↗

Show cursor

(&self)

Source from the content-addressed store, hash-verified

211
212 // Show cursor
213 fn cur_show(&self)
214 {
215 let mut address: Port<u8> = Port::new(CRTC_ADDRESS_REG);
216 let mut data: Port<u8> = Port::new(CRTC_DATA_REG);
217
218 // The row that the cursor begins on
219 let cur_start = 13;
220
221 // The row that the cursor ends at
222 let cur_end = 14;
223
224 unsafe
225 {
226 // The start register of the cursor
227 address.write(0x0A);
228 let b = data.read();
229 data.write((b & 0xC0) | cur_start);
230
231
232 // The end register of the cursor
233 address.write(0x0B);
234 let b = data.read();
235 data.write((b & 0xE0) | cur_end);
236 }
237 }
238
239
240 // Write cursor

Callers 1

csi_dispatchMethod · 0.80

Calls 2

writeMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected