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
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 )

Write some C++ code in Assembly, can someone please show me the assembly equivalent of this C/C++ code?

polishgang
Quote Post


New Member
*

Group: Members
Posts: 4
Member No.: 25083
Joined: 3-August 09


hey shoorik it should
be not

CODE
je  @F


but

CODE
je  @@


is this write?

Sorry for my english im a newbie

PMEmail Poster
Top
XeS
Quote Post


Extremely Active Member
******

Group: Members
Posts: 253
Member No.: 15879
Joined: 3-December 08


je @F would jump if Zero flag is set to the following --> @@: <-- label!

je @B would jump if Zero flag is set to the label ahead!

ex.:

CODE

mov eax,10
@@:
dec eax
cmp eax,eax
je @B:


CODE

cmp eax,eax
je @F:
 mov eax,ebx
@@:


CODE

proc somation x
  mov eax,[x]           ;copy stackvalue to eax
  cmp eax,1              ;compare eax with 1
  je  @F                    ;if eax (value of x) equals 1 then go to return
  dec eax                  ;else dec x
  stdcall somation,eax;and call somation again
  add eax,[x]             ;add eax, value of x if it returns from it's call
@@:    
ret
endp


Maybe this will help you!

Regards,

XeS
PMEmail PosterUsers WebsiteICQ
Top
polishgang
Quote Post


New Member
*

Group: Members
Posts: 4
Member No.: 25083
Joined: 3-August 09


Thanks for the fast answer.
PMEmail Poster
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