MCPcopy Create free account
hub / github.com/YatSenOS/YatSenOS-Tutorial-Volume-1 / getCursor

Method getCursor

lab4/src/7/src/kernel/stdio.cpp:67–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67uint STDIO::getCursor()
68{
69 uint pos;
70 uint8 temp;
71
72 pos = 0;
73 temp = 0;
74 // 处理高8位
75 asm_out_port(0x3d4, 0x0e);
76 asm_in_port(0x3d5, &temp);
77 pos = ((uint)temp) << 8;
78
79 // 处理低8位
80 asm_out_port(0x3d4, 0x0f);
81 asm_in_port(0x3d5, &temp);
82 pos = pos | ((uint)temp);
83
84 return pos;
85}
86
87void STDIO::moveCursor(uint x, uint y)
88{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected