aboutsummaryrefslogtreecommitdiffstats
path: root/Lesson_21/UefiLessonsPkg/HelloWorld/HelloWorld.c
diff options
context:
space:
mode:
Diffstat (limited to 'Lesson_21/UefiLessonsPkg/HelloWorld/HelloWorld.c')
-rw-r--r--Lesson_21/UefiLessonsPkg/HelloWorld/HelloWorld.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/Lesson_21/UefiLessonsPkg/HelloWorld/HelloWorld.c b/Lesson_21/UefiLessonsPkg/HelloWorld/HelloWorld.c
new file mode 100644
index 0000000..29a4812
--- /dev/null
+++ b/Lesson_21/UefiLessonsPkg/HelloWorld/HelloWorld.c
@@ -0,0 +1,19 @@
+#include <Library/UefiBootServicesTableLib.h>
+#include <Library/UefiLib.h>
+
+EFI_STATUS
+EFIAPI
+UefiMain (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
+ )
+{
+ SystemTable->ConOut->OutputString(SystemTable->ConOut, L"Hello World!\n");
+ gST->ConOut->OutputString(gST->ConOut, L"Hello again!\n");
+ Print(L"Bye!\n");
+
+ UINTN Index;
+ gBS->WaitForEvent(1, &(gST->ConIn->WaitForKey), &Index);
+ gST->ConIn->Reset(gST->ConIn, FALSE);
+ return EFI_SUCCESS;
+}