flat assembler
Message board for the users of flat assembler.

Index > Heap > Few questions on assembly language and machine dependency.

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
qwerc



Joined: 23 Mar 2013
Posts: 3
qwerc
sleepsleep wrote:
Quote:

What is the work of an assembler then?

translator,

ok I get it now. Since assembly gets exactly translated to machine, it can be considered as machine language itself.
The whole point of portability here depends on the huge variations in the instructions in the assembly of one architecture to another.
Post 24 Mar 2013, 15:18
View user's profile Send private message Reply with quote
HaHaAnonymous



Joined: 02 Dec 2012
Posts: 1180
Location: Unknown
HaHaAnonymous
[ Post removed by author. ]


Last edited by HaHaAnonymous on 28 Feb 2015, 21:17; edited 1 time in total
Post 24 Mar 2013, 16:06
View user's profile Send private message Reply with quote
HaHaAnonymous



Joined: 02 Dec 2012
Posts: 1180
Location: Unknown
HaHaAnonymous
[ Post removed by author. ]


Last edited by HaHaAnonymous on 28 Feb 2015, 21:16; edited 1 time in total
Post 24 Mar 2013, 16:08
View user's profile Send private message Reply with quote
nyrtzi



Joined: 08 Jul 2006
Posts: 192
Location: Off the scale in the third direction
nyrtzi
qwerc wrote:

related to assembly language and HLL and their dependency on processor.


qwerc wrote:

It converts the assembly code to machine code, then how come code written in HLL is said to be portable and that in assembly is not?


The first quote from you answers the question in the second one i.e. you already answered your own question.
HLL source code is "source level portable" exactly because it is not dependent on the processor.
Instead for example C code targets an abstract C-machine while assembly language (symbolic machine language or something similar) targets a specific processor or processor family (all the hardware that is binary compatible with it).

Others already brought up the issue of what "portability" actually means.
"Source code level" portability is different from "byte code level" portability and "binary level" portability.
Then again if you are emulating different hardware in software (a virtual machine) there is not much difference between byte code and binary.
Also one could also say that binary and byte code are merely interpreted by a virtual or hardware processor.
And if you have the right kind of parser there is no reason why you couldn't for example interpret C++ code.
So in the end the terms and way things are categorized makes things easier to talk about but then again to me that seems a bit superficial as
in the end all we are talking about is executing data as code with different kinds of machines/mechanisms/etc.

In the same way the talk about compilers, translators, interpreters, etc. seems a bit meaningless. In the end all that happens is that one machine (in a generic sense) reads data, acts on it and then possibly outputs something. One machine executes the code to perform the actions described in it while another one executes it in a way that produces a binary or byte code executable that does something (usually what the code says that should happen).
Post 24 Mar 2013, 19:34
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

< 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 can attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.