flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > Windows > How to join the two programs into one?

Author
Thread Post new topic Reply to topic
emkaa1



Joined: 16 Dec 2016
Posts: 5
How to join the two programs into one?
Hello,
I have a two programs in FASM and i would like join them into one program.
For example: in one program I have a tree, on the second program star and I would like that star was over tree in one program as a whole.
Post 16 Dec 2016, 19:40
View user's profile Send private message Reply with quote
system error



Joined: 01 Sep 2013
Posts: 673
The star.asm

Code:
star
mov rax,rcx
ret



The tree.asm

Code:
include "star.asm"
tree:
call star
call exit


'
Post 16 Dec 2016, 23:47
View user's profile Send private message Reply with quote
emkaa1



Joined: 16 Dec 2016
Posts: 5

system error wrote:
The star.asm

Code:
star
mov rax,rcx
ret



The tree.asm

Code:
include "star.asm"
tree:
call star
call exit


'



Where it put in the code?

http://wklej.org/id/2991680/ - star
http://wklej.org/id/2991685/ - tree

[/b]
Post 17 Dec 2016, 15:53
View user's profile Send private message Reply with quote
ManOfSteel



Joined: 02 Feb 2005
Posts: 1135
Welcome to the fasm forum.

Just merge all the different sections of both programs (move all the macros together, the variables, constants, etc.), remove all the code in common and keep a single entry point (main: function).
Post 17 Dec 2016, 20:01
View user's profile Send private message Reply with quote
emkaa1



Joined: 16 Dec 2016
Posts: 5

ManOfSteel wrote:
Welcome to the fasm forum.

Just merge all the different sections of both programs (move all the macros together, the variables, constants, etc.), remove all the code in common and keep a single entry point (main: function).



I don't know how, I gave codes for programs. Could someone do that to make it work?
Please..
Post 17 Dec 2016, 20:04
View user's profile Send private message Reply with quote
ManOfSteel



Joined: 02 Feb 2005
Posts: 1135
You're not going to learn anything like that. Like everything else, you learn by doing, not by us doing your work for you.

We already gave you enough pointers to get you started. So at least try. Assemble the code. See what errors it throws at you. Fix the error if you can. And try again.

Post the updated code if you get stuck.
Post 18 Dec 2016, 10:33
View user's profile Send private message Reply with quote
emkaa1



Joined: 16 Dec 2016
Posts: 5

ManOfSteel wrote:
You're not going to learn anything like that. Like everything else, you learn by doing, not by us doing your work for you.

We already gave you enough pointers to get you started. So at least try. Assemble the code. See what errors it throws at you. Fix the error if you can. And try again.

Post the updated code if you get stuck.



I would ask for help in this task I've tried the above pieces of code to paste into my code, but it did not work. I would ask for an explanation of this example. If someone is able to combine the two programs so that when you turn on one screen were two elements I would ask for help.
Post 21 Dec 2016, 18:58
View user's profile Send private message Reply with quote
system error



Joined: 01 Sep 2013
Posts: 673
@emkaa1

It won't work because you, my son, have to understand the codes first. Only then you can easily combine multiple pieces of source code together according to its logical flow. I don't understand what your code is doing either (part of it because of non-English comment), so it's not that we don't want to help but we may not be able to follow the code's logical flow. ManOfSteel has given you the clues already. Don't let Spiderman jump in.
Post 23 Dec 2016, 18:30
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


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2016, Tomasz Grysztar.