zoukankan      html  css  js  c++  java
  • 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):

  • 相关阅读:
    Restful风格
    SpringMVC概念、原理及搭建
    Mybatis搭建
    HttpServletRequest、HttpServletResponse、Cookie、Session
    Servlet基础
    Spring整合Mybatis
    PHP代码标识
    IOC及Bean容器
    框架
    Spring概况
  • 原文地址:https://www.cnblogs.com/dreamafar/p/6023492.html
Copyright © 2011-2022 走看看