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

Method moveCursor

lab5/src/3/src/kernel/stdio.cpp:50–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50void STDIO::moveCursor(uint position)
51{
52 if (position >= 80 * 25)
53 {
54 return;
55 }
56
57 uint8 temp;
58
59 // 处理高8位
60 temp = (position >> 8) & 0xff;
61 asm_out_port(0x3d4, 0x0e);
62 asm_out_port(0x3d5, temp);
63
64 // 处理低8位
65 temp = position & 0xff;
66 asm_out_port(0x3d4, 0x0f);
67 asm_out_port(0x3d5, temp);
68}
69
70uint STDIO::getCursor()
71{

Callers 1

c_time_interrupt_handlerFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected