Home
Forum
Downloads
Link To Us
Programming Tools
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
Forum
Home
Forum
Assembly Programming
Main
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.
Track this topic
|
Email this topic
|
Print this topic
ragdog
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
SeaFarer
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
ragdog
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?
ragdog
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?
SeaFarer
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.
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
«
Next Oldest
|
Main
|
Next Newest
»
Pages (2)
[1]
2
Close Topic Options
Track this topic
Receive email notification when a reply has been made to this topic and you are not active on the board.
Subscribe to this forum
Receive email notification when a new topic is posted in this forum and you are not active on the board.
Download / Print this Topic
Download this topic in different formats or view a printer friendly version.
Forum Home
Search
Help
Announcements & Forum Rules
- Announcements, Forum Rules & Guidelines
WinAsm Studio
- General Discussions
- Suggestions/Bug Reports
- WinAsm Studio FAQ
- Multilingual User Interface
- Add-Ins
HiEditor
- General Discussions
- Suggestions/Bug Reports
Assembly Programming
- Main
- Newbies
- Projects - Source Code
- Custom Controls
- Snippets
Computer Science
- C/C++
- Internet
- Hardware & PC maintenance
General
- Online Degrees - Distance Learning
- The Heap
- Russian
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