Converting assembly code to Easy Code projects

Started by Ramon Sala, September 24, 2005, 11:44:47 AM

Previous topic - Next topic

Ramon Sala

Hi all,

The following are some notes in order to convert any assembly code in an Easy Code project,
both classic or visual:



- First of all remove any directives like the following ones:

   .386
   .486
   .586
   .mmx
   .model flat,stdcall
   option casemap:none




- Then remove any 'Include' directive line referencing the 'Windows.inc'. For example:

   include windows.inc


   This is absolutely necessary in order to avoid errors at compile time, since Easy Code ALWAYS
   includes the 'Windows.inc' file by default.



- Other 'Include' and 'Library' files may be in your code. For example:

   include kernel32.inc
   include user32.inc

   include MyFile.inc

   
   or

   includelib kernel32.lib
   includelib user32.lib

   include MyFile.lib



   But, if so, remove them from the 'Include' and 'Library' nodes, in the Project Explorer,
   in order not to make the size of the final file bigger than needed. However, the best you can do
   is adding them in the related nodes, in the Project Explorer, and remove the corresponding
   lines in your code.



- No Prototypes are needed in Easy Code as the IDE takes care of them. For example:

   WinMain Proto hInst:HINSTANCE, hPrevInst:HINSTANCE, CmdLine:LPSTR, CmdShow:DWORD


   Although Prototypes do not cause any error, you can remove them.



- Take care of the following options (checked by default) in the Project properties window:

   Include MACROS.ASM file from MASM32
   Enable using Easy Code internal macros
   Make all variables global (visible from any module)



   - The first one includes the MACROS.ASM file in all windows and modules in the project.
   - The second one enables using the Easy Code internal macros (see Easy Code help).
   - Finally, the third one (only available in classic projects) allows you to make all variables
     global to the whole project, so you do not have to write any 'Extern' and/or 'ExternDef'
     directive in your code.


   If any macro conflicts with any other existing name in the project (see Easy Code help for
   internal macro names), you can avoid it by unchecking the corresponding check boxes, so
   that the related macros are not included. On the other hand, if you do not want variables
   to be global, uncheck the 'Make all variables global (visible from any module)' option.




An example of the RS Edit Dll editor is attached in two ways. One shows how to compile the file manually and the EasyCode folder contains the project ready to be built by Easy Code. You can see everything said here just by having a look to both files.

Thanks for your attention and enjoy Easy Code!

Ramon


[attachment deleted by admin]
Greetings from Catalonia