Press enter to see results or esc to cancel.

System Function UpCase

This procedure processes system function UpCase.

Procedure Func_UpCase; Far;
begin
  ExpectTokenAndGetNext (Token_LeftParenthesis);
  Expression^.CalculateExpression;
  If Expression^.TypeDefPtr^.BaseType <> btChar then Error (CharacterExpressionExpected);
  ExpectTokenAndGetNext (Token_RightParenthesis);
  Expression^.CheckOrdinalRange (Ptr (SystemUnitSegment, Byte_TypeOffset));
  Expression^.PushExpression;
  Expression^.Calculate;
  GenerateInstruction_CALL_FAR (SysProc_UpperCase);
  With Expression^ do
    begin
      Expression^.EndIntermediateCodeSubroutine;
      Location := elRegister;
      DataType := [itUnsigned];
      UsedRegisters := [urSP, urDX, urAX];
      LocationData.Register := rDX_AX;
    end;
end;