WinAsm Studio, The Assembly IDE - Free Downloads, Source Code
Sponsors
Articles
Programming Quick Start
32-bit Assembler is Easy
Porting Iczelion tutorials
What is FASM
What is FASM G
Hard Drive Recovery
Wiring your own LAN
Personal menu
Welcome Guest
User:
Pass:
Register!
Resend Validation Email
 
Forum
Pages (2) [1] 2   ( Go to first unread post )

C to Masm translation, I need a little help to convert a c source in masm32, please help.

ragdog
Quote Post


Extremely Active Member
******

Group: Moderators
Posts: 892
Member No.: 5019
Joined: 13-May 07


Hi Guys

I need a little help to convert a c source in masm32

CODE
char toto[20];
   
wsprintf(toto,"%u.%02u (%02u/%02u/%04u)",Version.byDLLMajorVersion, Version.byDLLMinorVersion, Version.byDay, Version.byMonth, Version.wYear);

SetDlgItemText(hwndDlg, IDC_DLL_VERSION, toto);


I write this in masm

CODE
Version STRUCT
     byDLLMajorVersion   BYTE ?
     byDLLMinorVersion   BYTE ?
     byMajorVersion      BYTE ?
     byMinorVersion      BYTE ?
     byDay               BYTE ?
     byMonth             BYTE ?
     wYear               WORD ?
Version ENDS


invoke wsprintf,addr,toto ,CTEXT ("%u.%02u -%02u/%02u/%04u"),Version.byDLLMajorVersion, Version.byDLLMinorVersion, Version.byDay, Version.byMonth, Version.wYear


this works not i must write

CODE
;                     movzx eax, Version.byMinorVersion
;                     push eax
;                     movzx eax,Version.byMajorVersion
;                     push eax
;                     push offset szFrm1
;                     push offset hVersion
;                     call wsprintf


Why can me any tell me?

greets

Sponsored Links
PMUsers Website
Top
SeaFarer
Quote Post


Extremely Active Member
******

Group: Members
Posts: 1753
Member No.: 1464
Joined: 2-September 05


Hi raggy.

I remember seeing this information gathered by one of Ewayne Wagner's programs. I believe it was his FileMan program. He included sources.

Here is a link...

http://asmedit.massmind.org/

Look under "Other Programs" at bottom of page.

:msc
PM
Top
ragdog
Quote Post


Extremely Active Member
******

Group: Moderators
Posts: 892
Member No.: 5019
Joined: 13-May 07


Hi Sea B)

I have look on this source i cannot find any function about this
or what mean you?
PMUsers Website
Top
ragdog
Quote Post


Extremely Active Member
******

Group: Moderators
Posts: 892
Member No.: 5019
Joined: 13-May 07


I think this wsprintf function cannot convert a 8 bit integer

correct?

and why can this ,this c source?
PMUsers Website
Top
SeaFarer
Quote Post


Extremely Active Member
******

Group: Members
Posts: 1753
Member No.: 1464
Joined: 2-September 05


I am not sure since I am not a C/C++ person.

And without checking, you must be right. So...

If it was not one of Ewayne's programs, then perhaps it was Donkey's?

Donkey wrote a Explorer type File Manager/Viewer with a properties dialog for files.

I do not have a current link. Perhaps you can scour around and find a link to his site.

Last I recall Donkey was a registered member here, maybe even PM him?

Sorry I was not very helpful so far. :(

And...

Where is uncle shoorick when you really need him? :unsure: Usually shoo would be right on a topic such as this.

PM
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Pages (2) [1] 2  Reply to this topicStart new topicStart Poll

 

Sponsors
Computer Science

Internet
C/C++
Hardware & PC maintenance

HiEditor

General Discussions
Suggestions/Bug Reports
WinAsm Studio

General Discussions
Suggestions/Bug Reports
WinAsm Studio FAQ
Multilingual User Interface
Add-Ins
Assembly Programming

Main
Newbies
Projects
Custom Controls
Snippets
Announcements & Rules

Announcements

General

Online Degrees - Distance Learning
The Heap
Russian
Google