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
 

Macro .FOR and .ENDFOR, I have realized that some of people are not interested in x64 so I decided to change it because I would like you to test it

habran
Quote Post


Extremely Active Member
******

Group: Members
Posts: 165
Member No.: 10778
Joined: 2-August 08


Hi,

I have realized that some of people are not interested in x64 so I decided to change it because I would like you to test it and decide if we can use it as a standard please give me a feedback and suggestions if any.

Here are some examples:
CODE
xstrlenA PROC wpString:PTR CHAR
 .if (!wpString)
  xor eax,eax
  jmp aexit
 .endif
 .for (eax=wpString:BYTE PTR[eax]:eax++)
 .endfor
 sub eax,wpString
aexit:
 ret
xstrlenA ENDP
profor!xstrlenA:
00401194 55              push    ebp
00401195 8bec            mov     ebp,esp
00401197 837d0800        cmp     dword ptr [ebp+8],0
0040119b 7504            jne     profor!xstrlenA+0xd (004011a1)
0040119d 33c0            xor     eax,eax
0040119f eb12            jmp     profor!xstrlenA+0x1f (004011b3)
004011a1 8b4508          mov     eax,dword ptr [ebp+8]
004011a4 eb03            jmp     profor!xstrlenA+0x15 (004011a9)
004011a6 83c001          add     eax,1
004011a9 803800          cmp     byte ptr [eax],0
004011ac 7402            je      profor!xstrlenA+0x1c (004011b0)
004011ae ebf6            jmp     profor!xstrlenA+0x12 (004011a6)
004011b0 2b4508          sub     eax,dword ptr [ebp+8]
004011b3 c9              leave
004011b4 c20400          ret     4
;----------------------------------------------------------------------
xstrlenW PROC wpString:PTR wchar_t
 .if (!wpString)
  xor eax,eax
  jmp aexit
 .endif
 .for (eax=wpString:WORD PTR[eax]:eax+=2)
 .endfor
 sub eax,wpString
 sar eax,1
aexit:
 ret
xstrlenW ENDP
;----------------------------------------------------------------------

profor!xstrlenW:
004011b7 55              push    ebp
004011b8 8bec            mov     ebp,esp
004011ba 837d0800        cmp     dword ptr [ebp+8],0
004011be 7504            jne     profor!xstrlenW+0xd (004011c4)
004011c0 33c0            xor     eax,eax
004011c2 eb15            jmp     profor!xstrlenW+0x22 (004011d9)
004011c4 8b4508          mov     eax,dword ptr [ebp+8]
004011c7 eb03            jmp     profor!xstrlenW+0x15 (004011cc)
004011c9 83c002          add     eax,2
004011cc 66833800        cmp     word ptr [eax],0
004011d0 7402            je      profor!xstrlenW+0x1d (004011d4)
004011d2 ebf5            jmp     profor!xstrlenW+0x12 (004011c9)
004011d4 2b4508          sub     eax,dword ptr [ebp+8]
004011d7 d1f8            sar     eax,1
004011d9 c9              leave
004011da c20400          ret     4
and here is the source code:


Attached File ( Number of downloads: 37 )
 Login or Register to download

Sponsored Links
PMEmail Poster
Top
habran
Quote Post


Extremely Active Member
******

Group: Members
Posts: 165
Member No.: 10778
Joined: 2-August 08


Have fun
PMEmail Poster
Top
habran
Quote Post


Extremely Active Member
******

Group: Members
Posts: 165
Member No.: 10778
Joined: 2-August 08


do you find it useful?
PMEmail Poster
Top
ragdog
Quote Post


Extremely Active Member
******

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


Interest nice ida must i test it
PMUsers Website
Top
Slider
Quote Post


Extremely Active Member
******

Group: Moderators
Posts: 313
Member No.: 5004
Joined: 11-May 07


QUOTE (habran @ Apr 12 2012, 04:02 PM)
do you find it useful?

Is your avatar Bruce Lee ?
PMEmail Poster
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options 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