aboutsummaryrefslogtreecommitdiffstats
path: root/Lesson_29/UefiLessonsPkg/HelloWorld/HelloWorld.c
diff options
context:
space:
mode:
Diffstat (limited to 'Lesson_29/UefiLessonsPkg/HelloWorld/HelloWorld.c')
-rw-r--r--Lesson_29/UefiLessonsPkg/HelloWorld/HelloWorld.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/Lesson_29/UefiLessonsPkg/HelloWorld/HelloWorld.c b/Lesson_29/UefiLessonsPkg/HelloWorld/HelloWorld.c
new file mode 100644
index 0000000..29a4812
--- /dev/null
+++ b/Lesson_29/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;
+}