https://github.com/akkartik/mu/blob/main/apps/ex15.mu
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 fn main screen: (addr screen), keyboard: (addr keyboard), data-disk: (addr disk) {
31
32 var dummy/eax: int <- draw-code-point-on-real-screen 0x61/a, 0/x 0/y, 3/fg 0/bg
33 var dummy/eax: int <- overlay-code-point-on-real-screen 0x0300/combining-grave-accent, 0/x 0/y, 3/fg 0/bg
34
35
36
37 var dummy/eax: int <- draw-code-point-on-real-screen 0x67/g, 4/x 3/y, 3/fg 0/bg
38 var dummy/eax: int <- draw-code-point-on-real-screen 0x61/a, 4/x 4/y, 3/fg 0/bg
39 var dummy/eax: int <- overlay-code-point-on-real-screen 0x0300/combining-grave-accent, 4/x 4/y, 3/fg 0/bg
40
41
42
43 var dummy/eax: int <- draw-code-point-on-real-screen 0x67/g, 8/x 3/y, 3/fg 0/bg
44 var dummy/eax: int <- draw-code-point-on-real-screen 0x61/a, 9/x 3/y, 3/fg 0/bg
45 var dummy/eax: int <- overlay-code-point-on-real-screen 0x0300/combining-grave-accent, 9/x 3/y, 3/fg 0/bg
46
47
48
49 var dummy/eax: int <- draw-code-point-on-real-screen 0x0915/devanagari-letter-ka, 4/x 8/y, 3/fg 0/bg
50
51 var dummy/eax: int <- draw-code-point-on-real-screen 0x0915/devanagari-letter-ka, 7/x 8/y, 3/fg 0/bg
52 var dummy/eax: int <- overlay-code-point-on-real-screen 0x093e/devanagari-vowel-aa, 7/x 8/y, 3/fg 0/bg
53
54 var dummy/eax: int <- draw-code-point-on-real-screen 0x0915/devanagari-letter-ka, 0xa/x 8/y, 3/fg 0/bg
55 var dummy/eax: int <- overlay-code-point-on-real-screen 0x093f/devanagari-vowel-i, 0xa/x 8/y, 3/fg 0/bg
56
57 var dummy/eax: int <- draw-code-point-on-real-screen 0x0915/devanagari-letter-ka, 0xd/x 8/y, 3/fg 0/bg
58 var dummy/eax: int <- overlay-code-point-on-real-screen 0x0940/devanagari-vowel-ii, 0xd/x 8/y, 3/fg 0/bg
59
60 var dummy/eax: int <- draw-code-point-on-real-screen 0x0915/devanagari-letter-ka, 0x10/x 8/y, 3/fg 0/bg
61 var dummy/eax: int <- overlay-code-point-on-real-screen 0x0941/devanagari-vowel-u, 0x10/x 8/y, 3/fg 0/bg
62
63 var dummy/eax: int <- draw-code-point-on-real-screen 0x0915/devanagari-letter-ka, 0x13/x 8/y, 3/fg 0/bg
64 var dummy/eax: int <- overlay-code-point-on-real-screen 0x0942/devanagari-vowel-oo, 0x13/x 8/y, 3/fg 0/bg
65
66 var dummy/eax: int <- draw-code-point-on-real-screen 0x0915/devanagari-letter-ka, 4/x 9/y, 3/fg 0/bg
67 var dummy/eax: int <- overlay-code-point-on-real-screen 0x0947/devanagari-vowel-E, 4/x 9/y, 3/fg 0/bg
68
69 var dummy/eax: int <- draw-code-point-on-real-screen 0x0915/devanagari-letter-ka, 7/x 9/y, 3/fg 0/bg
70 var dummy/eax: int <- overlay-code-point-on-real-screen 0x0948/devanagari-vowel-ai, 7/x 9/y, 3/fg 0/bg
71
72 var dummy/eax: int <- draw-code-point-on-real-screen 0x0915/devanagari-letter-ka, 0xa/x 9/y, 3/fg 0/bg
73 var dummy/eax: int <- overlay-code-point-on-real-screen 0x094b/devanagari-vowel-o, 0xa/x 9/y, 3/fg 0/bg
74
75 var dummy/eax: int <- draw-code-point-on-real-screen 0x0915/devanagari-letter-ka, 0xd/x 9/y, 3/fg 0/bg
76 var dummy/eax: int <- overlay-code-point-on-real-screen 0x094f/devanagari-vowel-aw, 0xd/x 9/y, 3/fg 0/bg
77
78
79 var dummy/eax: int <- draw-code-point-on-real-screen 0x0915/devanagari-letter-ka, 0x10/x 0xa/y, 3/fg 0/bg
80 var dummy/eax: int <- overlay-code-point-on-real-screen 0x0902/devanagari-anusvara, 0x10/x 0xa/y, 3/fg 0/bg
81
82 var dummy/eax: int <- draw-code-point-on-real-screen 0x0915/devanagari-letter-ka, 0x13/x 9/y, 3/fg 0/bg
83 var dummy/eax: int <- overlay-code-point-on-real-screen 0x0903/devanagari-visarga, 0x13/x 9/y, 3/fg 0/bg
84
85
86 var text-storage: (stream byte 0x200)
87 var text/esi: (addr stream byte) <- address text-storage
88 var g/eax: grapheme <- to-grapheme 0x0915/devanagari-letter-ka
89 var ka/ecx: grapheme <- copy g
90
91 write-grapheme text, ka
92
93 write-grapheme text, ka
94 g <- to-grapheme 0x093e/devanagari-vowel-aa
95 write-grapheme text, g
96
97 write-grapheme text, ka
98 g <- to-grapheme 0x093f/devanagari-vowel-i
99 write-grapheme text, g
100
101 write-grapheme text, ka
102 g <- to-grapheme 0x0940/devanagari-vowel-ii
103 write-grapheme text, g
104
105 write-grapheme text, ka
106 g <- to-grapheme 0x0941/devanagari-vowel-u
107 write-grapheme text, g
108
109 write-grapheme text, ka
110 g <- to-grapheme 0x0942/devanagari-vowel-oo
111 write-grapheme text, g
112
113 write-grapheme text, ka
114 g <- to-grapheme 0x0947/devanagari-vowel-E
115 write-grapheme text, g
116
117 write-grapheme text, ka
118 g <- to-grapheme 0x0948/devanagari-vowel-ai
119 write-grapheme text, g
120
121 write-grapheme text, ka
122 g <- to-grapheme 0x094b/devanagari-vowel-o
123 write-grapheme text, g
124
125 write-grapheme text, ka
126 g <- to-grapheme 0x094f/devanagari-vowel-aw
127 write-grapheme text, g
128
129 write-grapheme text, ka
130 g <- to-grapheme 0x0902/devanagari-anusvara
131 write-grapheme text, g
132
133 write-grapheme text, ka
134 g <- to-grapheme 0x0903/devanagari-visarga
135 write-grapheme text, g
136
137 set-cursor-position screen, 4/x 0xe/y
138 draw-stream-wrapping-right-then-down-from-cursor-over-full-screen screen, text, 3/fg 0/bg
139
140
141 set-cursor-position 0, 4/x 0x12/y
142 draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, "எ ஃ கு ", 3/fg 0/bg
143 set-cursor-position 0, 4/x 0x13/y
144 draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, "அ ன் று ", 3/fg 0/bg
145 set-cursor-position 0, 4/x 0x14/y
146 draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, "அ தா வ து " , 3/fg 0/bg
147 set-cursor-position 0, 4/x 0x15/y
148 draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, "அ ஃ தா ன் று ", 3/fg 0/bg
149 }