News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Linux Assembly IDE

Started by mabdelouahab, April 19, 2022, 06:00:10 AM

Previous topic - Next topic

mabdelouahab

LasmIDE or Linux Assembly Ide, is a simple IDE, i created it for myself to make it easier to program in assembly language in linux environment
Now I wanted to share it with forum members, because they asked me to do this, it is open source, and I do not take responsibility for using it for inappropriate purposes.
The program contains incomplete codes, and I'm glad you participated in its completion
Let's get started
It can be downloaded from:
LasmIde

After downloading, do not forget to convert it to an executable file: chmod +x lasm
After executing, go to Project->Open project -> Browse, the source code it in /projects/lasmIDE folder
   
Requirements:
   gtk+-3.0
   gtksourceview-3.0
   vte-2.91
   cairo



mabdelouahab

Let's go to the project menu -> New Project -> From Template, select a template then press ok
input the new project name then -> OK

mineiro

hello sir mabdelouahab;
Congratulations.
Compiled lasm don't run in my machine because error below:
./lasm: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./lasm)
Version in my machine is below.

So, when I was assembling I receive some errors, I don't know whats ".ifline" do but I commented that lines to be able to assemble:
Projects.inc(41) : Error A2210: Syntax error: .ifline

Next step was install dev to vte and gtksourceview to be able to compile.
Now it runs, I receive some errors in terminal:
(lasm:11704): GLib-GObject-CRITICAL **: 21:03:19.127: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
(lasm:11704): GLib-CRITICAL **: 21:04:18.222: g_key_file_set_string: assertion 'string != NULL' failed
But ok, I can check these things.
With lasm running I was able to assemble and compile lasm again by using IDE. Congrats.

I don't played before with vte and gtksourceview, so, I need time to digest that code.
I can sugest a thing:
I perceive that you have inserted user interface xml (glade) files inside source code. If I need touch that xml I need remove that from code and insert again, this can create some confusion. This is true in the case of icons or others datas. Will be better if xml/icons/... files stay outside code.

In your code:
invoke gtk_builder_add_from_string, GGtkBuilder,addr MainWindowInterface ,-1,addr _err
;invoke gtk_builder_add_from_file  , GGtkBuilder,str$("UASMIde1.glade"),addr _err

I'm suggesting a macro:
file macro name,filename,filesize
    align 16
    name label qword
    incbin <filename>
    filesize equ $-name
endm

So, we can insert any file like:
.data
file GGtkBuilder,UASMIde1.glade,sz_GGtkBuilder

And call that in code like:
.code
invoke gtk_builder_add_from_string, GGtkBuilder,addr MainWindowInterface ,sz_GGtkBuilder,addr _err

I need time to digest code, but looks a great project.  :thumbsup:
I'd rather be this ambulant metamorphosis than to have that old opinion about everything

mabdelouahab

mineiro,
Quote from: mineiro on April 19, 2022, 10:52:28 AM
Compiled lasm don't run in my machine because error below:
./lasm: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./lasm)
Version in my machine is below.
Glib2 Required
Quote from: mineiro on April 19, 2022, 10:52:28 AM
So, when I was assembling I receive some errors, I don't know whats ".ifline" do but I commented that lines to be able to assemble:
Projects.inc(41) : Error A2210: Syntax error: .ifline
redowload mmacros.inc from https://github.com/mabdelouahab/lasmIDE/blob/main/projects/lasmIDE/muasm/mmacros.inc , I Forgot to update it
Quote from: mineiro on April 19, 2022, 10:52:28 AM
Now it runs, I receive some errors in terminal:
(lasm:11704): GLib-GObject-CRITICAL **: 21:03:19.127: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
(lasm:11704): GLib-CRITICAL **: 21:04:18.222: g_key_file_set_string: assertion 'string != NULL' failed
Usual routines are not errors, they come when some input is empty
Quote from: mineiro on April 19, 2022, 10:52:28 AM
I perceive that you have inserted user interface xml (glade) files inside source code. If I need touch that xml I need remove that from code and insert again, this can create some confusion. This is true in the case of icons or others datas. Will be better if xml/icons/... files stay outside code.
A good idea to make it easier to modify the interface without modifying the code, and I have already included that in this case:
Quote from: mineiro on April 19, 2022, 10:52:28 AM
invoke gtk_builder_add_from_string, GGtkBuilder,addr MainWindowInterface ,-1,addr _err
;invoke gtk_builder_add_from_file  , GGtkBuilder,str$("UASMIde1.glade"),addr _err

Thank you,

mineiro

Yes, I know, libc is older in my machine.
$ ldd --version
ldd (Ubuntu GLIBC 2.31-0ubuntu9.7) 2.31
$ /lib/x86_64-linux-gnu/libc.so.6
GNU C Library (Ubuntu GLIBC 2.31-0ubuntu9.7) stable release version 2.31.
$ pkg-config --modversion glib-2.0
2.64.6
...

Downloaded that file and I have assembled sucessfully your editor. Nice.
I'd rather be this ambulant metamorphosis than to have that old opinion about everything

quarantined

Anything this program can do, RichLasm and LasmBasic surely could do better/faster!
:biggrin:

mineiro

hello sir mabdelouahab;
I have added in Tool menu a submenu to pick colors (usefull to themes) and a submenu to change font/font size in text.
I have added from gtksourceview to highlight current line and autocompletion of words.
I'm working now in something like a tooltip, it's working but need show something usefull.

I'm facing some problems with uasm. Sometimes it insert a "sub rsp,8" in an invoke to a function that have 5 parameters as an example, causing stack not stay aligned. Happens two times only today.
Well, I lost some typed code too in lasm, Save menu is not saving file, only if I click on assemble button in toolbar that file get saved.

Will post soon changes.
I'd rather be this ambulant metamorphosis than to have that old opinion about everything

mabdelouahab

hi mineiro
Quote from: mineiro on April 21, 2022, 12:55:10 PM
I'm facing some problems with uasm. Sometimes it insert a "sub rsp,8" in an invoke to a function that have 5 parameters as an example, causing stack not stay aligned. Happens two times only today.
a lot problems  :biggrin:

I added some modifications like: Save, SaveAll, Cut, Copy, Paste, Delete, Find, Replace, ReplaceAll, highlighting matching selection (find by selection), and I have upload the mainwindow.glade and findandreplace.glade

Quote from: mineiro on April 21, 2022, 12:55:10 PM
Will post soon changes.
I'm waiting for you, thanks  :thumbsup:
My problem is that I don't have time to programming :sad:

mineiro

Hello sir mabdelouahab,
INSERT a "-rdynamic" to link these changes:
Link=gcc -o $EXE $OBJ -fno-pie -no-pie -rdynamic

Sorry to make you wait, I program slowly, I made few changes.
Create Color menu. When selecting a color then it is sent as a string to the active editor (#RRGGBB)
Create Font menu. The font and/or its respective size apply only to the current view.
I inserted some hotkeys, <control+f> for the search dialog. You programmed to send the selected text to the search edit box, so I set the default search button. Now select the text, press <control+f>, and press the space key for next occurrences, or just double click word and search by looking.
I created a menu to activate highlight current line and word_wrap as options.
If the word is selected and we press the shortcut key <control+F1>, then the program "Devhelp" is invoked with the respective word help selected.

-incomplete:
If you type "[", then a tooltip will appear next to the current cursor. If you press "]" or "ESC" the tooltip will be disabled. It is incomplete in the sense of being useful. I still intend to populate it.
I have activated word completion, it currently completes words from the current buffer (respective notebook). It helps to type less, but it still needs to be more useful.
So, the idea is that both will work together.
I'd rather be this ambulant metamorphosis than to have that old opinion about everything

mabdelouahab

Quote from: mineiro on April 25, 2022, 06:27:12 AM
Hello sir mabdelouahab,
INSERT a "-rdynamic" to link these changes:
Link=gcc -o $EXE $OBJ -fno-pie -no-pie -rdynamic

Sorry to make you wait, I program slowly, I made few changes.
Create Color menu. When selecting a color then it is sent as a string to the active editor (#RRGGBB)
Create Font menu. The font and/or its respective size apply only to the current view.
I inserted some hotkeys, <control+f> for the search dialog. You programmed to send the selected text to the search edit box, so I set the default search button. Now select the text, press <control+f>, and press the space key for next occurrences, or just double click word and search by looking.
I created a menu to activate highlight current line and word_wrap as options.
If the word is selected and we press the shortcut key <control+F1>, then the program "Devhelp" is invoked with the respective word help selected.

-incomplete:
If you type "[", then a tooltip will appear next to the current cursor. If you press "]" or "ESC" the tooltip will be disabled. It is incomplete in the sense of being useful. I still intend to populate it.
I have activated word completion, it currently completes words from the current buffer (respective notebook). It helps to type less, but it still needs to be more useful.
So, the idea is that both will work together.

great, creative  :thumbsup:
I have added some Template , c and c++ project

mineiro

hello sir mabdelouahab;
I was doing that code folding, it's working only to proc/endp pairs.
Right click above a word and that word will appear in context menu, if you click in that name in menu so will be inserted in file "proto.inc" that string "some_name proto :vararg". An way to quickly play with functions.
Both codes need be rewrite, well, they are working to my needs now.
I inserted in menu help/about a call to inspector.
I'd rather be this ambulant metamorphosis than to have that old opinion about everything

mabdelouahab

hello mineiro
Quote from: mineiro on May 08, 2022, 09:18:00 PM
I was doing that code folding, it's working only to proc/endp pairs.
I'm done with folding, in a different way, using a list of words like: .IF; IF; WHILE; .WHILE; REPEAT; .REPEAT; ";{"; {; UNION; STRUCT; SEGMENT; PROC; MACRO , We can also use fold within fold
Thank you for contributing to the development of the program, I did not pay much attention to it  :thumbsup:

mineiro

Nice, much better solution than my code. I'm only using your editor in linux to code in asm.  :thumbsup:
I will stay 2 or 3 weeks without coding, traveling reasons.
I'd rather be this ambulant metamorphosis than to have that old opinion about everything

K_F

Nice.. been looking for one of these.. will join the fun.
:)
'Sire, Sire!... the peasants are Revolting !!!'
'Yes, they are.. aren't they....'