NASM - The Netwide Assembler

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1] 2 3 ... 10
 1 
 on: January 21, 2017, 09:31:57 AM 
Started by stressful - Last post by Frank Kotler
My mistake - it is down.

Best,
Frank


 2 
 on: January 21, 2017, 03:38:49 AM 
Started by stressful - Last post by Frank Kotler
Hi Stressful,

Seems okay to me. Try it again.

Best,
Frank


 3 
 on: January 21, 2017, 03:17:07 AM 
Started by stressful - Last post by stressful
I think it has been a week or so. Hope it can be restored soon.
 

 4 
 on: January 14, 2017, 10:12:41 PM 
Started by soulvomit - Last post by soulvomit
double post

 5 
 on: January 14, 2017, 10:10:02 PM 
Started by soulvomit - Last post by soulvomit
Here is my NASM implementation of A* pathfinding. It is fast and light weight. The NASM source code is platform neutral and doesn't use any syscalls or external APIs. The wrappers, however, are Windows specific! I am currently working an ELF assembled shared object for Linux. Use cases for this project could be; logistics, game AI development or robotics.

Here is the git repo for the entire project:
https://github.com/Soulvomit/Orome-Pathfinder
(Includes: documentation, native and managed windows wrappers, threading system, test applications and the core NASM source code)

I've attached the core NASM source code, without all the bells and whistles.

Any optimization suggestions would be much appreciated.
Any help generating a Linux shared object library, would be much appreciated.

 6 
 on: January 13, 2017, 11:48:48 PM 
Started by ben321 - Last post by ben321
Hi ,

From the NASM Manual (6.2.4)
The IMPORT directive takes two required parameters, separated by white space, which are (respectively) the name of the symbol you wish to import and the name of the library you wish to import it from. For example:
          import WSAStartup wsock32.dll

A third optional parameter gives the name by which the symbol is known in the library you are importing it from, in case this is not the same as the name you wish the symbol to be known by to your code once you have imported it. For example:

          import asyncsel wsock32.dll WSAAsyncSelect

Looks to be related to your query.

Regards,
Mathi.

Ever tried to compile a program with the target system being win32, when your asm code contains the IMPORT directive? It just doesn't work. It gives an error about how you can't use IMPORT. I think you have to select a different target type than win32, but then it can't run properly in Windows. To work around the lack of the ability to use IMPORT, I've simply used EXTERN for the function, and then I make sure to include the name of the DLL file that has that function, in the command line for the linker. The linker I'm using us is GoLink, because it takes actual DLL file names as command line parameters, and looks in each one until it finds one that exports function being requested in the object file that is output from NASM. It's requested in the object file, because of the use of the use of the EXTERN directive. It doesn't require an import library as other linkers (such as ALink) require, making it a much easier linker to use, and gets around the problem of the IMPORT directive not working in NASM's win32 mode.

Without using the IMPORT directive, and only using the EXTERN directive, is it possible to alias the name of a function in a DLL file in NASM?

 7 
 on: January 13, 2017, 06:14:20 PM 
Started by Teol - Last post by Teol
Thanks, but i dont see how this helps.
For example if i have string with these characters: €®€ it is in binary:
11100010 10000010 10101100 11000010 10101001 11100010 10000010 10101100

If i read "three" actually four bytes for the euro sign
I have in eax the following
11100010 10000010 10101100 11000010


Doing the bitwise and as you suggested:
Code: [Select]
and eax,0xffffffMeans the following:

11100010 10000010 10101100 11000010
                 11111111 11111111 11111111
--------------------------------------------------------
00000000 100000010 10101100 11000010

Am i right?

 8 
 on: January 13, 2017, 04:46:44 PM 
Started by Teol - Last post by dreamCoder
Code: [Select]
mov eax,dword[source]
and eax,0xffffff

 9 
 on: January 13, 2017, 03:47:58 PM 
Started by Teol - Last post by Teol
Hello,
I´m trying to read UTF-8 characters starting from certain memory address until i get linefeed char. Problem is that since UTF-8 has variable bit length i need to read different number of bytes depending on the first byte. How can i "mov"  three bytes? mov eax, word [source] is too little. mov eax, dword [source] is too many bytes and would result in me having the first byte for the another character.
Only solution i know involves bit shifts, but is there other ways which are more faster than doing shifts?

Thanks for reading and replies.

 10 
 on: January 12, 2017, 12:07:02 PM 
Started by ben321 - Last post by Mathi
Hi ,

From the NASM Manual (6.2.4)
The IMPORT directive takes two required parameters, separated by white space, which are (respectively) the name of the symbol you wish to import and the name of the library you wish to import it from. For example:
          import WSAStartup wsock32.dll

A third optional parameter gives the name by which the symbol is known in the library you are importing it from, in case this is not the same as the name you wish the symbol to be known by to your code once you have imported it. For example:

          import asyncsel wsock32.dll WSAAsyncSelect

Looks to be related to your query.

Regards,
Mathi.

Pages: [1] 2 3 ... 10