include master_ml64.inc
includelib msvcrt.lib
HINSTANCE typedef QWORD
.const
;a macro as prototype ?
MessageBox MACRO hWnd:REQ,lpText:REQ,lpCaption:REQ,uType:REQ
IFDEF __UNICODE__
MessageBoxW PROTO
invoke MessageBoxW, hWnd,lpText,lpCaption,uType
ELSE
MessageBoxA PROTO
invoke MessageBoxA,hWnd,lpText,lpCaption,uType
ENDIF
EXITM<> ;better look ()
ENDM
.data
salut db "salut",0
titre db "titre",0
;-------------------
.LISTALL
.code
WinMain proc hInst:HINSTANCE,hPrevInst:HINSTANCE,lpCmdLine:XMASM,nShowCmd:DWORD
MessageBox ( NULL,addr salut,addr titre,MB_OK)
ret
WinMain endp
end
Yves,
Its an old idea, I think Erol (Vortex) designed it about 10 years ago. It works but to make a comprehensive set, you would have to write a macro for every API and that would end up finished for Windows 3000.
Quote from: hutch-- on May 03, 2021, 08:18:13 PMto make a comprehensive set, you would have to write a macro for every API
Not a big deal, these macros could be generated. The resulting file would have about 3MB. I'm not sure whether I would like it, though :cool:
The other problem is you would have to have 2 of them so you could handle the function form as well as the statement form.
Quote from: hutch-- on May 03, 2021, 09:05:57 PM
The other problem is you would have to have 2 of them so you could handle the function form as well as the statement form.
The function form is enough. You can use void (https://www.jj2007.eu/MasmBasicQuickReference.htm#Mb1213) if you don't need the return value.
30 000 macros to write isn't a problem for me
It can be made with the extraxted list of protototypes from the windows sdk.
Have a look on this list (With the names of header) who as no duplicate or a very few number.
The name of headers is a better choice than the name of lib because msdn refer to header more than lib.
The zip is a 7Z,because 7Z is not accepted.
Some look a bit unfamiliar, Yves, but overall you've done an excellent job :thumbsup:
ChainesEgales PROTO chaine1:DWORD ,chaine2 :DWORD,mode:DWORD
chercherChaine PROTO Debut:DWORD,Contenant:DWORD,Chercher:DWORD,Methode:DWORD
ChercherMotBornes PROTO Debut:DWORD,AdrPerdu:DWORD,AdrChercher:DWORD,Methode:DWORD,\
CmpChainLen PROTO pchain1:DWORD, pchain2:DWORD, methode:DWORD,longueur:DWORD
TraduireGuide PROTO pguid:DWORD, adrNom:DWORD
LettreAvantLettreApresmot PROTO adrmot:DWORD, adrphrase:DWORD ,position:DWORD
DateTimeToString PROTO pdt:PTR DATETIME, pszDateTime:PTR BYTE
GetLocalDateTime PROTO pdt:PTR DATETIME
FormatLocalDateTime PROTO pchainReponse:DWORD
LongZtexte PROTO Debut:DWORD
Limites PROTO value:DWORD
MaitreTexte PROTO Hfenetre:DWORD,FichierAnalyse:DWORD,Infotextascii:DWORD,\
Mid PROTO adrtitre:DWORD,decale:DWORD,longueur:DWORD
ScrutationFichierTexte PROTO InfoT:DWORD
CompteurLignes PROTO pmem:DWORD,taille:DWORD
Quote from: TouEnMasm on May 03, 2021, 10:19:15 PM
30 000 macros to write isn't a problem for me
It can be made with the extraxted list of protototypes from the windows sdk.
Nidud maked that some years ago in AsmC.
It's very interesting for C translation, because syntax is exactly that of C :thumbsup:.
Quote from: HSE on May 03, 2021, 11:19:12 PMIt's very interesting for C translation, because syntax is exactly that of C :thumbsup:.
But it breaks old code and makes you dependent on new includes. I also like the option to search a fat source for
invoke.
Quote
Some look a bit unfamiliar, Yves, but overall you've done an excellent job
Those who lok unfamiliar are of of my personnal library,I will not include them in the pack.
Just joking, Yves :thup:
Hi HSE,
QuoteIt's very interesting for C translation, because syntax is exactly that of C
Kindly, could you expain why there are very few people who translated the whole MS SDK header files to assembly?
Quote from: jj2007 on May 03, 2021, 11:24:44 PM
But it breaks old code and
I don'
t think so.
Quote from: jj2007 on May 03, 2021, 11:24:44 PM
makes you dependent on new includes.
I don't pay attention if it's in includes or AsmC build that when read includes. Anyway, for compatibility reasons almost never used.
Quote from: Vortex on May 03, 2021, 11:47:06 PM
Kindly, could you expain why there are very few people who translated the whole MS SDK header files to assembly?
Sorry, C translation is "C source code translation"
Header files translation is "madness" ? :biggrin:
Hi HSE,
QuoteHeader files translation is "madness" ?
No worries. Exactly, that's the problem : The C\C++ header file set is very complicated. Translating them to asm is a very big job.
There is another option for anyone who can write a reasonable parser, select the start of an API or similar function in your own assembler code then scan the function call from its start to its end. Count the arguments then refer to a fast access list to get the argument count.
A relatively straight forward tool to make and if you had it set up in the editor of your choice, you would place the cursor on the function name and just press a key and it would come back as an argument count plus any other information you wanted to attach to the function call.
Making the fast lookup list would take a lot of work but it could be done.
:skrewy:
It seems that "Windows 3000." is going on.
After filtering with the contents of the libraries,I get 16029 functions and 489 files.
I need to made a little more tests,that all.