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

Method getCursor

lab6/src/3/src/kernel/stdio.cpp:70–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected