flat assembler
Message board for the users of flat assembler.

Index > Main > I need quick help on my small project

Author
Thread Post new topic Reply to topic
Dody



Joined: 25 Aug 2008
Posts: 7
Dody
Hello ..


i need someone to help me to write this program since im just a learner and beginner on that , so the program about writing ur ID number and make it up side down with the program ...

for Example , my id Number is (10002154) , i want the program to show me that nmber as ( 45120001)

_________________
Life is Short , lets hold hands
Post 25 Aug 2008, 01:01
View user's profile Send private message Reply with quote
Dody



Joined: 25 Aug 2008
Posts: 7
Dody
can someone give any clue ?
Post 25 Aug 2008, 01:05
View user's profile Send private message Reply with quote
asmhack



Joined: 01 Feb 2008
Posts: 431
asmhack
-i think you should post this topic in another section-
here is one simple method
of course there are many more, but for the moment you can use that...
hope you can assemble that, have fun Razz


Code:
include 'win32ax.inc'

_id db '10002154',0 ;your id
_di rb 256          ;your buffer to store the reversed id (you can change the size of the buffer, current size can hold 255 bytes + the null terminating string byte, see above)

.code
go:

invoke lstrlen,_id ;get the length of your id

cmp    eax,0       ;if length is zero or we have problems...
jbe    @@exit      ;...then exit

mov    ecx,eax     ;store the length in ecx

add    eax,_id     ;eax = address of id + length of id = the pointer to the end of the id string
dec    eax         ;length = length - 1 (we don't need the null terminating byte)

                   ;now we have just to copy every byte from id to our buffer by starting reading from the end of the id

mov    esi,_di     ;esi = pointer to the buffer

@@copy:
mov    bl,byte[eax] ;bl = byte from _id (eax is the pointer to the id)
mov    byte[esi],bl ;store to the buffer (esi is the pointer to the buffer)

inc    esi          ;increase pointer
dec    eax          ;decrease pointer

dec    ecx          ;decrease length
cmp    ecx,0        ;and check until we reach the start
jnz    @@copy       ;if not then loop


invoke MessageBox,0,_id,_id,0 ;display
invoke MessageBox,0,_di,_di,0
@@exit:
invoke ExitProcess,0          ;exit
.end go 
    
Post 25 Aug 2008, 02:54
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
Quote:

-i think you should post this topic in another section-

And have a patience of more than 4 minutes before re-asking Confused
Post 25 Aug 2008, 03:08
View user's profile Send private message Reply with quote
Dody



Joined: 25 Aug 2008
Posts: 7
Dody
allright thanks for the help , but i couldnt make that in the program " flat assembler" . when i click on RUN , it told there an Error , or in other word "File not found "

Sad

_________________
Life is Short , lets hold hands
Post 25 Aug 2008, 07:58
View user's profile Send private message Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2141
Location: Estonia
Madis731
There's also an edit button Idea
Post 25 Aug 2008, 08:42
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17278
Location: In your JS exploiting you and your system
revolution
Hmm, homework help again. We should have a special sub-forum for these.

Please please help to write my program so I don't have to do anything. I'm just too lazy to actually learn how to do it myself so you guys need to do it all for me. Thanks a bunch, you're all wonderful people.
Post 25 Aug 2008, 11:27
View user's profile Send private message Visit poster's website Reply with quote
Dody



Joined: 25 Aug 2008
Posts: 7
Dody
Buddy thanks for ur effort , yet im still trying to assemble what u wrote up , im useing slat assembler 1.67.27 ... Plz tell me the way to assemble that


Thnxxx again

_________________
Life is Short , lets hold hands
Post 25 Aug 2008, 17:59
View user's profile Send private message Reply with quote
Dody



Joined: 25 Aug 2008
Posts: 7
Dody
Flat Assembler 1.67.27
Post 25 Aug 2008, 17:59
View user's profile Send private message Reply with quote
okasvi



Joined: 18 Aug 2005
Posts: 382
Location: Finland
okasvi
Did you ever read fasm.pdf?
Post 25 Aug 2008, 20:22
View user's profile Send private message MSN Messenger Reply with quote
asmhack



Joined: 01 Feb 2008
Posts: 431
asmhack
dody, in your fasm directory there is a file called fasmw.ini
open it with notepad and add the following line at the end:
Code:
[environment]
include=C:\fasmw\INCLUDE
    

(include=your directory\INCLUDE)
Post 25 Aug 2008, 20:45
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
Another way of solving this homework could be implementing the intToStr in the simpler but wrong way Wink (unless ID 001234 != 1234)
Post 25 Aug 2008, 20:48
View user's profile Send private message Reply with quote
Dody



Joined: 25 Aug 2008
Posts: 7
Dody
well , i tried to add that into the Dictionary yet nothing was solved , I NEED QUICK HELP AS MY LABLE IMPLIESSSSS


Sad

_________________
Life is Short , lets hold hands
Post 25 Aug 2008, 21:13
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17278
Location: In your JS exploiting you and your system
revolution
Dody: People don't take kindly to being rushed. If you have some urgent deadline that is your problem, not ours. If we seem less than enthusiastic to help you it is because you are rushing us and demanding we do your work for you. We also have our own deadlines and work to do.

I suggest you take a deep breath, relax, and have a look at some of the examples in the fasm download, read the manual to see how to get fasm running, then, after you can assemble an example, you can make your program and do the necessary testing. This is the normal learning process. You won't learn anything by simply taking other peoples work and passing it off as your own.
Post 25 Aug 2008, 21:22
View user's profile Send private message Visit poster's website Reply with quote
Dody



Joined: 25 Aug 2008
Posts: 7
Dody
ok ok am sorri then , i won;t be here next time

Thank u
Post 26 Aug 2008, 02:46
View user's profile Send private message Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2141
Location: Estonia
Madis731
Dody wrote:
ok ok am sorri then , i won;t be here next time

Thank u

He didn't mean that, actually. Just that it seems you rushed in on this board and started asking urgent help to (what seems to be) homework. You are welcome to add content to this board and we usually help people. Its just polite to start in a more quieter manner
Thank You and I hope you will be back!

_________________
My updated idol Very Happy http://www.agner.org/optimize/
Post 26 Aug 2008, 06:34
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
rCX



Joined: 29 Jul 2007
Posts: 166
Location: Maryland, USA
rCX
What OS do you want to make this program for?
Post 26 Aug 2008, 13:18
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.