View Full Version : Assembly
maslan
hi guys
i have question.
Is there is an assembler for linux can be used to make
X Application or using Gtk+ or Qt ?
i didn't found great use of assembly in linux (i know it was written in C) but assembly is the best programming language
i used it before to program in DOS and Windows
i made some GUI programs 4 windows using masm,tasm,nasm.
so.
bye
;)
ErrorMsg
the is gnu asm for linux but it's not very famous
and it come with most distro
here is why it's not famous
----
gnu C/C++ (gcc/g++) is faster than any asm more over any compiler on earth!!
how is that?
when I was using windowz/dos I notice that the fastest prog's are made with asm then C then C++ then far away BASIC
this is correct if we are taking about M$-VC or Borland C
---
but when I move to gnu/linux world I see the other side if the lake
in VC/borlandC they have poor(fake) optimization
you won't get a differ from optimz or non-optimzed coded
but in gcc there is a real optimization using sort of AI
it check your code and then see if it can do it in other ways
to save space and speed in the same-time
since the gnu compilers knows about the processers more about you it will be faster than if you use asm your self
gcc knows about intel processer even more than intell (gcc optimez better than intell optimzer!!)
gcc can give you a .asm file from the .c++ file so you can
run gnu asm on it but it won't make a differnce
and you get the speed of asm with the portablity of C++
since linux-apps is designed to work with all processers
if it's re-compiled to them not just the x86,ppc's
a windowz proof:
there is a small gcc for windowz called minigw
shipped with dev-cpp( www.bloodshed.net ) a C++ IDE for windowz
down load it and make a simple prog in it go to options
then select no debug code , best optimz check,top level optmz
then compile it,then put them back to normal,
then do the same with M$ VC (with or with out optimz)
you may get
M$-VC : 260K with and with out opt
minigw : 165K with no opt
minigw : 51K with opt !!!!
------------
C/C++ is the best programming language
use g++ in linux and dev-cpp in windowz
maslan
hi ErrorMsg
thanks 4 ur reply
but i love assembly not for only speed but i found my self in it
i can take control on every step it's really nice
thanks
bye
:)
ErrorMsg
if you like asm this site will help you
http://linuxassembly.org
http://linuxassembly.org/resources.html
but even they says about why/when asm is good
you can produce reasonably fast code for tight loops to cope with a bad non-optimizing compiler (but then, there are free optimizing compilers available!)
have a nice asm
----
maslan
:)
thnaks 4 the site
maslan
hi
these site only contain basic assembly tut. for linux
but i need a tut. to use GUI or Gtk+ using assembly
4 example using nasm or gas.
& i found a good site 4 assembly lovers
it contains an GUI Operatin system written entirely in assembly
it's the fastest at all.
it contain LEMU (the linux emulator) to run elf programs on it
surprise :
:)
it only fits 1 disk (1.44 MB)
u must see it if u wanna learn assembly
http://www.menuetos.org/
:)
Thanks Bye
maslan
i forgot
if u need a screen shot u will find on it's site
or as an attachement here.
bye
;)
ShErbO
Hmm correct me if I'm wrong, but isn't GTK+ made for C++ programming ? I think you can't do it in assembly....
maslan
:)
Gtk+ is written for C programing but we can use this libgtk+
in assembly as we used windows lib & dlls in assembly
by just linking the lib which is a kind of object file & the object file of the source file together so we can use this lib.
have got it
& sorry for saying windows don't be angry
bye
;)
ShErbO
lol
ok man thx for correcting me :)
and good luck !!
joe_lite
hi all men
it's an ordinary function call my dear,if u really know assembly ,then u must know how to call function from a library(only add an underscore b4 the function name,this is the way gcc do it's staff),this will work fine for GTK+ but with QT u have to knowthe exact function name in the final .so file as it undergo name mangling during compilation
joe
maslan
:)
i know that
but i didn't try it.
i thought it will not work.
i didn't know that gcc does as Visual C++.
& thank you.
but there is only something which is
is there is any C# (C Sharp) from gnu ?
bye
;)
mohamed
http://www.go-mono.com/rationale.html
maslan
;)
Then what's ur comment ?
:)
ErrorMsg
Menuetos is great
Thanx ,I goto the link and download it and try
1st I thought it was a miss-spell or something 1.4MB GUI OS
but then it was real , it deserve a separate post in the general forum
The menuetos is great , fast, .. etc
but it's not a full featured OS as I think
only fat, only SB , only vesa(genric slow driver), no loadable drivers
and you can compar it with dos-shell (any one remember it)
but not with linux/windowz
it's really fast this because it's one peice
not because it's asm
I think if they make it with gcc it will be faster !!
(note: it's really fast with the usual but I think copying,moving,swaping if any is not -as i imagin- that fast)
---
LEMU: how can I run that -it can't see ext2..-
mash: what is the commands that I can use -only cls works ,ls clear,.. did not work-
the GUI is look good, but it's very simple
alaa
actually 1.4MB is quite large, PalmOS is a full graphical OS with loads and its less than 200KB (as of version 3.5, MFA can tell you how big the full color version 4 is).
does anyone know how big a typical ucLinux installation is??
cheers,
Alaa
maslan
don't forgot something
it's with it's source code.:)
alaa
what are you atlking about its in asembler, its as good as disassembling PalmOS, the real difference off course is in the permissive license (I assume it has one), and maybe some comments.
cheers,
Alaa
ErrorMsg
Ooooops
menuet???
As any asm program it is buggy and not trustable and portable
it did not work with my test machine i486 -they say it should work with i386 ha -
---
the palOS I'll tell you when I test it
--
about who to find some GUI progs for linux in asm
write small one with C -using glade for example-
then tell the gcc to output it with human readable asm
alaa
PalmOS is made for the PDA's I doubt you can run it on your i486 :-)
maslan
the best os is the faster the stronger
and when the os is written in asm it gains the speed
but the power it's from the developer.
& menuetos is a beta version 0.74 so it must contain bugs
and it's active .
i know other os written in assembly but the their projects ended
sadly & badly
www.v2os.cx
www.dsos.cjb.net
www.pizzi.cjb.net
but they r not GUI
another thing menuet os loads GUI the first thing
it dosen't load kernel or dos like command.
so if u wanna to test it's real speed just do the following
u must have a dos drive
copy msetup on ur c:\
boot from the floppy and choose ur boot from hd
u will fell a femto second only untill it loads.
but the only bad thing is that it uses fat so it willnot have security and stability as linux (the reason 4 me to choose linux)
so they must change it's FS may be later.
so they r thanked for making there free os
& i said 1st it's for developers who learn assembly
& about PalmOs it's only runs on PDA not any 80x386 or later
so leave ur lives
bye
:p :D :)
maslan
:)
http://www3.mandrakelinux.com/en/92beta.php3
see ur self
:p
alaa
is it actually possible to load the GUI before the kernel?? or are we using different definitions to kernel here??
cheers,
Alaa
maslan
:)
i mean some low level & 16 bit real mode 32 bit mode
but linux GUI is loaded as a program after loading the kernel 1st
:p
alaa
yeah but I thought you had to load the kernel first before you could do anything useful.
so maybe you could put the GUI in the kernel (not a wise choice IMO) but to load the GUI then the kernel this makes no sense at all.
this is assuming that the kernel is the piece of code that does low level stuff like memory management low level IO etc.
cheers,
Alaa
ErrorMsg
take this asm howto
http://www.tldp.org/HOWTO/Assembly-HOWTO/index.html
vBulletin v3.0.1, Copyright ©2000-2004, Jelsoft Enterprises Ltd.