FloatTest32 Example
Posted dreamafar
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了FloatTest32 Example相关的知识,希望对你有一定的参考价值。
Example Program The following example program pushes two floating-point values on
the FPU stack, displays it, inputs two values from the user, multiplies them, and displays their
product:
TITLE 32-bit Floating-Point I/O Test (floatTest32.asm) INCLUDE Irvine32.inc INCLUDE macros.inc .data first REAL8 123.456 second REAL8 10.0 third REAL8 ? .code main PROC finit ; initialize FPU ; Push two floats and display the FPU stack. fld first fld second call ShowFPUStack ; Input two floats and display their product. mWrite "Please enter a real number: " call ReadFloat mWrite "Please enter a real number: " call ReadFloat fmul ST(0),ST(1) ; multiply mWrite "Their product is: " call WriteFloat call Crlf exit main ENDP END main
Sample input/output (user input shown in bold type):
以上是关于FloatTest32 Example的主要内容,如果未能解决你的问题,请参考以下文章
在一个无序整数数组中,找出连续增长片段最长的一段, 增长步长是1。Example: [3,2,4,5,6,1,9], 最长的是[4,5,6]