flat assembler
Message board for the users of flat assembler.
Index
> Windows > NVCUDA.DLL - making import 64 bits libs |
Author |
|
tthsqe 30 Mar 2014, 17:39
It is probably failing because you need to define the label 'cuda'
FASM is no way pre-aware of the functions in nvcuda.dll http://board.flatassembler.net/topic.php?t=13293 my source file Code: ... section '.idata' import data readable writeable library kernel32,'KERNEL32.DLL',\ user32,'USER32.DLL',\ msvcrt,'MSVCRT.DLL',\ cuda,'NVCUDA.DLL' include 'api\kernel32.inc' include 'api\user32.inc' include 'api_cuda.inc' import msvcrt,\ sprintf,'sprintf' api_cuda.inc: Code: import cuda,\ cuArray3DCreate,"cuArray3DCreate",\ cuArray3DGetDescriptor,"cuArray3DGetDescriptor",\ cuArrayCreate,"cuArrayCreate",\ cuArrayDestroy,"cuArrayDestroy",\ cuArrayGetDescriptor,"cuArrayGetDescriptor",\ cuCtxAttach,"cuCtxAttach",\ cuCtxCreate,"cuCtxCreate",\ cuCtxDestroy,"cuCtxDestroy",\ cuCtxDetach,"cuCtxDetach",\ cuCtxGetDevice,"cuCtxGetDevice",\ ... |
|||
30 Mar 2014, 17:39 |
|
catafest 31 Mar 2014, 14:15
@tthsqe: yes . is your code ... I don't trying to steal your code . I try to understand how is working when return messages ( I make one by one your steps).
The problem came when I don't use the label . In this example I use label . If I remove it will got error - I just used sprints function: Code: format PE64 GUI 5.0 entry start include 'win64a.inc' section '.text' code readable executable start: push rbp lea rdi,[Message] cld mov rax,'--------' stosq mov rax,'oats: x' stosq mov rax,' lg2.a' stosq mov rax,'pprox.f3' stosq mov rax,'2(x) ' stosq mov rax,'fyl2x(x,' stosq mov rax,'1.0)x ' stosq mov al,10 stosb invoke MessageBox,NULL,Message,NULL,MB_OK invoke ExitProcess,0 .Print: mov rdx,[rbx+0] mov qword[Message+0],rdx mov rdx,[rbx+8] mov qword[Message+8],rdx mov edx,[rbx+16] mov dword[Message+16],edx mov byte[Message+19],10 mov rdx,[rax+0] mov qword[Message+20],rdx mov rdx,[rax+8] mov qword[Message+28],rdx mov rdx,[rax+16] mov qword[Message+36],rdx mov rdx,[rax+24] mov qword[Message+44],rdx mov rdx,[rax+32] mov qword[Message+52],rdx mov edx,[rax+40] mov dword[Message+60],edx mov byte[Message+62],0 invoke MessageBox,NULL,Message,NULL,MB_OK invoke ExitProcess,0 section '.data' data readable writeable align 16 Message rb 50*60 section '.idata' import data readable writeable library kernel32,'KERNEL32.DLL',\ user32,'USER32.DLL',\ msvcrt,'MSVCRT.DLL',\ cuda,'NVCUDA.DLL' include 'api\kernel32.inc' include 'api\user32.inc' import msvcrt,\ sprintf,'sprintf' |
|||
31 Mar 2014, 14:15 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.