snapshot before branching
[rrq/jonasforth.git] / init / blurb.f
1 ConOut.ClearScreen()
2
3 \ ######################## BRANDING
4 HERE @ " rrq's UEFI boot using jonasforth." S@ TELL NEWLINE HERE !
5
6 \ Report Firmware Vendor and version
7 UTF16" Firmware vendor: " ConOut.OutputString()
8 FirmwareVendor ConOut.OutputString() NEWLINE
9
10 UTF16" Firmware version: " ConOut.OutputString()
11 FirmwareRevision @32 .U NEWLINE
12
13 BootServices.LocateHandleBuffer(AllHandles)
14 CONSTANT H.count
15 CONSTANT H.array
16
17 ." Handles: " H.count . NEWLINE
18
19 ( handle -- ; Tell about handle )
20 : TellHandle
21   DUP S" Handle: " TELL .U
22   BootServices.ProtocolsPerHandle()
23   ( *buffer count )
24   DUP S"  count: " TELL . NEWLINE
25   DUP IF
26     ( *buffer count )
27     BEGIN
28       SWAP
29       DUP @ GUID.Tell NEWLINE
30       8 +
31       SWAP 1 -
32       DUP 1 <
33     UNTIL 
34     DROP
35     BootServices.FreePool()
36   ELSE
37     DROP DROP
38   THEN
39 ;
40
41 : TellHandles
42   H.array 0 BEGIN
43     S" [" TELL DUP . S" ]: " TELL
44     SWAP DUP @
45     TellHandle
46     8 + SWAP
47     1 + DUP 3 > 
48   UNTIL
49 ;
50
51 TellHandles
52
53 0 INPUT-LENGTH ! \ Stop loading here