Author Topic: How to add a new Module  (Read 5593 times)

sys64738

  • Regular Member
  • *
  • Posts: 32
How to add a new Module
« on: October 13, 2013, 04:48:47 AM »
I wanted to create a second OBJ file with some helper functions for my project. I added a file which shows up as "Module" stdlib, but somehow it doesn't seem to get compiled.

So how do I add an additonal module? Is there a sample project with at least two ASM files, I could look at?



dedndave

  • Member
  • *****
  • Posts: 8808
  • Still using Abacus 2.0
    • DednDave
Re: How to add a new Module
« Reply #1 on: October 13, 2013, 05:49:41 AM »
it depends on how you are building your project
if you are using an IDE or QEditor - things are handled different ways

myself, i prefer the use of batch files, and i make a special one for each project (from a batch template)
you simply need to assemble each ASM file to create an OBJ,
then "add them together" on the LINK command line
you could also do it through the use of the MAKE utility, or maybe by creating a special command file

LINK [options] [files] [@commandfile]

in simplest form, it might look something like

ML [options] file1.asm
ML [options] file2.asm
LINK [options] file1.obj file2.obj

sys64738

  • Regular Member
  • *
  • Posts: 32
Re: How to add a new Module
« Reply #2 on: October 13, 2013, 05:59:00 AM »
I'm using the EasyCode IDE, that's why I posted in this subforum. :)

Well, it seems that my other module was not assembled, because there were errors in another module. So does EC only assemble until the first error? is this different with include files? Because the main asm file was assembled, had an error, an include file was also assembled and had an error, but the second module was not assembled, until I removed the errors.

dedndave

  • Member
  • *****
  • Posts: 8808
  • Still using Abacus 2.0
    • DednDave
Re: How to add a new Module
« Reply #3 on: October 13, 2013, 06:01:02 AM »
I'm using the EasyCode IDE, that's why I posted in this subforum. :)

sorry - i didn't catch that   :redface:

K_F

  • Member
  • *****
  • Posts: 1402
  • Anybody out there?
Re: How to add a new Module
« Reply #4 on: October 15, 2013, 08:45:32 AM »
From what I can see the assembler gives up after a certain number of errors - I'm not sure whether you can set this number.

As an example:-
I did a previous compile which was perfect..
Decided on a few changes and the assembler gave up after a shyte-load of errors - my eyes popped out.
Regained my composure.. and found that I'd stuffed up my .IF constructs....

So it happens... check through your last edit session.
'Sire, Sire!... the peasants are Revolting !!!'
'Yes, they are.. aren't they....'

rsala

  • Moderator
  • Member
  • *****
  • Posts: 273
    • Easy Code
Re: How to add a new Module
« Reply #5 on: October 17, 2013, 10:01:13 AM »
Hi sys64738,

Could I see your project? If not, could you post the content of the output window showing the errors? Thanks.

Regards,

Ramon
EC coder