aboutsummaryrefslogtreecommitdiff
path: root/src/biosfont.h.cpp
blob: fc97ea60fa469174db90de390b252c78e4545eb5 (plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
/*****************************************************************************/
/// @file biosfont.h.cpp with "modified BSD license"
/// @author Jonathan D. Lettvin (jlettvin|gmail|com) Apr  5 2008
/*
* Copyright (c) 2008, Jonathan D. Lettvin
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*     * Redistributions of source code must retain the above copyright
*       notice, this list of conditions and the following disclaimer.
*     * Redistributions in binary form must reproduce the above copyright
*       notice, this list of conditions and the following disclaimer in the
*       documentation and/or other materials provided with the distribution.
*     * Neither the name of Jonathan Lettvin Consulting nor the
*       names of its contributors may be used to endorse or promote products
*       derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY JONATHAN D. LETTVIN ''AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL JONATHAN D. LETTVIN BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/// @brief (http://en.wikipedia.org/wiki/BSD_license)
/*****************************************************************************/
/// @brief Usage and example compilations:
///        Include this file in other source code:
///              /// #define BIOSFONT_STATICS /// In one compilation unit.
///              #include "biosfont.h.cpp"
///        Example of autonomous unit test compilation and execution.
///              g++ -Wall -W4 -O4 -DBIOSFONT_UNIT_TEST biosfont biosfont.h.cpp
///              strip biosfont
///              ./biosfont
///        This code also compiles in ordinary C (by eliminating namespacing).
///              gcc -Wall -W4 -O4 -DBIOSFONT_UNIT_TEST biosfont biosfont.h.cpp
/*****************************************************************************/
/// @brief Purpose: This file provides an absolute bitmapped graphics font.
///        This is a (slightly adjusted) iAPX86 ROM BIOS font.
///        This font supports ASCII codes 00H-FFH.
///        This code is invariant to endian issues.
///        No external resources, libraries, or calls are needed or used.
///        EBCDIC and other encodings are not supported.
/*****************************************************************************/
/// @brief File naming convention: (why *.h.cpp?)
///        Managing multiple source files can be cumbersome.
///        Files implementing very simple tables and code can be
///        entirely autonomous, making distribution/integration easy:
///        This file can be used as a pure header.
///        There is no restriction on including .cpp files as headers.
///        Using a .cpp extension enables direct unit test compilation.
///        Naming it .h.cpp is sufficiently unique to be recognized.
///        I offer this naming style for headers with built-in unit testing.
/*****************************************************************************/
///  @brief Organization:
///        This files shows a sample debug font acquisition.
///        This is followed by the magnified font.
///        This is followed by the font bitmap value table.
///        This is followed by an inline font bit accessor function.
///        This is followed by unit test functions and a main function.
/*****************************************************************************/
///  @brief Size and Technical details:
///        256 8 x 8 bit glyphs fit into 64 bits each for a
///        memory footprint of 2KBytes both here and in BIOS.
///        Compiled unit test size including main and runtime libraries:
///              9,216 Windows XP with gcc version 3.4.5 (mingw special)
///        Bits start at the upper left and end at the lower right.
///        US English BIOS provides ASCII 0-127 at F000:FA6E and
///        extension codes 128-255 at the address stored in 0000:007C.
///        Note: the bits of each byte have been swapped end-to-end
///        (i.e. 000100111  becomes 111001000).
///        This reduces reconstruction complexity.
/*****************************************************************************/
/// @brief How the iAPX86 ROM BIOS font was copied.
///        Early IBM PCs provided fonts burned into ROM.
///        (http://en.wikipedia.org/wiki/Color_Graphics_Adapter)
///        The following web-page is useful for DEBUG novitiates.
///        (http://mirror.href.com/thestarman/asm/debug/debug2.htm)
///        Data was acquired by the following DOS operation.
/*****************************************************************************/
/*This is both user input and debug output.
C:\>DEBUG          ;Start debug from a command prompt
-N lower           ;Prompted by '-', Name the outut file
-R CX              ;Request to change the byte count
CX 0000            ;Currently it is 0
:400               ;You set it to 400H (1024)
-RBX               ;Make sure this is zero
BX 0000            ;Currently it is 0
:0000              ;You set it to 0H (0)
W F000:FA6E        ;Write that many bytes to named file
Writing 00400 bytes;Debug tells you what it did
-N upper           ;Name a second output file
-D 0000:007C L 4   ;Get contents of INT 1F
0000:0070                                     34 30 00 C0
W C000:3034        ;Reverse order the bytes
Writing 00400 bytes
-Q                 ;Quit because you're done
C:\>
 */
/*****************************************************************************/
/// The BIOS font appearance (magnified):
//+--------+--------+--------+--------+--------+--------+--------+--------+
//|        | ****** | ****** | ** **  |   *    |  ***   |        |        |
//|        |*      *|********|******* |  ***   | *****  |   *    |        |
//|        |* *  * *|** ** **|******* | *****  |  ***   |  ***   |   **   |
//|        |*      *|********|******* |******* |******* | *****  |  ****  |
//|        |* **** *|**    **| *****  | *****  |******* |******* |  ****  |
//|        |*  **  *|***  ***|  ***   |  ***   |*  *  * | *****  |   **   |
//|        |*      *|********|   *    |   *    |   *    |  ***   |        |
//|        | ****** | ****** |        |        | *****  | *****  |        |
//+--------+--------+--------+--------+--------+--------+--------+--------+
//|********|        |********|    ****|  ****  |  ******| *******|*  **  *|
//|********|  ****  |**    **|     ***| **  ** |  **  **| **   **| * ** * |
//|***  ***| **  ** |*  **  *|    ****| **  ** |  ******| *******|  ****  |
//|**    **| *    * |* **** *| ***** *| **  ** |  **    | **   **|***  ***|
//|**    **| *    * |* **** *|**  **  |  ****  |  **    | **   **|***  ***|
//|***  ***| **  ** |*  **  *|**  **  |   **   | ***    | **  ***|  ****  |
//|********|  ****  |**    **|**  **  | ****** |****    |***  ** | * ** * |
//|********|        |********| ****   |   **   |***     |**      |*  **  *|
//+--------+--------+--------+--------+--------+--------+--------+--------+
//|*       |      * |   **   | **  ** | *******|  ***** |        |   **   |
//|***     |    *** |  ****  | **  ** |** ** **| **   **|        |  ****  |
//|*****   |  ***** | ****** | **  ** |** ** **|  ***   |        | ****** |
//|******* |******* |   **   | **  ** | **** **| ** **  |        |   **   |
//|*****   |  ***** |   **   | **  ** |   ** **| ** **  | ****** | ****** |
//|***     |    *** | ****** |        |   ** **|  ***   | ****** |  ****  |
//|*       |      * |  ****  | **  ** |   ** **|*    ** | ****** |   **   |
//|        |        |   **   |        |        |******  |        |********|
//+--------+--------+--------+--------+--------+--------+--------+--------+
//|   **   |   **   |        |        |        |        |        |        |
//|  ****  |   **   |   **   |  **    |        |  *  *  |   **   |********|
//| ****** |   **   |    **  | **     |**      | **  ** |  ****  |********|
//|   **   |   **   |******* |******* |**      |********| ****** | ****** |
//|   **   | ****** |    **  | **     |**      | **  ** |********|  ****  |
//|   **   |  ****  |   **   |  **    |******* |  *  *  |********|   **   |
//|   **   |   **   |        |        |        |        |        |        |
//|        |        |        |        |        |        |        |        |
//+--------+--------+--------+--------+--------+--------+--------+--------+
//|        |   **   | ** **  | ** **  |   **   |        |  ***   |  **    |
//|        |  ****  | ** **  | ** **  | ****** |**   ** | ** **  |  **    |
//|        |  ****  | ** **  |******* |**      |**  **  |  ***   | **     |
//|        |   **   |        | ** **  | *****  |   **   | *** ** |        |
//|        |   **   |        |******* |     ** |  **    |** ***  |        |
//|        |        |        | ** **  |******  | **  ** |**  **  |        |
//|        |   **   |        | ** **  |   **   |**   ** | *** ** |        |
//|        |        |        |        |        |        |        |        |
//+--------+--------+--------+--------+--------+--------+--------+--------+
//|   **   | **     |        |        |        |        |        |     ** |
//|  **    |  **    | **  ** |   **   |        |        |        |    **  |
//| **     |   **   |  ****  |   **   |        |        |        |   **   |
//| **     |   **   |********| ****** |        | ****** |        |  **    |
//| **     |   **   |  ****  |   **   |        |        |        | **     |
//|  **    |  **    | **  ** |   **   |   **   |        |   **   |**      |
//|   **   | **     |        |        |   **   |        |   **   |*       |
//|        |        |        |        |  **    |        |        |        |
//+--------+--------+--------+--------+--------+--------+--------+--------+
//| *****  |  **    | ****   | ****   |   ***  |******  |  ***   |******  |
//|**  *** | ***    |**  **  |**  **  |  ****  |**      | **     |**  **  |
//|** **** |  **    |    **  |    **  | ** **  |*****   |**      |    **  |
//|**** ** |  **    |  ***   |  ***   |**  **  |    **  |*****   |   **   |
//|***  ** |  **    | **     |    **  |******* |    **  |**  **  |  **    |
//|**   ** |  **    |**  **  |**  **  |    **  |**  **  |**  **  |  **    |
//| *****  |******  |******  | ****   |   **** | ****   | ****   |  **    |
//|        |        |        |        |        |        |        |        |
//+--------+--------+--------+--------+--------+--------+--------+--------+
//| ****   | ****   |        |        |   **   |        | **     |  ****  |
//|**  **  |**  **  |   **   |   **   |  **    |        |  **    | **  ** |
//|**  **  |**  **  |   **   |   **   | **     | ****** |   **   |    **  |
//| ****   | *****  |        |        |**      |        |    **  |   **   |
//|**  **  |    **  |        |        | **     | ****** |   **   |   **   |
//|**  **  |   **   |   **   |   **   |  **    |        |  **    |        |
//| ****   | ***    |   **   |   **   |   **   |        | **     |   **   |
//|        |        |        |  **    |        |        |        |        |
//+--------+--------+--------+--------+--------+--------+--------+--------+
//| *****  |  **    |******  |  ****  |*****   |******* |******* |  ****  |
//|**   ** | ****   | **  ** | **  ** | ** **  | **   * | **   * | **  ** |
//|** **** |**  **  | **  ** |**      | **  ** | ** *   | ** *   |**      |
//|** **** |**  **  | *****  |**      | **  ** | ****   | ****   |**      |
//|** ***  |******  | **  ** |**      | **  ** | ** *   | ** *   |**  *** |
//|**      |**  **  | **  ** | **  ** | ** **  | **   * | **     | **  ** |
//| *****  |**  **  |******  |  ****  |*****   |******* |****    |  *** * |
//|        |        |        |        |        |        |        |        |
//+--------+--------+--------+--------+--------+--------+--------+--------+
//|**  **  | ****   |   **** |***  ** |****    |**   ** |**   ** |  ***   |
//|**  **  |  **    |    **  | **  ** | **     |*** *** |***  ** | ** **  |
//|**  **  |  **    |    **  | ** **  | **     |******* |**** ** |**   ** |
//|******  |  **    |    **  | ****   | **     |******* |** **** |**   ** |
//|**  **  |  **    |**  **  | ** **  | **   * |** * ** |**  *** |**   ** |
//|**  **  |  **    |**  **  | **  ** | **  ** |**   ** |**   ** | ** **  |
//|**  **  | ****   | ****   |***  ** |******* |**   ** |**   ** |  ***   |
//|        |        |        |        |        |        |        |        |
//+--------+--------+--------+--------+--------+--------+--------+--------+
//|******  | *****  |******  | *****  |******  |**  **  |**  **  |**   ** |
//| **  ** |**   ** | **  ** |**   ** |* ** *  |**  **  |**  **  |**   ** |
//| **  ** |**   ** | **  ** |***     |  **    |**  **  |**  **  |**   ** |
//| *****  |**   ** | *****  | ****   |  **    |**  **  |**  **  |**   ** |
//| **     |** * ** | ** **  |    *** |  **    |**  **  |**  **  |** * ** |
//| **     | *****  | **  ** |**   ** |  **    |**  **  | ****   |******* |
//|****    |    *** |***  ** | *****  | ****   |******  |  **    | ** **  |
//|        |        |        |        |        |        |        |        |
//+--------+--------+--------+--------+--------+--------+--------+--------+
//|**   ** |**  **  |******* | ****   |**      | ****   |   *    |        |
//|**   ** |**  **  |**   ** | **     | **     |   **   |  ***   |        |
//| ** **  |**  **  |*   **  | **     |  **    |   **   | ** **  |        |
//|  ***   | ****   |   **   | **     |   **   |   **   |**   ** |        |
//| ** **  |  **    |  **  * | **     |    **  |   **   |        |        |
//|**   ** |  **    | **  ** | **     |     ** |   **   |        |        |
//|**   ** | ****   |******* | ****   |      * | ****   |        |        |
//|        |        |        |        |        |        |        |********|
//+--------+--------+--------+--------+--------+--------+--------+--------+
//|  **    |        |***     |        |   ***  |        |  ***   |        |
//|  **    |        | **     |        |    **  |        | ** **  |        |
//|   **   | ****   | **     | ****   |    **  | ****   | **  *  | *** ** |
//|        |    **  | *****  |**  **  | *****  |**  **  |****    |**  **  |
//|        | *****  | **  ** |**      |**  **  |******  | **     |**  **  |
//|        |**  **  | **  ** |**  **  |**  **  |**      | **     | *****  |
//|        | *** ** |** ***  | ****   | *** ** | ****   |****    |    **  |
//|        |        |        |        |        |        |        |*****   |
//+--------+--------+--------+--------+--------+--------+--------+--------+
//|***     |  **    |    **  |***     | ***    |        |        |        |
//| **     |        |        | **     |  **    |        |        |        |
//| ** **  | ***    |   ***  | **  ** |  **    |**  **  |* ***   | ****   |
//| *** ** |  **    |    **  | ** **  |  **    |******* |**  **  |**  **  |
//| **  ** |  **    |    **  | ****   |  **    |******* |**  **  |**  **  |
//| **  ** |  **    |**  **  | ** **  |  **    |** * ** |**  **  |**  **  |
//|***  ** | ****   |**  **  |***  ** | ****   |** * ** |**  **  | ****   |
//|        |        | ****   |        |        |        |        |        |
//+--------+--------+--------+--------+--------+--------+--------+--------+
//|        |        |        |        |   *    |        |        |        |
//|        |        |        |        |  **    |        |        |        |
//|** ***  | *** ** |** ***  | *****  |******  |**  **  |**  **  |**   ** |
//| **  ** |**  **  | *** ** |**      |  **    |**  **  |**  **  |**   ** |
//| **  ** |**  **  | **   * | ***    |  **    |**  **  |**  **  |** * ** |
//| *****  | *****  | **     |   ***  |  ** *  |**  **  | ****   |******* |
//| **     |    **  |****    |*****   |   **   | *** ** |  **    | ** **  |
//|****    |   **** |        |        |        |        |        |        |
//+--------+--------+--------+--------+--------+--------+--------+--------+
//|        |        |        |   ***  |   **   |***     | *** ** |        |
//|        |        |        |  **    |   **   |  **    |** ***  |   *    |
//|**   ** |**  **  |******  |  **    |   **   |  **    |        |  ***   |
//| ** **  |**  **  |*  **   |***     |        |   ***  |        | ** **  |
//|  ***   |**  **  |  **    |  **    |   **   |  **    |        |**   ** |
//| ** **  | *****  | **  *  |  **    |   **   |  **    |        |**   ** |
//|**   ** |    **  |******  |   ***  |   **   |***     |        |******* |
//|        |*****   |        |        |        |        |        |        |
//+--------+--------+--------+--------+--------+--------+--------+--------+
//| ****   |        |   ***  | ****** |**  **  |***     |  **    |        |
//|**  **  |**  **  |        |**    **|        |        |  **    |        |
//|**      |        | ****   |  ****  | ****   | ****   | ****   | ****   |
//|**  **  |**  **  |**  **  |     ** |    **  |    **  |    **  |**      |
//| ****   |**  **  |******  |  ***** | *****  | *****  | *****  |**      |
//|   **   |**  **  |**      | **  ** |**  **  |**  **  |**  **  | ****   |
//|    **  | ****** | ****   |  ******| ****** | ****** | ****** |    **  |
//| ****   |        |        |        |        |        |        |  ***   |
//+--------+--------+--------+--------+--------+--------+--------+--------+
//| ****** |**  **  |***     |**  **  | *****  |***     |**   ** |  **    |
//|**    **|        |        |        |**   ** |        |  ***   |  **    |
//|  ****  | ****   | ****   | ***    |  ***   | ***    | ** **  |        |
//| **  ** |**  **  |**  **  |  **    |   **   |  **    |**   ** | ****   |
//| ****** |******  |******  |  **    |   **   |  **    |******* |**  **  |
//| **     |**      |**      |  **    |   **   |  **    |**   ** |******  |
//|  ****  | ****   | ****   | ****   |  ****  | ****   |**   ** |**  **  |
//|        |        |        |        |        |        |        |        |
//+--------+--------+--------+--------+--------+--------+--------+--------+
//|   ***  |        |  ***** | ****   |        |        | ****   |        |
//|        |        | ** **  |**  **  |**  **  |***     |**  **  |***     |
//|******  | *******|**  **  |        |        |        |        |        |
//| **     |    **  |******* | ****   | ****   | ****   |**  **  |**  **  |
//| ****   | *******|**  **  |**  **  |**  **  |**  **  |**  **  |**  **  |
//| **     |**  **  |**  **  |**  **  |**  **  |**  **  |**  **  |**  **  |
//|******  | *******|**  *** | ****   | ****   | ****   | ****** | ****** |
//|        |        |        |        |        |        |        |        |
//+--------+--------+--------+--------+--------+--------+--------+--------+
//|        |**    **|**  **  |   **   |  ***   |**  **  |*****   |    *** |
//|**  **  |   **   |        |   **   | ** **  |**  **  |**  **  |   ** **|
//|        |  ****  |**  **  | ****** | **  *  | ****   |**  **  |   **   |
//|**  **  | **  ** |**  **  |**      |****    |******  |***** * |  ****  |
//|**  **  | **  ** |**  **  |**      | **     |  **    |**   ** |   **   |
//| *****  |  ****  |**  **  | ****** |***  ** |******  |**  ****|   **   |
//|    **  |   **   | ****   |   **   |******  |  **    |**   ** |** **   |
//|*****   |        |        |   **   |        |  **    |**   ***| ***    |
//+--------+--------+--------+--------+--------+--------+--------+--------+
//|   ***  |  ***   |        |        |        |******  |  ****  |  ***   |
//|        |        |   ***  |   ***  |*****   |        | ** **  | ** **  |
//| ****   | ***    |        |        |        |**  **  | ** **  | ** **  |
//|    **  |  **    | ****   |**  **  |*****   |*** **  |  ***** |  ***   |
//| *****  |  **    |**  **  |**  **  |**  **  |******  |        |        |
//|**  **  |  **    |**  **  |**  **  |**  **  |** ***  | ****** | *****  |
//| ****** | ****   | ****   | ****** |**  **  |**  **  |        |        |
//|        |        |        |        |        |        |        |        |
//+--------+--------+--------+--------+--------+--------+--------+--------+
//|  **    |        |        |**    **|**    **|   **   |        |        |
//|        |        |        |**   ** |**   ** |   **   |  **  **|**  **  |
//|  **    |        |        |**  **  |**  **  |        | **  ** | **  ** |
//| **     |******  |******  |** **** |** ** **|   **   |**  **  |  **  **|
//|**      |**      |    **  |  **  **|  ** ***|   **   | **  ** | **  ** |
//|**  **  |**      |    **  | **  ** | ** ****|   **   |  **  **|**  **  |
//| ****   |        |        |**  **  |**  ****|   **   |        |        |
//|        |        |        |    ****|      **|        |        |        |
//+--------+--------+--------+--------+--------+--------+--------+--------+
//|  *   * | * * * *|** ** **|   **   |   **   |   **   |  ** ** |        |
//|*   *   |* * * * | *** ***|   **   |   **   |   **   |  ** ** |        |
//|  *   * | * * * *|** ** **|   **   |   **   |*****   |  ** ** |        |
//|*   *   |* * * * |*** *** |   **   |   **   |   **   |  ** ** |        |
//|  *   * | * * * *|** ** **|   **   |*****   |*****   |**** ** |******* |
//|*   *   |* * * * | *** ***|   **   |   **   |   **   |  ** ** |  ** ** |
//|  *   * | * * * *|** ** **|   **   |   **   |   **   |  ** ** |  ** ** |
//|*   *   |* * * * |*** *** |   **   |   **   |   **   |  ** ** |  ** ** |
//+--------+--------+--------+--------+--------+--------+--------+--------+
//|        |  ** ** |  ** ** |        |  ** ** |  ** ** |   **   |        |
//|        |  ** ** |  ** ** |        |  ** ** |  ** ** |   **   |        |
//|*****   |**** ** |  ** ** |******* |**** ** |  ** ** |*****   |        |
//|   **   |     ** |  ** ** |     ** |     ** |  ** ** |   **   |        |
//|*****   |**** ** |  ** ** |**** ** |******* |******* |*****   |*****   |
//|   **   |  ** ** |  ** ** |  ** ** |        |        |        |   **   |
//|   **   |  ** ** |  ** ** |  ** ** |        |        |        |   **   |
//|   **   |  ** ** |  ** ** |  ** ** |        |        |        |   **   |
//+--------+--------+--------+--------+--------+--------+--------+--------+
//|   **   |   **   |        |   **   |        |   **   |   **   |  ** ** |
//|   **   |   **   |        |   **   |        |   **   |   **   |  ** ** |
//|   **   |   **   |        |   **   |        |   **   |   *****|  ** ** |
//|   **   |   **   |        |   **   |        |   **   |   **   |  ** ** |
//|   *****|********|********|   *****|********|********|   *****|  ** ***|
//|        |        |   **   |   **   |        |   **   |   **   |  ** ** |
//|        |        |   **   |   **   |        |   **   |   **   |  ** ** |
//|        |        |   **   |   **   |        |   **   |   **   |  ** ** |
//+--------+--------+--------+--------+--------+--------+--------+--------+
//|  ** ** |        |  ** ** |        |  ** ** |        |  ** ** |   **   |
//|  ** ** |        |  ** ** |        |  ** ** |        |  ** ** |   **   |
//|  ** ***|  ******|**** ***|********|  ** ***|********|**** ***|********|
//|  **    |  **    |        |        |  **    |        |        |        |
//|  ******|  ** ***|********|**** ***|  ** ***|********|**** ***|********|
//|        |  ** ** |        |  ** ** |  ** ** |        |  ** ** |        |
//|        |  ** ** |        |  ** ** |  ** ** |        |  ** ** |        |
//|        |  ** ** |        |  ** ** |  ** ** |        |  ** ** |        |
//+--------+--------+--------+--------+--------+--------+--------+--------+
//|  ** ** |        |        |  ** ** |   **   |        |        |  ** ** |
//|  ** ** |        |        |  ** ** |   **   |        |        |  ** ** |
//|  ** ** |********|        |  ** ** |   *****|   *****|        |  ** ** |
//|  ** ** |        |        |  ** ** |   **   |   **   |        |  ** ** |
//|********|********|********|  ******|   *****|   *****|  ******|********|
//|        |   **   |  ** ** |        |        |   **   |  ** ** |  ** ** |
//|        |   **   |  ** ** |        |        |   **   |  ** ** |  ** ** |
//|        |   **   |  ** ** |        |        |   **   |  ** ** |  ** ** |
//+--------+--------+--------+--------+--------+--------+--------+--------+
//|   **   |   **   |        |********|        |****    |    ****|********|
//|   **   |   **   |        |********|        |****    |    ****|********|
//|********|   **   |        |********|        |****    |    ****|********|
//|   **   |   **   |        |********|        |****    |    ****|********|
//|********|*****   |   *****|********|********|****    |    ****|        |
//|   **   |        |   **   |********|********|****    |    ****|        |
//|   **   |        |   **   |********|********|****    |    ****|        |
//|   **   |        |   **   |********|********|****    |    ****|        |
//+--------+--------+--------+--------+--------+--------+--------+--------+
//|        |        |        |        |******  |        |        |        |
//|        | ****   |******  |******* |**  **  |        | **  ** | *** ** |
//| *** ** |**  **  |**  **  | ** **  | **     | ****** | **  ** |** ***  |
//|** ***  |*****   |**      | ** **  |  **    |** **   | **  ** |   **   |
//|**  *   |**  **  |**      | ** **  | **     |** **   | **  ** |   **   |
//|** ***  |*****   |**      | ** **  |**  **  |** **   | *****  |   **   |
//| *** ** |**      |**      | ** **  |******  | ***    | **     |   **   |
//|        |**      |        |        |        |        |**      |        |
//+--------+--------+--------+--------+--------+--------+--------+--------+
//|******  |  ***   |  ***   |   ***  |        |     ** |  ***   | ****   |
//|  **    | ** **  | ** **  |  **    |        |    **  | **     |**  **  |
//| ****   |**   ** |**   ** |   **   | ****** | ****** |**      |**  **  |
//|**  **  |******* |**   ** | *****  |** ** **|** ** **|*****   |**  **  |
//|**  **  |**   ** | ** **  |**  **  |** ** **|** ** **|**      |**  **  |
//| ****   | ** **  | ** **  |**  **  | ****** | ****** | **     |**  **  |
//|  **    |  ***   |*** *** | ****   |        | **     |  ***   |**  **  |
//|******  |        |        |        |        |**      |        |        |
//+--------+--------+--------+--------+--------+--------+--------+--------+
//|        |  **    | **     |   **   |    *** |   **   |  **    |        |
//|******  |  **    |  **    |  **    |   ** **|   **   |  **    | *** ** |
//|        |******  |   **   | **     |   ** **|   **   |        |** ***  |
//|******  |  **    |  **    |  **    |   **   |   **   |******  |        |
//|        |  **    | **     |   **   |   **   |   **   |        | *** ** |
//|******  |        |        |        |   **   |** **   |  **    |** ***  |
//|        |******  |******  |******  |   **   |** **   |  **    |        |
//|        |        |        |        |   **   | ***    |        |        |
//+--------+--------+--------+--------+--------+--------+--------+--------+
//|  ***   |        |        |    ****| ****   | ***    |        |        |
//| ** **  |        |        |    **  | ** **  |   **   |        |        |
//| ** **  |        |        |    **  | ** **  |  **    |  ****  |        |
//|  ***   |   **   |        |    **  | ** **  | **     |  ****  |        |
//|        |   **   |   **   |*** **  | ** **  | ****   |  ****  |        |
//|        |        |        | ** **  |        |        |  ****  |        |
//|        |        |        |  ****  |        |        |        |        |
//|        |        |        |   ***  |        |        |        |        |
//+--------+--------+--------+--------+--------+--------+--------+--------+
/*****************************************************************************/
#ifndef BIOSFONT_H
#define BIOSFONT_H
/*****************************************************************************/
#ifdef  BIOSFONT_UNIT_TEST
#define BIOSFONT_STATIC
#endif//BIOSFONT_UNIT_TEST
/*****************************************************************************/
#ifdef  __cplusplus
namespace BIOSfont {
#endif//__cplusplus
#ifdef  BIOSFONT_STATIC
  static const unsigned char bytes[ 256 ][ 8 ] = {
   {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} ///< character 0x00 |  ^@|
  ,{0x7e,0x81,0xa5,0x81,0xbd,0x99,0x81,0x7e} ///< character 0x01 |  ^A|
  ,{0x7e,0xff,0xdb,0xff,0xc3,0xe7,0xff,0x7e} ///< character 0x02 |  ^B|
  ,{0x36,0x7f,0x7f,0x7f,0x3e,0x1c,0x08,0x00} ///< character 0x03 |  ^C|
  ,{0x08,0x1c,0x3e,0x7f,0x3e,0x1c,0x08,0x00} ///< character 0x04 |  ^D|
  ,{0x1c,0x3e,0x1c,0x7f,0x7f,0x49,0x08,0x3e} ///< character 0x05 |  ^E|
  ,{0x00,0x08,0x1c,0x3e,0x7f,0x3e,0x1c,0x3e} ///< character 0x06 |  ^F|
  ,{0x00,0x00,0x18,0x3c,0x3c,0x18,0x00,0x00} ///< character 0x07 |  ^G|
  ,{0xff,0xff,0xe7,0xc3,0xc3,0xe7,0xff,0xff} ///< character 0x08 |  ^H|
  ,{0x00,0x3c,0x66,0x42,0x42,0x66,0x3c,0x00} ///< character 0x09 |  ^I|
  ,{0xff,0xc3,0x99,0xbd,0xbd,0x99,0xc3,0xff} ///< character 0x0a |  ^J|
  ,{0xf0,0xe0,0xf0,0xbe,0x33,0x33,0x33,0x1e} ///< character 0x0b |  ^K|
  ,{0x3c,0x66,0x66,0x66,0x3c,0x18,0x7e,0x18} ///< character 0x0c |  ^L|
  ,{0xfc,0xcc,0xfc,0x0c,0x0c,0x0e,0x0f,0x07} ///< character 0x0d |  ^M|
  ,{0xfe,0xc6,0xfe,0xc6,0xc6,0xe6,0x67,0x03} ///< character 0x0e |  ^N|
  ,{0x99,0x5a,0x3c,0xe7,0xe7,0x3c,0x5a,0x99} ///< character 0x0f |  ^O|
  ,{0x01,0x07,0x1f,0x7f,0x1f,0x07,0x01,0x00} ///< character 0x10 |  ^P|
  ,{0x40,0x70,0x7c,0x7f,0x7c,0x70,0x40,0x00} ///< character 0x11 |  ^Q|
  ,{0x18,0x3c,0x7e,0x18,0x18,0x7e,0x3c,0x18} ///< character 0x12 |  ^R|
  ,{0x66,0x66,0x66,0x66,0x66,0x00,0x66,0x00} ///< character 0x13 |  ^S|
  ,{0xfe,0xdb,0xdb,0xde,0xd8,0xd8,0xd8,0x00} ///< character 0x14 |  ^T|
  ,{0x7c,0xc6,0x1c,0x36,0x36,0x1c,0x61,0x3f} ///< character 0x15 |  ^U|
  ,{0x00,0x00,0x00,0x00,0x7e,0x7e,0x7e,0x00} ///< character 0x16 |  ^V|
  ,{0x18,0x3c,0x7e,0x18,0x7e,0x3c,0x18,0xff} ///< character 0x17 |  ^W|
  ,{0x18,0x3c,0x7e,0x18,0x18,0x18,0x18,0x00} ///< character 0x18 |  ^X|
  ,{0x18,0x18,0x18,0x18,0x7e,0x3c,0x18,0x00} ///< character 0x19 |  ^Y|
  ,{0x00,0x18,0x30,0x7f,0x30,0x18,0x00,0x00} ///< character 0x1a |  ^Z|
  ,{0x00,0x0c,0x06,0x7f,0x06,0x0c,0x00,0x00} ///< character 0x1b |  ^[|
  ,{0x00,0x00,0x03,0x03,0x03,0x7f,0x00,0x00} ///< character 0x1c |  ^\|
  ,{0x00,0x24,0x66,0xff,0x66,0x24,0x00,0x00} ///< character 0x1d |  ^]|
  ,{0x00,0x18,0x3c,0x7e,0xff,0xff,0x00,0x00} ///< character 0x1e |  ^^|
  ,{0x00,0xff,0xff,0x7e,0x3c,0x18,0x00,0x00} ///< character 0x1f |  ^_|
  ,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} ///< character 0x20 |    |
  ,{0x18,0x3c,0x3c,0x18,0x18,0x00,0x18,0x00} ///< character 0x21 |   !|
  ,{0x36,0x36,0x36,0x00,0x00,0x00,0x00,0x00} ///< character 0x22 |   "|
  ,{0x36,0x36,0x7f,0x36,0x7f,0x36,0x36,0x00} ///< character 0x23 |   #|
  ,{0x18,0x7e,0x03,0x3e,0x60,0x3f,0x18,0x00} ///< character 0x24 |   $|
  ,{0x00,0x63,0x33,0x18,0x0c,0x66,0x63,0x00} ///< character 0x25 |   %|
  ,{0x1c,0x36,0x1c,0x6e,0x3b,0x33,0x6e,0x00} ///< character 0x26 |   &|
  ,{0x0c,0x0c,0x06,0x00,0x00,0x00,0x00,0x00} ///< character 0x27 |   '|
  ,{0x18,0x0c,0x06,0x06,0x06,0x0c,0x18,0x00} ///< character 0x28 |   (|
  ,{0x06,0x0c,0x18,0x18,0x18,0x0c,0x06,0x00} ///< character 0x29 |   )|
  ,{0x00,0x66,0x3c,0xff,0x3c,0x66,0x00,0x00} ///< character 0x2a |   *|
  ,{0x00,0x18,0x18,0x7e,0x18,0x18,0x00,0x00} ///< character 0x2b |   +|
  ,{0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x0c} ///< character 0x2c |   ,|
  ,{0x00,0x00,0x00,0x7e,0x00,0x00,0x00,0x00} ///< character 0x2d |   -|
  ,{0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00} ///< character 0x2e |   .|
  ,{0x60,0x30,0x18,0x0c,0x06,0x03,0x01,0x00} ///< character 0x2f |   /|
  ,{0x3e,0x73,0x7b,0x6f,0x67,0x63,0x3e,0x00} ///< character 0x30 |   0|
  ,{0x0c,0x0e,0x0c,0x0c,0x0c,0x0c,0x3f,0x00} ///< character 0x31 |   1|
  ,{0x1e,0x33,0x30,0x1c,0x06,0x33,0x3f,0x00} ///< character 0x32 |   2|
  ,{0x1e,0x33,0x30,0x1c,0x30,0x33,0x1e,0x00} ///< character 0x33 |   3|
  ,{0x38,0x3c,0x36,0x33,0x7f,0x30,0x78,0x00} ///< character 0x34 |   4|
  ,{0x3f,0x03,0x1f,0x30,0x30,0x33,0x1e,0x00} ///< character 0x35 |   5|
  ,{0x1c,0x06,0x03,0x1f,0x33,0x33,0x1e,0x00} ///< character 0x36 |   6|
  ,{0x3f,0x33,0x30,0x18,0x0c,0x0c,0x0c,0x00} ///< character 0x37 |   7|
  ,{0x1e,0x33,0x33,0x1e,0x33,0x33,0x1e,0x00} ///< character 0x38 |   8|
  ,{0x1e,0x33,0x33,0x3e,0x30,0x18,0x0e,0x00} ///< character 0x39 |   9|
  ,{0x00,0x18,0x18,0x00,0x00,0x18,0x18,0x00} ///< character 0x3a |   :|
  ,{0x00,0x18,0x18,0x00,0x00,0x18,0x18,0x0c} ///< character 0x3b |   ;|
  ,{0x18,0x0c,0x06,0x03,0x06,0x0c,0x18,0x00} ///< character 0x3c |   <|
  ,{0x00,0x00,0x7e,0x00,0x7e,0x00,0x00,0x00} ///< character 0x3d |   =|
  ,{0x06,0x0c,0x18,0x30,0x18,0x0c,0x06,0x00} ///< character 0x3e |   >|
  ,{0x3c,0x66,0x30,0x18,0x18,0x00,0x18,0x00} ///< character 0x3f |   ?|
  ,{0x3e,0x63,0x7b,0x7b,0x3b,0x03,0x3e,0x00} ///< character 0x40 |   @|
  ,{0x0c,0x1e,0x33,0x33,0x3f,0x33,0x33,0x00} ///< character 0x41 |   A|
  ,{0x3f,0x66,0x66,0x3e,0x66,0x66,0x3f,0x00} ///< character 0x42 |   B|
  ,{0x3c,0x66,0x03,0x03,0x03,0x66,0x3c,0x00} ///< character 0x43 |   C|
  ,{0x1f,0x36,0x66,0x66,0x66,0x36,0x1f,0x00} ///< character 0x44 |   D|
  ,{0x7f,0x46,0x16,0x1e,0x16,0x46,0x7f,0x00} ///< character 0x45 |   E|
  ,{0x7f,0x46,0x16,0x1e,0x16,0x06,0x0f,0x00} ///< character 0x46 |   F|
  ,{0x3c,0x66,0x03,0x03,0x73,0x66,0x5c,0x00} ///< character 0x47 |   G|
  ,{0x33,0x33,0x33,0x3f,0x33,0x33,0x33,0x00} ///< character 0x48 |   H|
  ,{0x1e,0x0c,0x0c,0x0c,0x0c,0x0c,0x1e,0x00} ///< character 0x49 |   I|
  ,{0x78,0x30,0x30,0x30,0x33,0x33,0x1e,0x00} ///< character 0x4a |   J|
  ,{0x67,0x66,0x36,0x1e,0x36,0x66,0x67,0x00} ///< character 0x4b |   K|
  ,{0x0f,0x06,0x06,0x06,0x46,0x66,0x7f,0x00} ///< character 0x4c |   L|
  ,{0x63,0x77,0x7f,0x7f,0x6b,0x63,0x63,0x00} ///< character 0x4d |   M|
  ,{0x63,0x67,0x6f,0x7b,0x73,0x63,0x63,0x00} ///< character 0x4e |   N|
  ,{0x1c,0x36,0x63,0x63,0x63,0x36,0x1c,0x00} ///< character 0x4f |   O|
  ,{0x3f,0x66,0x66,0x3e,0x06,0x06,0x0f,0x00} ///< character 0x50 |   P|
  ,{0x3e,0x63,0x63,0x63,0x6b,0x3e,0x70,0x00} ///< character 0x51 |   Q|
  ,{0x3f,0x66,0x66,0x3e,0x36,0x66,0x67,0x00} ///< character 0x52 |   R|
  ,{0x3e,0x63,0x07,0x1e,0x70,0x63,0x3e,0x00} ///< character 0x53 |   S|
  ,{0x3f,0x2d,0x0c,0x0c,0x0c,0x0c,0x1e,0x00} ///< character 0x54 |   T|
  ,{0x33,0x33,0x33,0x33,0x33,0x33,0x3f,0x00} ///< character 0x55 |   U|
  ,{0x33,0x33,0x33,0x33,0x33,0x1e,0x0c,0x00} ///< character 0x56 |   V|
  ,{0x63,0x63,0x63,0x63,0x6b,0x7f,0x36,0x00} ///< character 0x57 |   W|
  ,{0x63,0x63,0x36,0x1c,0x36,0x63,0x63,0x00} ///< character 0x58 |   X|
  ,{0x33,0x33,0x33,0x1e,0x0c,0x0c,0x1e,0x00} ///< character 0x59 |   Y|
  ,{0x7f,0x63,0x31,0x18,0x4c,0x66,0x7f,0x00} ///< character 0x5a |   Z|
  ,{0x1e,0x06,0x06,0x06,0x06,0x06,0x1e,0x00} ///< character 0x5b |   [|
  ,{0x03,0x06,0x0c,0x18,0x30,0x60,0x40,0x00} ///< character 0x5c |   \|
  ,{0x1e,0x18,0x18,0x18,0x18,0x18,0x1e,0x00} ///< character 0x5d |   ]|
  ,{0x08,0x1c,0x36,0x63,0x00,0x00,0x00,0x00} ///< character 0x5e |   ^|
  ,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff} ///< character 0x5f |   _|
  ,{0x0c,0x0c,0x18,0x00,0x00,0x00,0x00,0x00} ///< character 0x60 |   `|
  ,{0x00,0x00,0x1e,0x30,0x3e,0x33,0x6e,0x00} ///< character 0x61 |   a|
  ,{0x07,0x06,0x06,0x3e,0x66,0x66,0x3b,0x00} ///< character 0x62 |   b|
  ,{0x00,0x00,0x1e,0x33,0x03,0x33,0x1e,0x00} ///< character 0x63 |   c|
  ,{0x38,0x30,0x30,0x3e,0x33,0x33,0x6e,0x00} ///< character 0x64 |   d|
  ,{0x00,0x00,0x1e,0x33,0x3f,0x03,0x1e,0x00} ///< character 0x65 |   e|
  ,{0x1c,0x36,0x26,0x0f,0x06,0x06,0x0f,0x00} ///< character 0x66 |   f|
  ,{0x00,0x00,0x6e,0x33,0x33,0x3e,0x30,0x1f} ///< character 0x67 |   g|
  ,{0x07,0x06,0x36,0x6e,0x66,0x66,0x67,0x00} ///< character 0x68 |   h|
  ,{0x0c,0x00,0x0e,0x0c,0x0c,0x0c,0x1e,0x00} ///< character 0x69 |   i|
  ,{0x30,0x00,0x38,0x30,0x30,0x33,0x33,0x1e} ///< character 0x6a |   j|
  ,{0x07,0x06,0x66,0x36,0x1e,0x36,0x67,0x00} ///< character 0x6b |   k|
  ,{0x0e,0x0c,0x0c,0x0c,0x0c,0x0c,0x1e,0x00} ///< character 0x6c |   l|
  ,{0x00,0x00,0x33,0x7f,0x7f,0x6b,0x6b,0x00} ///< character 0x6d |   m|
  ,{0x00,0x00,0x1d,0x33,0x33,0x33,0x33,0x00} ///< character 0x6e |   n|
  ,{0x00,0x00,0x1e,0x33,0x33,0x33,0x1e,0x00} ///< character 0x6f |   o|
  ,{0x00,0x00,0x3b,0x66,0x66,0x3e,0x06,0x0f} ///< character 0x70 |   p|
  ,{0x00,0x00,0x6e,0x33,0x33,0x3e,0x30,0x78} ///< character 0x71 |   q|
  ,{0x00,0x00,0x3b,0x6e,0x46,0x06,0x0f,0x00} ///< character 0x72 |   r|
  ,{0x00,0x00,0x3e,0x03,0x0e,0x38,0x1f,0x00} ///< character 0x73 |   s|
  ,{0x08,0x0c,0x3f,0x0c,0x0c,0x2c,0x18,0x00} ///< character 0x74 |   t|
  ,{0x00,0x00,0x33,0x33,0x33,0x33,0x6e,0x00} ///< character 0x75 |   u|
  ,{0x00,0x00,0x33,0x33,0x33,0x1e,0x0c,0x00} ///< character 0x76 |   v|
  ,{0x00,0x00,0x63,0x63,0x6b,0x7f,0x36,0x00} ///< character 0x77 |   w|
  ,{0x00,0x00,0x63,0x36,0x1c,0x36,0x63,0x00} ///< character 0x78 |   x|
  ,{0x00,0x00,0x33,0x33,0x33,0x3e,0x30,0x1f} ///< character 0x79 |   y|
  ,{0x00,0x00,0x3f,0x19,0x0c,0x26,0x3f,0x00} ///< character 0x7a |   z|
  ,{0x38,0x0c,0x0c,0x07,0x0c,0x0c,0x38,0x00} ///< character 0x7b |   {|
  ,{0x18,0x18,0x18,0x00,0x18,0x18,0x18,0x00} ///< character 0x7c |   ||
  ,{0x07,0x0c,0x0c,0x38,0x0c,0x0c,0x07,0x00} ///< character 0x7d |   }|
  ,{0x6e,0x3b,0x00,0x00,0x00,0x00,0x00,0x00} ///< character 0x7e |   ~|
  ,{0x00,0x08,0x1c,0x36,0x63,0x63,0x7f,0x00} ///< character 0x7f |    |
  ,{0x1e,0x33,0x03,0x33,0x1e,0x18,0x30,0x1e} ///< character 0x80 |^M-@|
  ,{0x00,0x33,0x00,0x33,0x33,0x33,0x7e,0x00} ///< character 0x81 |^M-A|
  ,{0x38,0x00,0x1e,0x33,0x3f,0x03,0x1e,0x00} ///< character 0x82 |^M-B|
  ,{0x7e,0xc3,0x3c,0x60,0x7c,0x66,0xfc,0x00} ///< character 0x83 |^M-C|
  ,{0x33,0x00,0x1e,0x30,0x3e,0x33,0x7e,0x00} ///< character 0x84 |^M-D|
  ,{0x07,0x00,0x1e,0x30,0x3e,0x33,0x7e,0x00} ///< character 0x85 |^M-E|
  ,{0x0c,0x0c,0x1e,0x30,0x3e,0x33,0x7e,0x00} ///< character 0x86 |^M-F|
  ,{0x00,0x00,0x1e,0x03,0x03,0x1e,0x30,0x1c} ///< character 0x87 |^M-G|
  ,{0x7e,0xc3,0x3c,0x66,0x7e,0x06,0x3c,0x00} ///< character 0x88 |^M-H|
  ,{0x33,0x00,0x1e,0x33,0x3f,0x03,0x1e,0x00} ///< character 0x89 |^M-I|
  ,{0x07,0x00,0x1e,0x33,0x3f,0x03,0x1e,0x00} ///< character 0x8a |^M-J|
  ,{0x33,0x00,0x0e,0x0c,0x0c,0x0c,0x1e,0x00} ///< character 0x8b |^M-K|
  ,{0x3e,0x63,0x1c,0x18,0x18,0x18,0x3c,0x00} ///< character 0x8c |^M-L|
  ,{0x07,0x00,0x0e,0x0c,0x0c,0x0c,0x1e,0x00} ///< character 0x8d |^M-M|
  ,{0x63,0x1c,0x36,0x63,0x7f,0x63,0x63,0x00} ///< character 0x8e |^M-N|
  ,{0x0c,0x0c,0x00,0x1e,0x33,0x3f,0x33,0x00} ///< character 0x8f |^M-O|
  ,{0x38,0x00,0x3f,0x06,0x1e,0x06,0x3f,0x00} ///< character 0x90 |^M-P|
  ,{0x00,0x00,0xfe,0x30,0xfe,0x33,0xfe,0x00} ///< character 0x91 |^M-Q|
  ,{0x7c,0x36,0x33,0x7f,0x33,0x33,0x73,0x00} ///< character 0x92 |^M-R|
  ,{0x1e,0x33,0x00,0x1e,0x33,0x33,0x1e,0x00} ///< character 0x93 |^M-S|
  ,{0x00,0x33,0x00,0x1e,0x33,0x33,0x1e,0x00} ///< character 0x94 |^M-T|
  ,{0x00,0x07,0x00,0x1e,0x33,0x33,0x1e,0x00} ///< character 0x95 |^M-U|
  ,{0x1e,0x33,0x00,0x33,0x33,0x33,0x7e,0x00} ///< character 0x96 |^M-V|
  ,{0x00,0x07,0x00,0x33,0x33,0x33,0x7e,0x00} ///< character 0x97 |^M-W|
  ,{0x00,0x33,0x00,0x33,0x33,0x3e,0x30,0x1f} ///< character 0x98 |^M-X|
  ,{0xc3,0x18,0x3c,0x66,0x66,0x3c,0x18,0x00} ///< character 0x99 |^M-Y|
  ,{0x33,0x00,0x33,0x33,0x33,0x33,0x1e,0x00} ///< character 0x9a |^M-Z|
  ,{0x18,0x18,0x7e,0x03,0x03,0x7e,0x18,0x18} ///< character 0x9b |^M-[|
  ,{0x1c,0x36,0x26,0x0f,0x06,0x67,0x3f,0x00} ///< character 0x9c |^M-\|
  ,{0x33,0x33,0x1e,0x3f,0x0c,0x3f,0x0c,0x0c} ///< character 0x9d |^M-]|
  ,{0x1f,0x33,0x33,0x5f,0x63,0xf3,0x63,0xe3} ///< character 0x9e |^M-^|
  ,{0x70,0xd8,0x18,0x3c,0x18,0x18,0x1b,0x0e} ///< character 0x9f |^M-_|
  ,{0x38,0x00,0x1e,0x30,0x3e,0x33,0x7e,0x00} ///< character 0xa0 | M- |
  ,{0x1c,0x00,0x0e,0x0c,0x0c,0x0c,0x1e,0x00} ///< character 0xa1 | M-!|
  ,{0x00,0x38,0x00,0x1e,0x33,0x33,0x1e,0x00} ///< character 0xa2 | M-"|
  ,{0x00,0x38,0x00,0x33,0x33,0x33,0x7e,0x00} ///< character 0xa3 | M-#|
  ,{0x00,0x1f,0x00,0x1f,0x33,0x33,0x33,0x00} ///< character 0xa4 | M-$|
  ,{0x3f,0x00,0x33,0x37,0x3f,0x3b,0x33,0x00} ///< character 0xa5 | M-%|
  ,{0x3c,0x36,0x36,0x7c,0x00,0x7e,0x00,0x00} ///< character 0xa6 | M-&|
  ,{0x1c,0x36,0x36,0x1c,0x00,0x3e,0x00,0x00} ///< character 0xa7 | M-'|
  ,{0x0c,0x00,0x0c,0x06,0x03,0x33,0x1e,0x00} ///< character 0xa8 | M-(|
  ,{0x00,0x00,0x00,0x3f,0x03,0x03,0x00,0x00} ///< character 0xa9 | M-)|
  ,{0x00,0x00,0x00,0x3f,0x30,0x30,0x00,0x00} ///< character 0xaa | M-*|
  ,{0xc3,0x63,0x33,0x7b,0xcc,0x66,0x33,0xf0} ///< character 0xab | M-+|
  ,{0xc3,0x63,0x33,0xdb,0xec,0xf6,0xf3,0xc0} ///< character 0xac | M-,|
  ,{0x18,0x18,0x00,0x18,0x18,0x18,0x18,0x00} ///< character 0xad | M--|
  ,{0x00,0xcc,0x66,0x33,0x66,0xcc,0x00,0x00} ///< character 0xae | M-.|
  ,{0x00,0x33,0x66,0xcc,0x66,0x33,0x00,0x00} ///< character 0xaf | M-/|
  ,{0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11} ///< character 0xb0 | M-0|
  ,{0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55} ///< character 0xb1 | M-1|
  ,{0xdb,0xee,0xdb,0x77,0xdb,0xee,0xdb,0x77} ///< character 0xb2 | M-2|
  ,{0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18} ///< character 0xb3 | M-3|
  ,{0x18,0x18,0x18,0x18,0x1f,0x18,0x18,0x18} ///< character 0xb4 | M-4|
  ,{0x18,0x18,0x1f,0x18,0x1f,0x18,0x18,0x18} ///< character 0xb5 | M-5|
  ,{0x6c,0x6c,0x6c,0x6c,0x6f,0x6c,0x6c,0x6c} ///< character 0xb6 | M-6|
  ,{0x00,0x00,0x00,0x00,0x7f,0x6c,0x6c,0x6c} ///< character 0xb7 | M-7|
  ,{0x00,0x00,0x1f,0x18,0x1f,0x18,0x18,0x18} ///< character 0xb8 | M-8|
  ,{0x6c,0x6c,0x6f,0x60,0x6f,0x6c,0x6c,0x6c} ///< character 0xb9 | M-9|
  ,{0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c} ///< character 0xba | M-:|
  ,{0x00,0x00,0x7f,0x60,0x6f,0x6c,0x6c,0x6c} ///< character 0xbb | M-;|
  ,{0x6c,0x6c,0x6f,0x60,0x7f,0x00,0x00,0x00} ///< character 0xbc | M-<|
  ,{0x6c,0x6c,0x6c,0x6c,0x7f,0x00,0x00,0x00} ///< character 0xbd | M-=|
  ,{0x18,0x18,0x1f,0x18,0x1f,0x00,0x00,0x00} ///< character 0xbe | M->|
  ,{0x00,0x00,0x00,0x00,0x1f,0x18,0x18,0x18} ///< character 0xbf | M-?|
  ,{0x18,0x18,0x18,0x18,0xf8,0x00,0x00,0x00} ///< character 0xc0 | M-@|
  ,{0x18,0x18,0x18,0x18,0xff,0x00,0x00,0x00} ///< character 0xc1 | M-A|
  ,{0x00,0x00,0x00,0x00,0xff,0x18,0x18,0x18} ///< character 0xc2 | M-B|
  ,{0x18,0x18,0x18,0x18,0xf8,0x18,0x18,0x18} ///< character 0xc3 | M-C|
  ,{0x00,0x00,0x00,0x00,0xff,0x00,0x00,0x00} ///< character 0xc4 | M-D|
  ,{0x18,0x18,0x18,0x18,0xff,0x18,0x18,0x18} ///< character 0xc5 | M-E|
  ,{0x18,0x18,0xf8,0x18,0xf8,0x18,0x18,0x18} ///< character 0xc6 | M-F|
  ,{0x6c,0x6c,0x6c,0x6c,0xec,0x6c,0x6c,0x6c} ///< character 0xc7 | M-G|
  ,{0x6c,0x6c,0xec,0x0c,0xfc,0x00,0x00,0x00} ///< character 0xc8 | M-H|
  ,{0x00,0x00,0xfc,0x0c,0xec,0x6c,0x6c,0x6c} ///< character 0xc9 | M-I|
  ,{0x6c,0x6c,0xef,0x00,0xff,0x00,0x00,0x00} ///< character 0xca | M-J|
  ,{0x00,0x00,0xff,0x00,0xef,0x6c,0x6c,0x6c} ///< character 0xcb | M-K|
  ,{0x6c,0x6c,0xec,0x0c,0xec,0x6c,0x6c,0x6c} ///< character 0xcc | M-L|
  ,{0x00,0x00,0xff,0x00,0xff,0x00,0x00,0x00} ///< character 0xcd | M-M|
  ,{0x6c,0x6c,0xef,0x00,0xef,0x6c,0x6c,0x6c} ///< character 0xce | M-N|
  ,{0x18,0x18,0xff,0x00,0xff,0x00,0x00,0x00} ///< character 0xcf | M-O|
  ,{0x6c,0x6c,0x6c,0x6c,0xff,0x00,0x00,0x00} ///< character 0xd0 | M-P|
  ,{0x00,0x00,0xff,0x00,0xff,0x18,0x18,0x18} ///< character 0xd1 | M-Q|
  ,{0x00,0x00,0x00,0x00,0xff,0x6c,0x6c,0x6c} ///< character 0xd2 | M-R|
  ,{0x6c,0x6c,0x6c,0x6c,0xfc,0x00,0x00,0x00} ///< character 0xd3 | M-S|
  ,{0x18,0x18,0xf8,0x18,0xf8,0x00,0x00,0x00} ///< character 0xd4 | M-T|
  ,{0x00,0x00,0xf8,0x18,0xf8,0x18,0x18,0x18} ///< character 0xd5 | M-U|
  ,{0x00,0x00,0x00,0x00,0xfc,0x6c,0x6c,0x6c} ///< character 0xd6 | M-V|
  ,{0x6c,0x6c,0x6c,0x6c,0xff,0x6c,0x6c,0x6c} ///< character 0xd7 | M-W|
  ,{0x18,0x18,0xff,0x18,0xff,0x18,0x18,0x18} ///< character 0xd8 | M-X|
  ,{0x18,0x18,0x18,0x18,0x1f,0x00,0x00,0x00} ///< character 0xd9 | M-Y|
  ,{0x00,0x00,0x00,0x00,0xf8,0x18,0x18,0x18} ///< character 0xda | M-Z|
  ,{0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff} ///< character 0xdb | M-[|
  ,{0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff} ///< character 0xdc | M-\|
  ,{0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f} ///< character 0xdd | M-]|
  ,{0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0} ///< character 0xde | M-^|
  ,{0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00} ///< character 0xdf | M-_|
  ,{0x00,0x00,0x6e,0x3b,0x13,0x3b,0x6e,0x00} ///< character 0xe0 | M-`|
  ,{0x00,0x1e,0x33,0x1f,0x33,0x1f,0x03,0x03} ///< character 0xe1 | M-a|
  ,{0x00,0x3f,0x33,0x03,0x03,0x03,0x03,0x00} ///< character 0xe2 | M-b|
  ,{0x00,0x7f,0x36,0x36,0x36,0x36,0x36,0x00} ///< character 0xe3 | M-c|
  ,{0x3f,0x33,0x06,0x0c,0x06,0x33,0x3f,0x00} ///< character 0xe4 | M-d|
  ,{0x00,0x00,0x7e,0x1b,0x1b,0x1b,0x0e,0x00} ///< character 0xe5 | M-e|
  ,{0x00,0x66,0x66,0x66,0x66,0x3e,0x06,0x03} ///< character 0xe6 | M-f|
  ,{0x00,0x6e,0x3b,0x18,0x18,0x18,0x18,0x00} ///< character 0xe7 | M-g|
  ,{0x3f,0x0c,0x1e,0x33,0x33,0x1e,0x0c,0x3f} ///< character 0xe8 | M-h|
  ,{0x1c,0x36,0x63,0x7f,0x63,0x36,0x1c,0x00} ///< character 0xe9 | M-i|
  ,{0x1c,0x36,0x63,0x63,0x36,0x36,0x77,0x00} ///< character 0xea | M-j|
  ,{0x38,0x0c,0x18,0x3e,0x33,0x33,0x1e,0x00} ///< character 0xeb | M-k|
  ,{0x00,0x00,0x7e,0xdb,0xdb,0x7e,0x00,0x00} ///< character 0xec | M-l|
  ,{0x60,0x30,0x7e,0xdb,0xdb,0x7e,0x06,0x03} ///< character 0xed | M-m|
  ,{0x1c,0x06,0x03,0x1f,0x03,0x06,0x1c,0x00} ///< character 0xee | M-n|
  ,{0x1e,0x33,0x33,0x33,0x33,0x33,0x33,0x00} ///< character 0xef | M-o|
  ,{0x00,0x3f,0x00,0x3f,0x00,0x3f,0x00,0x00} ///< character 0xf0 | M-p|
  ,{0x0c,0x0c,0x3f,0x0c,0x0c,0x00,0x3f,0x00} ///< character 0xf1 | M-q|
  ,{0x06,0x0c,0x18,0x0c,0x06,0x00,0x3f,0x00} ///< character 0xf2 | M-r|
  ,{0x18,0x0c,0x06,0x0c,0x18,0x00,0x3f,0x00} ///< character 0xf3 | M-s|
  ,{0x70,0xd8,0xd8,0x18,0x18,0x18,0x18,0x18} ///< character 0xf4 | M-t|
  ,{0x18,0x18,0x18,0x18,0x18,0x1b,0x1b,0x0e} ///< character 0xf5 | M-u|
  ,{0x0c,0x0c,0x00,0x3f,0x00,0x0c,0x0c,0x00} ///< character 0xf6 | M-v|
  ,{0x00,0x6e,0x3b,0x00,0x6e,0x3b,0x00,0x00} ///< character 0xf7 | M-w|
  ,{0x1c,0x36,0x36,0x1c,0x00,0x00,0x00,0x00} ///< character 0xf8 | M-x|
  ,{0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00} ///< character 0xf9 | M-y|
  ,{0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00} ///< character 0xfa | M-z|
  ,{0xf0,0x30,0x30,0x30,0x37,0x36,0x3c,0x38} ///< character 0xfb | M-{|
  ,{0x1e,0x36,0x36,0x36,0x36,0x00,0x00,0x00} ///< character 0xfc | M-||
  ,{0x0e,0x18,0x0c,0x06,0x1e,0x00,0x00,0x00} ///< character 0xfd | M-}|
  ,{0x00,0x00,0x3c,0x3c,0x3c,0x3c,0x00,0x00} ///< character 0xfe | M-~|
  ,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} ///< character 0xff |    |
  };
#else
  extern const unsigned long long bytes[ 256 ][ 8 ];
#endif//BIOSFONT_STATIC

/*****************************************************************************/
/// @brief This recovers one font bit.
  inline bool
  fontbit( const unsigned char c, const unsigned x, const unsigned y ) {
    return !!(bytes[ c ][ y ] & (1<<x));
  }
#ifdef  __cplusplus
}

#endif//__cplusplus
/*****************************************************************************/
#ifdef  BIOSFONT_UNIT_TEST
/// @brief This unit test displays the entire ROM BIOS font.
#include <stdio.h>

/*****************************************************************************/
/// @brief This encodes one scan line for 1 character.
inline char *
scanchar( char *scan, const unsigned code, const unsigned line ) {
  const char bit[ 2 ] = { ' ', '*' };
  scan[ 0 ] = bit[ !!(BIOSfont::bytes[ code ][ line ] & 0x01) ];
  scan[ 1 ] = bit[ !!(BIOSfont::bytes[ code ][ line ] & 0x02) ];
  scan[ 2 ] = bit[ !!(BIOSfont::bytes[ code ][ line ] & 0x04) ];
  scan[ 3 ] = bit[ !!(BIOSfont::bytes[ code ][ line ] & 0x08) ];
  scan[ 4 ] = bit[ !!(BIOSfont::bytes[ code ][ line ] & 0x10) ];
  scan[ 5 ] = bit[ !!(BIOSfont::bytes[ code ][ line ] & 0x20) ];
  scan[ 6 ] = bit[ !!(BIOSfont::bytes[ code ][ line ] & 0x40) ];
  scan[ 7 ] = bit[ !!(BIOSfont::bytes[ code ][ line ] & 0x80) ];
  return scan;
}

/*****************************************************************************/
/// @brief This encodes one scan line for 8 characters across.
inline char *
scanline( char *cells, const unsigned start, const unsigned line ) {
  scanchar( cells + 1 + 9 * 0, start + 0, line );
  scanchar( cells + 1 + 9 * 1, start + 1, line );
  scanchar( cells + 1 + 9 * 2, start + 2, line );
  scanchar( cells + 1 + 9 * 3, start + 3, line );
  scanchar( cells + 1 + 9 * 4, start + 4, line );
  scanchar( cells + 1 + 9 * 5, start + 5, line );
  scanchar( cells + 1 + 9 * 6, start + 6, line );
  scanchar( cells + 1 + 9 * 7, start + 7, line );
  return cells;
}

/*****************************************************************************/
/// @brief This encodes one set of 8 characters starting at code.
///        It marches through one set of eight, scan-line at a time..
void display( const unsigned start ) {
  static char line[ 80 ] =
  "+--------+--------+--------+--------+--------+--------+--------+--------+";
  static char cells[ 80 ] =
  "|        |        |        |        |        |        |        |        |";
  puts( line );
  if( start >= 0x100 ) return;
  puts( scanline( cells, start, 0 ) );
  puts( scanline( cells, start, 1 ) );
  puts( scanline( cells, start, 2 ) );
  puts( scanline( cells, start, 3 ) );
  puts( scanline( cells, start, 4 ) );
  puts( scanline( cells, start, 5 ) );
  puts( scanline( cells, start, 6 ) );
  puts( scanline( cells, start, 7 ) );
}

/*****************************************************************************/
/// @brief This causes the entire font to be displayed magnified.
void display( ) {  for( unsigned c = 0; c <= 0x100; c += 0x08 ) display( c );}

/*****************************************************************************/
int main( int argc, char *argv[ ] ) {
  if( argc > 1 ) puts( argv[ 0 ] );
  display( );
  return 0;
}
/*****************************************************************************/
#endif//BIOSFONT_UNIT_TEST
#endif//BIOSFONT_H
/// biosfont.h <EOF>
/*****************************************************************************/