function Hi(X): Byte;

The Hi function returns the high-order byte of X as an unsigned value. X is an expression of type Integer or Word.

var B: Byte;
begin
  B := Hi($1234);   { $12 }
end;