summaryrefslogtreecommitdiffstats
path: root/memtestEDK/Memtest/SingleComponents/TestScreenbuffer.c
blob: 3b7d7f232b6bba465f0ebe665f29d0f914f1ae4c (plain) (blame)
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

#include <Uefi.h>
#include <Library/UefiLib.h>
#include <Library/UefiApplicationEntryPoint.h>

#include "screen_buffer.h"


EFI_STATUS
EFIAPI
UefiMain (
  IN EFI_HANDLE        ImageHandle,
  IN EFI_SYSTEM_TABLE  *SystemTable
  )
{
  Print(L"Test for screen_buffer\n\n");

  #define SCRN_DEBUG

  int y, x;

  for (y=0; y < 25; ++y){
    for (x=0; x < 80; ++x){
        set_scrn_buf(y, x, 'a');
      }
      set_scrn_buf(y, 80, '\0');
  }

  /*
  char get_scrn_buf(const int y, const int x);
  void set_scrn_buf(const int y, const int x, const char val);
  void tty_print_region(const int pi_top,const int pi_left, const int pi_bottom,const int pi_right);
  void tty_print_line(int y, int x, const char *text);
  void tty_print_screen(void);
  void print_error(char *pstr);
  */

  Print(L"Test finished.\n");

  return EFI_SUCCESS;
}