13.07.2015 Views

apple-pascal-1.3-manual

apple-pascal-1.3-manual

apple-pascal-1.3-manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Noninteger ComparisonsThe next six instructions are nonspecific noninteger comparisons.Comparisons using specific values of UB are given in later sections.EQUNEQLEQLESGEQGRT175183180181176177UBUBUBUBUBUBtos-l=tos.tos-1 tos.tos-1 = tos.tos-1 > tos.Compare tos-1 to tos , and push the result, TRUE or FALSE. The type ofcomparison is specified by UB :Contents oftos-1 & tosValue ofUB for Comparisonreals 2strings 4booleans 6sets 8byte arrays 10words 12RealsFLT138Float top-of-staclk. Convert the integer tos to a floating-point number,and push the result.FLOTNCRNDABRADRNGRSBR137158 22158 23129131146150Float next to top-of-stack. tos is a real, tos-1 is an integer. Converttos-1 to a real number, and push the result.Truncate real. Truncate (as defined by Jensen and Wirth) the real tosand convert it to an integer, and push the result.Round real. Round (as defined by Jensen and Wirth) the real tos , thentruncate and convert to an integer, and finally push the result.Absolute value of real. Push the absolute value of the real tos .Add reals. Add tos and tos-1, and push the resulting sum.Negate real. Negate the real tos , and push the result.Subtract reals. Subtract tos from tos - 1 and push the resultingdifference.P-Machine InstructionsIV-69

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!