Author Topic: Replacements for fptoa and fptoa2 modules.  (Read 4293 times)

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 7541
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Replacements for fptoa and fptoa2 modules.
« on: February 01, 2013, 12:44:18 PM »
Dave has tweaked both algos so that they build in both the early and later versions of ML.EXE. I have tested the build on ML versions 6.14 and 8.0 and 9.0 and they build correctly.

Overwrite the two older versions in the masm32 library then run the batch file in the m32lib directory. This tweak by Dave allows the library to be built using a late version of ML.EXE.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

dedndave

  • Member
  • *****
  • Posts: 8827
  • Still using Abacus 2.0
    • DednDave
Re: Replacements for fptoa and fptoa2 modules.
« Reply #1 on: February 01, 2013, 01:22:10 PM »
i'd have to share credit with bomz   :P

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 7541
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Replacements for fptoa and fptoa2 modules.
« Reply #2 on: February 01, 2013, 03:39:33 PM »
 :biggrin:

You probably deserve each other.  :P
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

dedndave

  • Member
  • *****
  • Posts: 8827
  • Still using Abacus 2.0
    • DednDave
Re: Replacements for fptoa and fptoa2 modules.
« Reply #3 on: February 01, 2013, 11:31:51 PM »
lol - niiiiice
have to give credit where it's due, is all   :P

anta40

  • Member
  • ***
  • Posts: 312
Re: Replacements for fptoa and fptoa2 modules.
« Reply #4 on: February 02, 2013, 03:02:36 AM »
I found 2 errors while rebuilding masm32.lib

Quote
***********
ASCII build
***********

 Assembling: fptoa.asm
fptoa.asm(75) : error A2023:instruction operand must have size
 Assembling: fptoa2.asm
fptoa2.asm(74) : error A2023:instruction operand must have size
 Assembling: frame3d.asm
 Assembling: framegrp.asm
 
 
 *************
UNICODE Build
*************

 Assembling: ucgetline.asm
 Assembling: ucleft.asm
 Assembling: uclen.asm
 Assembling: uclower.asm
 Assembling: ucltrim.asm
 Assembling: ucmid.asm
 Assembling: ucMonoSpace.asm
 Assembling: ucmulcat.asm
 Assembling: ucremove.asm
 Assembling: ucrep.asm
 Assembling: ucrev.asm
 Assembling: ucright.asm
ucright.asm(7) : fatal error A1000:cannot open file : masm32.inc
Microsoft (R) Library Manager Version 11.00.51106.1
Copyright (C) Microsoft Corporation.  All rights reserved.

I thinks this is my first time I met such errors

dedndave

  • Member
  • *****
  • Posts: 8827
  • Still using Abacus 2.0
    • DednDave
Re: Replacements for fptoa and fptoa2 modules.
« Reply #5 on: February 02, 2013, 03:42:24 AM »
i don't get that error using ML versions 6.1 - 10   :P

i guess version 11 wants to see TBYTE PTR
Code: [Select]
fbstp tbyte ptr [esp]
see if that will work, because i cannot run ML version 11 on this machine to test it
it's the same line of code for both fptoa and fptoa2

dedndave

  • Member
  • *****
  • Posts: 8827
  • Still using Abacus 2.0
    • DednDave
Re: Replacements for fptoa and fptoa2 modules.
« Reply #6 on: February 02, 2013, 03:53:30 AM »
i see that Tim did what i would consider to be a bit of a no-no
Code: [Select]
FloatToBCD PROC public uses esi edi

    sub esp, 10

    fbstp [esp]

;
;
;

    add esp, 10
    ret

FloatToBCD ENDP

even though the stack belongs to the process, and it is not otherwise accessed in the routine,
i would keep the stack 4-aligned at all times by using 12 instead of 10