Recent Posts

Pages: 1 2 [3] 4 5 ... 10
21
The Soap Box / Re: In the Hospital
« Last post by jj2007 on Today at 03:29:08 AM »
Tell him that we need him here. He should not spend too much time there just because the ladies are so nice :eusa_naughty:
22
The Soap Box / In the Hospital
« Last post by anunitu on Today at 03:08:42 AM »
This is anunitu's daughter. He wanted me to let you all know that he was admitted to the hospital last Thursday. Apparently he had diabetes and did not know it. He is doing much better and should be back home in about a week.
23
64 Bit Assembler / Re: PI
« Last post by raymond on Today at 02:26:05 AM »
REAL10 provides a full 64 bits of precision, which is equivalent to 18 digits of precision in the decimal system.

However, only 16 digits can be displayed if you rely on the FBSTP packed decimal instruction to convert the binary data to the decimal data. You would need some other means of converting the binary data to display the full 18 bits of the FPU to decimal.

Although the ALU has been upgraded to handle 64-bit instructions, the associated FPU in 64-bit computers is still limited to handling REAL10 as far as I know. The Windows calculator was providing a precision of over 30 decimal digits well before the advent of 64-bit computers. That was based on its own internal program for big numbers and extended precision, along with its own algo for binary/decimal conversions.
24
The Laboratory / Re: Looking for the smallest possible .EXE
« Last post by jj2007 on Today at 01:10:04 AM »
25
The Workshop / Re: GNU Scientific Library
« Last post by LiaoMi on October 19, 2017, 11:10:37 PM »
Great stuff, LiaoMi. Can I use the two DLLs for my GSL examples?

 Sure! :biggrin: So it was planned  :P
26
The Workshop / Re: GNU Scientific Library
« Last post by jj2007 on October 19, 2017, 09:50:48 PM »
Great stuff, LiaoMi. Can I use the two DLLs for my GSL examples?
27
UASM Assembler Development / Re: FRAME issues
« Last post by johnsa on October 19, 2017, 08:43:59 PM »
www.terraspace.co.uk/uasm64.zip

Try this one now.

The follow examples all work perfectly:

Code: [Select]
option casemap:none
option frame:NOAUTO

includelib c:\jwasm\wininc\lib64\kernel32.lib
ExitProcess proto :dword

.code

OPTION PROLOGUE:NONE
OPTION EPILOGUE:NONE
proc2 proc FRAME par1:qword, par2:qword
db 048h
      push rbp
.pushreg rbp
mov rbp, rsp
.setframe rbp, 0
sub rsp, 60h
      .allocstack 60h
.endprolog
mov par1, rcx
mov par2, rdx
leave
ret
proc2 endp
OPTION PROLOGUE:PROLOGUEDEF
OPTION EPILOGUE:EPILOGUEDEF

proc1 proc FRAME par1:qword, par2:qword
.endprolog
mov par1,rcx
mov par2,rdx
ret
proc1 endp

proc3 proc FRAME
      db      048h
      push    rbp
      .pushreg rbp
      mov rbp, rsp
     .setframe rbp, 0
    .endprolog
    ret
proc3 endp

main proc
sub rsp,20h
call mainE
call proc1
call proc2
add rsp,20h
mov ecx,0
call ExitProcess
ret
main endp

ExceptionHandler proc
    ret
ExceptionHandler endp

mainE proc frame:ExceptionHandler
    .endprolog
    ret
mainE endp
end

and

Code: [Select]
.x64
.model flat, fastcall

option frame:auto
option  dllimport:<msvcrt>
printf  proto :ptr, :vararg
exit    proto :dword
option  dllimport:none

.data
string db "ExceptionHandler called",10,0
.code

ExceptionHandler PROC
    invoke printf, addr string
    invoke exit,0
    ret
ExceptionHandler ENDP

main proc frame:ExceptionHandler

    xor rax,rax
    mov [rax],al
    ret

main endp

    end main

and

Code: [Select]
.x64
.model flat, fastcall

option  dllimport:<msvcrt>
printf  proto :ptr, :vararg
exit    proto :dword
option  dllimport:none

.data
string db "ExceptionHandler called",10,0
.code

ExceptionHandler PROC
    invoke printf, addr string
    invoke exit,0
    ret
ExceptionHandler ENDP

main proc frame:ExceptionHandler

    .endprolog
    xor rax,rax
    mov [rax],al
    ret

main endp

    end main

results:
Code: [Select]
D:\HJWasm\Tests>build

D:\HJWasm\Tests>uasm64 -c -nologo -less -Zi -Zd -win64 -Zp8 nid_frame.asm
nid_frame.asm(2) : Warning A4095: Multiple .MODEL directives, .MODEL ignored
nid_frame.asm: 1 warnings, 0 errors

D:\HJWasm\Tests>uasm64 -c -nologo -less -Zi -Zd -win64 -Zp8 nid_frame2.asm
nid_frame2.asm(2) : Warning A4095: Multiple .MODEL directives, .MODEL ignored
nid_frame2.asm: 1 warnings, 0 errors

D:\HJWasm\Tests>uasm64 -c -nologo -less -Zi -Zd -win64 -Zp8 aw27_frame.asm
aw27_frame.asm: ok

D:\HJWasm\Tests>"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.10.25017\bin\HostX86\x64\link.exe" /subsystem:console /machine:x64 /Libpath:"d:\winsdk\v7.1\Lib\x64" nid_frame.obj msvcrt.lib
Microsoft (R) Incremental Linker Version 14.10.25017.0
Copyright (C) Microsoft Corporation.  All rights reserved.


D:\HJWasm\Tests>"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.10.25017\bin\HostX86\x64\link.exe" /subsystem:console /machine:x64 /Libpath:"d:\winsdk\v7.1\Lib\x64" nid_frame2.obj msvcrt.lib
Microsoft (R) Incremental Linker Version 14.10.25017.0
Copyright (C) Microsoft Corporation.  All rights reserved.


D:\HJWasm\Tests>"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.10.25017\bin\HostX86\x64\link.exe" /subsystem:console /machine:x64 /Libpath:"d:\winsdk\v7.1\Lib\x64" /entry:main aw27_frame.obj
Microsoft (R) Incremental Linker Version 14.10.25017.0
Copyright (C) Microsoft Corporation.  All rights reserved.


D:\HJWasm\Tests>nid_frame
ExceptionHandler called

D:\HJWasm\Tests>nid_frame2
ExceptionHandler called




28
64 Bit Assembler / Re: PI
« Last post by jj2007 on October 19, 2017, 08:25:23 PM »
Code: [Select]
include \Masm32\MasmBasic\Res\JBasic.inc
.data
PI1 REAL8 3.1415926535897932384626433832795
Init                                                                ; OPT_64 0  ; put 0 for 32 bit, 1 for 64 bit assembly
  MsgBox 0, Str$("The value of PI is %.17f", PI1), "Hi", MB_OK or MB_SETFOREGROUND
EndOfCode

Assembles fine with UAsm (see attached exe), but ML throws indeed an error. However, even if ML would accept the extra precision, what do you want to do with it? As Hutch wrote, you need your own routines to display the high precision. Standard CRT sucks.

But even REAL10 can handle only 18 digits. For more precision, you need QuadMath or similar:
Code: [Select]
digits  1.23456789012345678901234567890123
PI      3.14159265358979323846264338327950      (as text)
MyPI    3.14159265358979323846264338327950      Real16 precision
MyPI    3.14159265358979323851280895940619      Real10 precision

Edit: Raymond is right (as usual), REAL10 can handle 18 digits, not 16 as I wrote initially.
29
The Workshop / Re: GNU Scientific Library
« Last post by LiaoMi on October 19, 2017, 07:38:09 PM »
Any link to libgsl.dll and libgslcblas.dll binaries? Compiling them myself really is not an option.

Hi,

Here is a complete build of the latest source with examples and all libraries
https://mega.co.nz/#!El5QQCLQ!AAAAAAAAAAA0MuXuJxLT1gAAAAAAAAAANDLl7icS09Y

version earlier, can be downloaded in the second link, there was version 2.2 with libraries but without examples - https://www.bruot.org/hp/media/files/libraries/gsl_2_2_msvc2017_64.zip and https://www.bruot.org/hp/media/files/libraries/gsl_2_2_msvc2015_32.zip
30
UASM Assembler Development / Re: FRAME issues
« Last post by aw27 on October 19, 2017, 07:15:08 PM »
I feel sorry, but a few things are not getting better, actually on the contrary.

Code: [Select]
option frame:NOAUTO

......

; Error A2256: .ENDPROLOG found before EH directives
proc1 proc FRAME
      db      048h
      push    rbp
      .pushreg rbp
      mov rbp, rsp
     .setframe rbp, 0
    .endprolog

    ret
proc1 endp

Pages: 1 2 [3] 4 5 ... 10