Author Topic: Editors  (Read 24824 times)

aw27

  • Guest
Re: Editors
« Reply #30 on: January 29, 2019, 01:50:25 PM »
Actually this is mostly a semantic distinction. Nowadays, compilers don't produce assembly code to be passed to an Assembler. They generate the machine code directly. So a compiler is also an Assembler from the point of view of the end result -≥ machine code production. The trend is to bypass middlemen whenever possible and save money, the same as in real life.
The important distinction is between compilers/assemblers and interpreters, not between compilers and assemblers.  :biggrin:

felipe

  • Member
  • *****
  • Posts: 1381
Re: Editors
« Reply #31 on: January 29, 2019, 02:57:48 PM »
Actually this is mostly a semantic distinction. Nowadays, compilers don't produce assembly code to be passed to an Assembler. They generate the machine code directly. So a compiler is also an Assembler from the point of view of the end result -≥ machine code production.

i don't think so, compilers that don't translate to assembly first, will translate to some sort of intermediate code anyway. especially if after that, the compiler will try to produce optimized code...:idea:

aw27

  • Guest
Re: Editors
« Reply #32 on: January 29, 2019, 03:39:19 PM »
i don't think so, compilers that don't translate to assembly first, will translate to some sort of intermediate code anyway. especially if after that, the compiler will try to produce optimized code...:idea:

Nope, you are wrong. Almost every compiler produces object code directly. Object code is machine code waiting to be linked with other modules, including ones produced by assemblers.  Of course, compilers can generate Assembly Language output, but will not use it for their production of the object code.
The fact that compilers transform HLL languages into machine code by stages, even through intermediate languages, is not relevant - users don't have access to that and must consider it a processing artifact.
« Last Edit: January 29, 2019, 04:54:16 PM by AW »

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 10583
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Editors
« Reply #33 on: January 29, 2019, 04:50:36 PM »
32 bit CL.EXE used to have the option to output assembler code and while it was scruffy looking stuff, it generally worked OK. It was a reasonable way to get a C algo, output it as asm then optimised the asm as well as tidy it up.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

aw27

  • Guest
Re: Editors
« Reply #34 on: January 29, 2019, 05:05:36 PM »
32 bit CL.EXE used to have the option to output assembler code and while it was scruffy looking stuff, it generally worked OK. It was a reasonable way to get a C algo, output it as asm then optimised the asm as well as tidy it up.
It still does. Sometimes we can get smaller executables simply by using an Assembler on that.
For speed is more difficult but some times possible.
It is not always possible, if I provide some pseudo code and tell an ASM programmer, even a good one, to code it without checking what a C/C++ compiler would do, most times the compiler will do better. So, trying to see first what the compiler does and optimize on it may be fruitful. Trying to beat it blindly will likely be a failure.  :biggrin:

TimoVJL

  • Member
  • *****
  • Posts: 1320
Re: Editors
« Reply #35 on: January 29, 2019, 05:37:23 PM »
gcc still uses as.

@HSE
Quote
An assembler translates assembly code to machine code.
All assemblers are (simple) compilers, since they transform one language to another.
EDIT:
Quote
The word assembler is used to describe programs that translate directly between assembly language and machine code. Assembly language is a human readable representation of machine code.
« Last Edit: January 29, 2019, 09:59:39 PM by TimoVJL »
May the source be with you

HSE

  • Member
  • *****
  • Posts: 2501
  • AMD 7-32 / i3 10-64
Re: Editors
« Reply #36 on: January 29, 2019, 08:58:43 PM »
Machine code is not a representation but the real thing, then is not a language.
Equations in Assembly: SmplMath

daydreamer

  • Member
  • *****
  • Posts: 2399
  • my kind of REAL10 Blonde
Re: Editors
« Reply #37 on: January 30, 2019, 03:51:25 AM »
Actually this is mostly a semantic distinction. Nowadays, compilers don't produce assembly code to be passed to an Assembler. They generate the machine code directly.
Use your webcam to take a picture of your favourite "compiler"  :greenclp:
Isn't that what an assembler programmer do? A compilers job
I like qeditor,but sometimes coded asm inline in VS,once tried eclipse for app tutorial,was slow
« Last Edit: January 30, 2019, 07:00:13 AM by daydreamer »
my none asm creations
http://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

felipe

  • Member
  • *****
  • Posts: 1381
Re: Editors
« Reply #38 on: January 30, 2019, 06:32:42 AM »
The fact that compilers transform HLL languages into machine code by stages, even through intermediate languages, is not relevant - users don't have access to that and must consider it a processing artifact.

There's where i disagree. precisesly that fact is what has enable compilers to jump from a sort of intermediate language to object code (without using assembly). i don't care about users here, we were talking about compilers... :idea:

felipe

  • Member
  • *****
  • Posts: 1381
Re: Editors
« Reply #39 on: January 30, 2019, 06:35:56 AM »
if I provide some pseudo code and tell an ASM programmer, even a good one, to code it without checking what a C/C++ compiler would do, most times the compiler will do better. So, trying to see first what the compiler does and optimize on it may be fruitful. Trying to beat it blindly will likely be a failure.  :biggrin:

Nope, you are wrong.

aw27

  • Guest
Re: Editors
« Reply #40 on: January 30, 2019, 07:14:17 AM »
There's where i disagree. precisesly that fact is what has enable compilers to jump from a sort of intermediate language to object code (without using assembly). i don't care about users here, we were talking about compilers... :idea:

This the petroleum refinery paradigm. I say that gasoline comes from petroleum and you say no-no, gasoline is obtained from a light petroleum distillate.

aw27

  • Guest
Re: Editors
« Reply #41 on: January 31, 2019, 04:30:00 AM »
I also like to see compiler messages ;)
Me too, but if it builds without errors, they should disappear after a few seconds to let me concentrate on my code again.

Notepad++ can call a batch file to make the building. No further sophistication needed.

TimoVJL

  • Member
  • *****
  • Posts: 1320
Re: Editors
« Reply #42 on: January 31, 2019, 04:58:47 AM »
NppExec is a nice plugin, a movable console window.

https://sourceforge.net/projects/npp-plugins/files/

EDIT:
goto errorline, use NppExec Console Filters HighLight mask %ABSFILE%(%LINE%) : error*
May the source be with you

jj2007

  • Member
  • *****
  • Posts: 13957
  • Assembly is fun ;-)
    • MasmBasic
Re: Editors
« Reply #43 on: January 31, 2019, 05:18:38 AM »
Notepad++ can call a batch file to make the building. No further sophistication needed.

Np++ has so many menus, I can't find the "build" entry. Btw if there is a build error, does it jump to the offending line in the source?

aw27

  • Guest
Re: Editors
« Reply #44 on: January 31, 2019, 06:51:30 AM »
Notepad++ can call a batch file to make the building. No further sophistication needed.

Np++ has so many menus, I can't find the "build" entry. Btw if there is a build error, does it jump to the offending line in the source?
There is a menu item Run, which you set to invoke a batch file for instance. You can give it a name and associate a hotkey too.  The batch file makes the build and should  Pause in the end to allow you to see what happened. When there is an error you are told the line number of the error. Notepad ++ numbers the lines on the side by default. So, you go there and fix. No automatic gear box, it is just a manual gearbox.  :t