- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsharp.cpp
More file actions
Latest commit
30 lines (24 loc) · 438 Bytes
/
Copy pathsharp.cpp
File metadata and controls
30 lines (24 loc) · 438 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include"code.h"
namespace
{
voidword(short s) {
for (int i = 0; i < 16; i++) {
*ptr++ = 0b11100001;
if (s & 1) *ptr++ = 0b11100000;
s >>= 1;
}
}
} // anonymous
namespaceuser
{
voidsharp(char a, char c) {
short s = 0x2000 | (c << 5) | a;
while (transmitting_());
ptr = buffer;
*ptr++ = -1; *ptr++ = 78; *ptr++ = 10;
word(s);
*ptr++ = 126; *ptr++ = 126;
word(s ^ 0x7fe0);
transmit_();
}
} // user