Read and respond to this message at: https://sourceforge.net/projects/gnuwin32/forums/forum/74807/topic/5012933 By: jj2007
Hello, I am mostly programming in Masm on Windows, and stumbled over gsl a while ago. Fantastic work! So I decided to make it more accessible in assembler, and wrote some macros. Here is a demo how to use the macro with Microsoft Masm or [url=http://www.japheth.de/JWasm.html]JWasm[/url], taken 1:1 from the [url=http://www.gnu.org/software/gsl/manual/gsl-ref.html#An-Example-Program]gsl example program[/url]: [quote][size=12pt]include \masm32\MasmBasic\MasmBasic.inc [color=grey]; [/color][url=http://www.masm32.com/board/index.php?topic=12460]download[/url] [color=blue] [/color]; [url=http://gnuwin32.sourceforge.net/packages/gsl.htm]libgsl.dll download[/url] : open Binaries zip, and extract ; libgsl.dll and libgslcblas.dll to \masm32\MasmBasic\GnuScLib\DLL [color=grey] ; define the gsl function(s) you need using the syntax of the [/color][url=http://www.gnu.org/software/gsl/manual/gsl-ref.html]GNU Scientific Library Reference[/url] [/size][size=14pt][b]gsl double [color=red]gsl_sf_bessel_J0[/color] (double x)[/size][size=12pt] [/b] .data x REAL8 5.0 [color=grey]; in C, this would be [/color][color=red]double x = 5.0;[/color] [/size][size=14pt][b][color=blue]Init[/size][size=12pt][/b] [/color][b] [/size][size=14pt][color=blue]gsl_INIT[/size][size=12pt] [/b] [/color][/size][size=14pt][b][color=red]gsl_sf_bessel_J0[/color](x)[/size][size =12pt] [/b] [color=blue]PrintLine[/color] "GNU expected:", Tb$, "-0.1775967713143382920" [color=blue]PrintLine[/color] "On FPU: ", Tb$, "-0.1775967713143383198" [color=blue]Inkey Str$[/color]("MB Str$() \t%If", ST(0))[color=grey] [/color][b] [/size][size=14pt][color=blue]gsl_EXIT[/color][/size][size=12pt] [/b] [/size][size=14pt][b][color=blue]Exit[/color][/size][size=12pt][/b] end start [/size][/quote] _____________________________________________________________________________________ You are receiving this email because you elected to monitor this topic or entire forum. To stop monitoring this topic visit: https://sourceforge.net/projects/gnuwin32/forums/forum/74807/topic/5012933/unmonitor To stop monitoring this forum visit: https://sourceforge.net/projects/gnuwin32/forums/forum/74807/unmonitor ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ GnuWin32-Users mailing list GnuWin32-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnuwin32-users