Refactor UEFI graphics code and move example to example.f
[rrq/jonasforth.git] / example.f
index 38cd6e4e69921d16fb6e9171b3129796161e085f..499f468773c06f4163b393900b4a70b1f6143662 100644 (file)
--- a/example.f
+++ b/example.f
   10 FIB .U
   SPACE S" (Expected: 59)" TELL NEWLINE ;
 
+\ This example calls the Blt() function on UEFI's Graphics Output Protocol. See
+\ the UEFI specification and uefi.f for more information.
+: BLUE-SQUARE
+  GraphicsOutputProtocol
+  HERE @ 255 C, 0 C, 0 C, 0 C, \ Buffer with single blue pixel
+  EfiBltVideoFill
+  0 0 \ Source
+  100 100 20 20 \ Destination
+  0
+  GOP.Blt() ;
+
 HELLO
 TEST-FIB
+BLUE-SQUARE