-
Notifications
You must be signed in to change notification settings - Fork 0
/
welcome14.cpp
535 lines (471 loc) · 16.3 KB
/
welcome14.cpp
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
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <wchar.h>
#include <uefi.h>
#include "UefiBase.hpp"
#include "TextWindow.hpp"
#include "DPRINTF.H"
#include "base_t.h"
//Available functions: https://github.com/KilianKegel/toro-C-Library#implementation-status
#define ELC(x) (sizeof(x)/sizeof(x[0]))
extern "C" EFI_SYSTEM_TABLE * gSystemTable;
extern "C" EFI_HANDLE gImageHandle;
extern "C" int _outp(unsigned short port, int data_byte);
extern "C" unsigned short _outpw(unsigned short port, unsigned short data_word);
extern "C" unsigned long _outpd(unsigned short port, unsigned long data_word);
extern "C" int _inp(unsigned short port);
extern "C" unsigned short _inpw(unsigned short port);
extern "C" unsigned long _inpd(unsigned short port);
extern bool gfKbdDbg;
#define TYPE char
#define TYPESIZE sizeof(TYPE)
#define TYPEMASK ((1ULL << TYPESIZE * 8)-1)
#define FORMATW_ADDR L"%02X: %02X%s"
#define FORMATWOADDR L"%s%02X%s"
#define RTCRD(idx) (_outp(0xED,0x55),_outp(0xED,0x55),_outp(0x70,idx),_outp(0xED,0x55),_outp(0xED,0x55),_inp(0x71))
#define IODELAY _outp(0xED, 0x55)
int rtcrd(int idx)
{
int nRet = 0;
int UIP = 0;
do {
//
// read UIP- update in progress first
//
_outp(0x70, 0xA);
IODELAY;
UIP = 0x80 == (0x80 & _inp(0x71));
IODELAY;
_outp(0x70, idx);
IODELAY;
nRet = _inp(0x71); IODELAY;
} while (1 == UIP);
return nRet;
}
//
// globally shared data
//
bool gExit = false;
bool gHexView = true;
//
// menu item functions
//
void fnMnuItm_File_Exit(CTextWindow *pThis, void *pContext)
{
pThis->TextPrint({20,20},"fnMnuItm_File_Exit...");
gExit = true;
}
void fnMnuItm_View_HexSym(CTextWindow* pThis, void* pContext)
{
CTextWindow* pRoot = pThis->TextWindowGetRoot();
pRoot->TextBlockClear();
gHexView ^= true;// toggle debug state
pThis->TextClearWindow();
}
//
// About - BOX
//
void fnMnuItm_About_0(CTextWindow* pThis, void* pContext)
{
CTextWindow* pAboutBox;
CTextWindow* pRoot = pThis->TextWindowGetRoot();
pThis->TextClearWindow(); // clear the pull down menu
pRoot->TextBlockRfrsh(); // refresh the main window
if (1)// center coordinate calculation
{
}
pAboutBox = new CTextWindow(pThis, { pRoot->WinDim.X/2 - 60/2,pRoot->WinDim.Y/2 - 20/2 }, { 60,20 }, EFI_BACKGROUND_CYAN | EFI_YELLOW);
pAboutBox->TextBorder(
{ 0,0 },
{ 60,20 },
BOXDRAW_DOWN_RIGHT,
BOXDRAW_DOWN_LEFT,
BOXDRAW_UP_RIGHT,
BOXDRAW_UP_LEFT,
BOXDRAW_HORIZONTAL,
BOXDRAW_VERTICAL,
nullptr
);
pAboutBox->TextPrint({ pAboutBox->WinDim.X / 2 - (int32_t)strlen("RTCSpy+")/2,2 }, "RTCSpy+");
pAboutBox->TextPrint({ pAboutBox->WinDim.X / 2 - (int32_t)strlen("RealTimeClock Analyser")/2,5 }, "RealTimeClock Analyser");
//RealTimeClock Analyser
for (TEXT_KEY key = NO_KEY; KEY_ESC != key && KEY_ENTER != key; key = pThis->TextGetKey(), pThis->TextWindowUpdateProgress())
;
pAboutBox->BgAtt = EFI_BACKGROUND_LIGHTGRAY | EFI_BLACK;
delete pAboutBox;
}
void fnMnuItm_About_1(CTextWindow* pThis, void* pContext)
{
gfKbdDbg ^= true;// toggle debug state
if (false == gfKbdDbg)
{
char* pLineKiller = new char[pThis->ScrDim.X - 4];
memset(pLineKiller, '\x20', pThis->ScrDim.X - 4);
pLineKiller[pThis->ScrDim.X - 4] = '\0';
pThis->GotoXY({ 2,pThis->ScrDim.Y - 3 });
printf("%s", pLineKiller);
}
pThis->TextClearWindow();
}
void resetconsole(void)
{
gSystemTable->ConOut->EnableCursor(gSystemTable->ConOut, 1);
gSystemTable->ConOut->SetAttribute(gSystemTable->ConOut, EFI_BACKGROUND_BLACK + EFI_WHITE);
}
int main(int argc, char** argv)
{
int nRet = 1;
gSystemTable = (EFI_SYSTEM_TABLE*)(argv[-1]); //SystemTable is passed in argv[-1]
gImageHandle = (void*)(argv[-2]); //ImageHandle is passed in argv[-2]
TEXT_KEY key = NO_KEY;
DPRINTF(("hello\n"));
atexit(resetconsole);
do
{
char* pc = new char[256];
int* pi = new int(12345678);
struct {
RELPOS RelPos;
const wchar_t* wcsMenuName;
CTextWindow* pTextWindow;
ABSDIM MnuDim;
const wchar_t* rgwcsMenuItem[8]; // max. number of menu items is currently 8
void (* rgfnMnuItm[8])(CTextWindow *, void *pContext); // max. number of menu items is currently 8
}menu[] =
{
{{04,0}, L" File ", nullptr,{20,3/* # menuitems + 2 */}, {L"Exit "},{&fnMnuItm_File_Exit}},
{{12,0}, L" View ", nullptr,{20,3/* # menuitems + 2 */}, {L"Hex/Sym view "},{&fnMnuItm_View_HexSym}},
{{20,0}, L" Help ", nullptr,{20,4/* # menuitems + 2 */}, {L"About ",L"KEYBOARD DEBUG "},{&fnMnuItm_About_0, &fnMnuItm_About_1 }}
};
CTextWindow FullScreen(nullptr/* no parent pointer - this is the main window !!! */, DFLT_SCREEN_ATTRIBS);
//
// draw the border
//
if (1)
{
wchar_t wcsTitle[] = { BOXDRAW_VERTICAL_LEFT_DOUBLE,BLOCKELEMENT_LIGHT_SHADE ,BLOCKELEMENT_LIGHT_SHADE ,BLOCKELEMENT_LIGHT_SHADE ,BLOCKELEMENT_LIGHT_SHADE ,BLOCKELEMENT_LIGHT_SHADE ,BLOCKELEMENT_LIGHT_SHADE ,
0x20,L'R',L'T',L'C',L'S',L'p',L'y',L'+',0x20,
BLOCKELEMENT_LIGHT_SHADE ,BLOCKELEMENT_LIGHT_SHADE ,BLOCKELEMENT_LIGHT_SHADE ,BLOCKELEMENT_LIGHT_SHADE ,BLOCKELEMENT_LIGHT_SHADE ,BLOCKELEMENT_LIGHT_SHADE,BOXDRAW_VERTICAL_RIGHT_DOUBLE,'\0'};
FullScreen.TextBorder(
{ 0,1 },
{ FullScreen.WinDim.X, FullScreen.WinDim.Y - 2/*FullScreen.WinDim.Y*/ },
//{ FullScreen.WinPos.X-10,FullScreen.WinPos.Y - 11 },
BOXDRAW_DOUBLE_DOWN_RIGHT,
BOXDRAW_DOUBLE_DOWN_LEFT,
BOXDRAW_DOUBLE_UP_RIGHT,
BOXDRAW_DOUBLE_UP_LEFT,
BOXDRAW_DOUBLE_HORIZONTAL,
BOXDRAW_DOUBLE_VERTICAL,
&wcsTitle[0]
);
}
//
// draw the menu strings
//
for (int i = 0; i < ELC(menu); i++) // initialize the menu strings
FullScreen.TextPrint(menu[i].RelPos, menu[i].wcsMenuName);
//
// draw status/help line
//
if (1)
{
wchar_t wcsARROW_LEFT[2] = { ARROW_LEFT ,'\0' },
wcsARROW_UP[2] = { ARROW_UP ,'\0' },
wcsARROW_RIGHT[2] = { ARROW_RIGHT ,'\0' },
wcsARROW_DOWN[2] = { ARROW_DOWN ,'\0'};
FullScreen.TextPrint({ 1, FullScreen.ScrDim.Y - 1 },EFI_BACKGROUND_BLUE|EFI_WHITE, L"F10:Menu ENTER:Select ESC:Return %s%s%s%s:Navigate", wcsARROW_LEFT, wcsARROW_RIGHT, wcsARROW_UP, wcsARROW_DOWN);
}
//
// the master loop
//
if (1)
{
enum STATE {
MENU_DFLT,
MENU_ENTER_ACTIVATION,
MENU_IS_ACTIVE,
MENU_IS_OPEN,
/*MENU_123_IS_ACTIVE,*/
}state = MENU_DFLT;
int idxMenu = 0, idxMnuItm = 0;
int pgress = 0;
for (;false == gExit;)
{
//clock_t endclk = CLOCKS_PER_SEC / 8 + clock();
//EFI_KEY_DATA KeyData = FullScreen.ReadKeyStrokeEx();
if (0)
{
//
// progress
//
static char* rgstrProgress[] = { "|", "/", "-", "\\" };
pgress = (pgress + 1) % (sizeof(rgstrProgress) / sizeof(rgstrProgress[0]));
FullScreen.TextPrint({ FullScreen.WinDim.X - 3,0 }, EFI_BACKGROUND_LIGHTGRAY + EFI_BLACK ,"[%s]", rgstrProgress[pgress]);
}
FullScreen.TextWindowUpdateProgress();
key = FullScreen.TextGetKey();
switch (state) {
case MENU_ENTER_ACTIVATION:
FullScreen.TextPrint(menu[idxMenu].RelPos, EFI_BACKGROUND_CYAN | EFI_YELLOW, menu[idxMenu].wcsMenuName);
state = MENU_IS_ACTIVE;
break;
case MENU_IS_ACTIVE:
if (KEY_ESC == key) {
key = NO_KEY;
state = MENU_DFLT;
for (int i = 0; i < ELC(menu); i++) // normalize the menu strings
FullScreen.TextPrint(menu[i].RelPos, EFI_BACKGROUND_LIGHTGRAY | EFI_BLACK, menu[i].wcsMenuName);
}
else if (KEY_LEFT == key) {
FullScreen.TextPrint(menu[idxMenu].RelPos, EFI_BACKGROUND_LIGHTGRAY | EFI_BLACK, menu[idxMenu].wcsMenuName);
idxMenu = ((idxMenu - 1) < 0) ? ELC(menu) - 1 : idxMenu - 1;
FullScreen.TextPrint(menu[idxMenu].RelPos, EFI_BACKGROUND_CYAN | EFI_YELLOW, menu[idxMenu].wcsMenuName);
key = NO_KEY;
}
else if (KEY_RIGHT == key) {
FullScreen.TextPrint(menu[idxMenu].RelPos, EFI_BACKGROUND_LIGHTGRAY | EFI_BLACK, menu[idxMenu].wcsMenuName);
idxMenu = ((idxMenu + 1) < ELC(menu)) ? idxMenu + 1 : 0;
FullScreen.TextPrint(menu[idxMenu].RelPos, EFI_BACKGROUND_CYAN | EFI_YELLOW, menu[idxMenu].wcsMenuName);
key = NO_KEY;
}
else if (KEY_ENTER == key) {
menu[idxMenu].pTextWindow = new CTextWindow(&FullScreen,{ menu[idxMenu].RelPos.X, 2 }, menu[idxMenu].MnuDim, EFI_BACKGROUND_CYAN | EFI_YELLOW);
menu[idxMenu].pTextWindow->TextBorder({ 0, 0 }, menu[idxMenu].MnuDim,
BOXDRAW_DOWN_RIGHT,
BOXDRAW_DOWN_LEFT,
BOXDRAW_UP_RIGHT,
BOXDRAW_UP_LEFT,
BOXDRAW_HORIZONTAL,
BOXDRAW_VERTICAL,
nullptr);
//
// fill menu with menuitem strings
//
menu[idxMenu].pTextWindow->pwcsBlockDrawBuf[0] = '\0'; // initially terminate the string list
for (int i = 0; /* NOTE: check for NULL string to terminate the list */menu[idxMenu].rgwcsMenuItem[i]; i++)
{
wchar_t* wcsList = menu[idxMenu].pTextWindow->pwcsBlockDrawBuf;
size_t x = wcslen(wcsList); // always get end of strings
swprintf(&wcsList[x], UINT_MAX,L"%s\n", menu[idxMenu].rgwcsMenuItem[i]);
}
menu[idxMenu].pTextWindow->TextBlockDraw({ 2, 1 });
idxMnuItm = 0;
menu[idxMenu].pTextWindow->TextPrint({ 2,1 }, EFI_BACKGROUND_MAGENTA | EFI_YELLOW, menu[idxMenu].rgwcsMenuItem[0]);
state = MENU_IS_OPEN;
key = NO_KEY;
}
break;
case MENU_IS_OPEN:
if (KEY_ESC == key) {
menu[idxMenu].pTextWindow->BgAtt = EFI_BACKGROUND_LIGHTGRAY | EFI_BLACK; // set background attribute
delete menu[idxMenu].pTextWindow;
FullScreen.TextBlockRfrsh();
state = MENU_IS_ACTIVE;
}
else if (KEY_ENTER == key)
{
menu[idxMenu].pTextWindow->BgAtt = EFI_BACKGROUND_LIGHTGRAY | EFI_BLACK; // set background attribute
(*menu[idxMenu].rgfnMnuItm[idxMnuItm])(menu[idxMenu].pTextWindow, nullptr);
for (int i = 0; i < ELC(menu); i++) // normalize the menu strings
FullScreen.TextPrint(menu[i].RelPos, EFI_BACKGROUND_LIGHTGRAY | EFI_BLACK, menu[i].wcsMenuName);
state = MENU_DFLT;
}
else if (KEY_DOWN == key) {
int idxMnuItmNUM = menu[idxMenu].MnuDim.Y - 2/* number of lines within the pulldown menu */;
menu[idxMenu].pTextWindow->TextPrint({ 2,idxMnuItm + 1 }, EFI_BACKGROUND_CYAN | EFI_YELLOW, menu[idxMenu].rgwcsMenuItem[idxMnuItm]); // de-highlight previous menu item
idxMnuItm = (++idxMnuItm == idxMnuItmNUM ? 0 : idxMnuItm);
menu[idxMenu].pTextWindow->TextPrint({ 2,idxMnuItm + 1 }, EFI_BACKGROUND_MAGENTA | EFI_YELLOW, menu[idxMenu].rgwcsMenuItem[idxMnuItm]); // highlight current menu item
}
else if (KEY_UP == key) {
int idxMnuItmNUM = menu[idxMenu].MnuDim.Y - 2/* number of lines within the pulldown menu */;
menu[idxMenu].pTextWindow->TextPrint({ 2,idxMnuItm + 1 }, EFI_BACKGROUND_CYAN | EFI_YELLOW, menu[idxMenu].rgwcsMenuItem[idxMnuItm]); // de-highlight previous menu item
idxMnuItm = (--idxMnuItm < 0 ? idxMnuItmNUM - 1 : idxMnuItm);
menu[idxMenu].pTextWindow->TextPrint({ 2,idxMnuItm + 1 }, EFI_BACKGROUND_MAGENTA | EFI_YELLOW, menu[idxMenu].rgwcsMenuItem[idxMnuItm]); // highlight current menu item
}
key = NO_KEY;
break;
case MENU_DFLT:
if (KEY_F10 == key)
state = MENU_ENTER_ACTIVATION,
key = NO_KEY;
if (true == gHexView)
{
//
// refresh the FullScreen Window
//
FullScreen.pwcsBlockDrawBuf[0] = '\0';
for (int i = 0; i < 128 / TYPESIZE; i++)
swprintf(&FullScreen.pwcsBlockDrawBuf[wcslen(FullScreen.pwcsBlockDrawBuf)],
(const size_t)8192,
(i % (16 / TYPESIZE) == 0 ? FORMATW_ADDR : FORMATWOADDR),
(i % (16 / TYPESIZE) == 0 ? (void*)(i * TYPESIZE) : L""),
TYPEMASK & RTCRD(i * TYPESIZE),
((i + 1) % (16 / TYPESIZE)) ? (((i + 1) % (8 / TYPESIZE)) ? L" " : L" - ") : L"\n");
FullScreen.TextBlockDraw({ FullScreen.WinPos.X + 3, FullScreen.WinPos.Y + 3 });
}
else {
//
// NOTE:The RTC handling below is TOO SIMPLE, because it IGNORES the UIP Update In Progress phase.
// During that phase registers (calendar registers) have indetermined values.
// For that reason "%" division and string-length-equality is done for indexed strings.
//
static char* wday_name_long[7] = {
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday" };
static char* mon_name_long[12] = {
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December" };
FullScreen.pwcsBlockDrawBuf[0] = '\0';
#define ENDOFDRAWBUF &FullScreen.pwcsBlockDrawBuf[wcslen(FullScreen.pwcsBlockDrawBuf)]
swprintf(ENDOFDRAWBUF, (const size_t)INT_MAX,
L"Date/Time: %hs, %X. %hs %02X%02X, %02X:%02X,%02X \n",
wday_name_long[(rtcrd(6)) % 7],
rtcrd(7),
mon_name_long[-1 + (rtcrd(8)) % 12],
rtcrd(0x32), rtcrd(9),
0xFF & rtcrd(4),
0xFF & rtcrd(2),
0xFF & rtcrd(0)
);
swprintf(ENDOFDRAWBUF, (const size_t)INT_MAX,
L" \nAlarm : %02X:%02X,%02X \n", 0xFF & rtcrd(5), 0xFF & rtcrd(3), 0xFF & rtcrd(1));
//
// register A
//
typedef union _regA {
uint8_t reg;
struct {
uint8_t RegA_RS0 : 1;
uint8_t RegA_RS1 : 1;
uint8_t RegA_RS2 : 1;
uint8_t RegA_RS3 : 1;
uint8_t RegA_DV0 : 1;
uint8_t RegA_DV1 : 1;
uint8_t RegA_DV2 : 1;
uint8_t RegA_UIP : 1;
}field;
}REGA;
REGA RegA;
RegA.reg = (uint8_t)RTCRD(0x0A);
swprintf(ENDOFDRAWBUF, INT_MAX, L" \nRegister A:\n UIP %d, DV2 %d, DV1 %d, DV0 %d, RS3 %d, RS2 %d, RS1 %d, RS0 %d\n",
RegA.field.RegA_RS0,
RegA.field.RegA_RS1,
RegA.field.RegA_RS2,
RegA.field.RegA_RS3,
RegA.field.RegA_DV0,
RegA.field.RegA_DV1,
RegA.field.RegA_DV2,
RegA.field.RegA_UIP);
//
// register B
//
typedef union _regB {
uint8_t reg;
struct {
uint8_t RegB_DSE : 1;
uint8_t RegB_C2412 : 1;
uint8_t RegB_DM : 1;
uint8_t RegB_SQWE : 1;
uint8_t RegB_UIE : 1;
uint8_t RegB_AIE : 1;
uint8_t RegB_PIE : 1;
uint8_t RegB_SET : 1;
}field;
}REGB;
REGB RegB;
RegB.reg = (uint8_t)RTCRD(0x0B);
swprintf(ENDOFDRAWBUF, INT_MAX, L" \nRegister B:\n SET %d, PIE %d, AIE %d, UIE %d, SQWE %d, DM %d, 24/12 %d, DSE %d\n",
RegB.field.RegB_SET,
RegB.field.RegB_PIE,
RegB.field.RegB_AIE,
RegB.field.RegB_UIE,
RegB.field.RegB_SQWE,
RegB.field.RegB_DM,
RegB.field.RegB_C2412,
RegB.field.RegB_DSE);
//
// register C
//
typedef union _regC {
uint8_t reg;
struct {
uint8_t RegC_B0 : 1;
uint8_t RegC_B1 : 1;
uint8_t RegC_B2 : 1;
uint8_t RegC_B3 : 1;
uint8_t RegC_UF : 1;
uint8_t RegC_AF : 1;
uint8_t RegC_PF : 1;
uint8_t RegC_IRQF : 1;
}field;
}REGC;
REGC RegC;
RegC.reg = (uint8_t)RTCRD(0x0C);
swprintf(ENDOFDRAWBUF, INT_MAX, L" \nRegister C:\n IRQF %d, PF %d, AF %d, UF %d, B3 %d, B2 %d, B1 %d, B0 %d\n",
RegC.field.RegC_IRQF,
RegC.field.RegC_PF,
RegC.field.RegC_AF,
RegC.field.RegC_UF,
RegC.field.RegC_B3,
RegC.field.RegC_B2,
RegC.field.RegC_B1,
RegC.field.RegC_B0);
//
// register D
//
typedef union _regD {
uint8_t reg;
struct {
uint8_t RegD_B0 : 1;
uint8_t RegD_B1 : 1;
uint8_t RegD_B2 : 1;
uint8_t RegD_B3 : 1;
uint8_t RegD_B4 : 1;
uint8_t RegD_B5 : 1;
uint8_t RegD_B6 : 1;
uint8_t RegD_VRT : 1;
}field;
}REGD;
REGD RegD;
RegD.reg = (uint8_t)RTCRD(0x0D);
swprintf(ENDOFDRAWBUF, INT_MAX, L" \nRegister D:\n VRT %d, B6 %d, B5 %d, B4 %d, B3 %d, B2 %d, B1 %d, B0 %d\n",
RegD.field.RegD_VRT,
RegD.field.RegD_B6,
RegD.field.RegD_B5,
RegD.field.RegD_B4,
RegD.field.RegD_B3,
RegD.field.RegD_B2,
RegD.field.RegD_B1,
RegD.field.RegD_B0);
FullScreen.TextBlockDraw({ FullScreen.WinPos.X + 3, FullScreen.WinPos.Y + 3 });
}
break;
default:break;
}
key = NO_KEY;
}
}
delete pc;
delete pi;
DPRINTF(("...exit0"));
} while (false == gExit);
DPRINTF(("...exit\n"));
return nRet;
}