flat assembler
Message board for the users of flat assembler.

Index > High Level Languages > C++ or ASM

Goto page 1, 2, 3, 4, 5  Next
Author
Thread Post new topic Reply to topic
Barf



Joined: 17 Sep 2004
Posts: 34
Location: Poland
Barf
Hi. I have dilema. I have started lerning C++ because everybody( who program in high-level languages) sais, that it is more movable between OSs and processor architectures. In C++ types of variables makes me mad. Assembler is much easier for me. I don't know if that motive have any meaning when i want to program for Windows? I don't know is it worth to learn this stupid language Smile
Post 06 Apr 2006, 09:49
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
i personally dislike C++
it's too overfeatured, IMO bad design.

if you want some high level OOP language then think about java or C#, something clear.
Post 06 Apr 2006, 10:27
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Barf



Joined: 17 Sep 2004
Posts: 34
Location: Poland
Barf
Thanks. i'll try Smile
Post 06 Apr 2006, 11:27
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
but be aware that these are not compiled directly to machine language. java is usually interpreted at runtime, and C# (as .NET language) is compiled at runtime (at is called JIT - just in time compiled). I don't know any other widespread OOP language than C++ that compiles to machine language
Post 06 Apr 2006, 11:37
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
TmX



Joined: 02 Mar 2006
Posts: 822
Location: Jakarta, Indonesia
TmX
what about Delphi (OOP'ed Pascal) ?
Post 06 Apr 2006, 11:47
View user's profile Send private message Reply with quote
fox



Joined: 04 Apr 2006
Posts: 3
fox
I think they compile to machine language.. but you are better away from them. Delphi is the OOP version of Pascal, and it was mainly supported by Borland. But Borland has abandonned it..

u should really stick and learn C++.. if u are use from all the power of ASM, then you wont find that in many other languages Wink
Post 06 Apr 2006, 12:19
View user's profile Send private message Visit poster's website Reply with quote
Barf



Joined: 17 Sep 2004
Posts: 34
Location: Poland
Barf
Delphi? Never:) it' so unoptimal. Empty program taking 300kB of space? no thanks. So Maybe i will continue learning C++ Smile. Maybe I will get accustomed to this silly types of variables Smile
Post 06 Apr 2006, 13:26
View user's profile Send private message Reply with quote
RedGhost



Joined: 18 May 2005
Posts: 443
Location: BC, Canada
RedGhost
Barf wrote:
Delphi? Never:) it' so unoptimal. Empty program taking 300kB of space? no thanks. So Maybe i will continue learning C++ Smile. Maybe I will get accustomed to this silly types of variables Smile


i would stick to asm, and when its required you need processor/os portability use C (not C++)

_________________
redghost.ca
Post 06 Apr 2006, 14:32
View user's profile Send private message AIM Address MSN Messenger Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
Barf: My friend delphist said he can create 9Kb delphi executable, but he must tear-off tons of things in some project settings.
Post 06 Apr 2006, 14:42
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
ronware



Joined: 08 Jan 2004
Posts: 179
Location: Israel
ronware
Barf: what are you most interested in? If you want to get a job programming, then learning C++ will get you hired. C# is starting to become in-demand to some extent also. If you want to get work done, but have nice access to low-level when you need it, I'm partial to my own Reva Forth... it's built using FASM and is quite small and Linux/Windows cross-platform. If cross-platform is your main thing, Java or perl or python would be good choices, depending on what you want to do.
Post 06 Apr 2006, 14:47
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
in our country SQL, PHP, java/C# are sure hit for work. but such work is boooooooooooooooooooooooooooooooooooooooooooring
Post 06 Apr 2006, 14:52
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Plue



Joined: 15 Dec 2005
Posts: 151
Plue
fox wrote:
I think they compile to machine language.. but you are better away from them. Delphi is the OOP version of Pascal, and it was mainly supported by Borland. But Borland has abandonned it..

That's not true. A simple console hello world I made here is 9 216 bytes. I also speed tested Delphi against gcc some time ago, and it produces faster code.

The exes are only big if you use the predefined library of GUI components. This is the same for any language. An hello world compiled with gcc: 509 576 bytes
Code:
#include <cstdlib>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
    system("PAUSE");
    return EXIT_SUCCESS;
}    


And I don't think it's abandoned, they just released Delphi 2006.

_________________
Roses are red
Violets are blue
Some poems rhyme
And some don't.
Post 06 Apr 2006, 16:07
View user's profile Send private message Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2140
Location: Estonia
Madis731
...and it doesn't even say "Hello!" Wink
That is because the high-level languages tend to hold most API information inside the main executable. I don't know is it some kind of optimization or just to be sure that Windows's API-change won't make a difference Razz

I don't know how and why it is done, but I've seen strips from know DLLs inside my main executable (I used DevC++ long ago...) so the calls were made to my executable. However, I got the executable finally under 16KB Wink

Comparison to assembly <=> I can't get my projects much bigger than 5KB Smile
Post 07 Apr 2006, 07:54
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
Kain



Joined: 26 Oct 2003
Posts: 108
Kain
Assemby can be cross portable across OSes at least. The most important component is a portable library. See the fasmlib project and the HLA standard library for more details (the latter is already portable between Windows/Linux and contains dozens of routines that can be accessed from FASM sources).
Post 08 Apr 2006, 05:21
View user's profile Send private message Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2140
Location: Estonia
Madis731
When portability is bad is when there are major architectual differeces. Then you won't EVER take the most out of the current architecture you're working on Sad
Post 08 Apr 2006, 08:23
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
Kain: wow, at least somebody else realized this. Assembly code is not portable among across different processor architectures, but it's portability across OSes is JUST SAME as portability of C, C++, C#, Java and others. That's main reason for FASMLIB, to show this in reality
Post 08 Apr 2006, 09:09
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
okasvi



Joined: 18 Aug 2005
Posts: 382
Location: Finland
okasvi
for OOP I'd go for D

_________________
When We Ride On Our Enemies
support reverse smileys |:
Post 08 Apr 2006, 11:13
View user's profile Send private message MSN Messenger Reply with quote
Kain



Joined: 26 Oct 2003
Posts: 108
Kain
vid:
Even architecture is becoming less of an issue. Apple has made the switch to x/86 and already I've seen several Macs with x/86 processors running Mac applications. With x/86 you're probably looking at 95% of the computer market.
We may even see a FASMmac in the future!
Post 08 Apr 2006, 21:51
View user's profile Send private message Reply with quote
silkodyssey



Joined: 02 Oct 2003
Posts: 198
Location: St.Vincent & the Grenadines
silkodyssey
Python supports OOP with a very simple syntax compared to C++.

_________________
silkodyssey
Post 08 Apr 2006, 22:39
View user's profile Send private message MSN Messenger Reply with quote
Vortex



Joined: 17 Jun 2003
Posts: 318
Vortex
MS Visual C++ Toolkit 2003 and PellesC can create small executables sized 1 Kb without using C run-time startup code.

_________________
Code it... That's all...
Post 09 Apr 2006, 15:54
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2, 3, 4, 5  Next

< 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


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.