View Single Post
  #67  
Old September 12th 17, 04:05 AM posted to rec.bicycles.tech
John B.[_3_]
external usenet poster
 
Posts: 5,697
Default program to compute gears, with table

On Mon, 11 Sep 2017 16:00:39 +0200, Emanuel Berg
wrote:

John B. wrote:

Sometime in 1980 Epson wanted to license the
software to run on their PX-8 that used
a built in LCD display. The application would
have to run from 48Kb of ROM.

They rehired the Programmer, John Barnaby,
who had earlier left the company, at a salary
of $100 an hour (1980 dollars, today $297 ).
The project was completed in two weeks,
whereupon Barnaby left the company again.


Assembler isn't really a programming language
in the modern sense, it is more like you say
exactly what the computer should do at a very
low level, down to manually moving data in and
out of CPU registers, just to do for example
basic arithmetics!

It is sometimes used today in combination with
a high-level language (like C) to provide
immediate access to CPU hardware on top
of that.

Today, using a high-level language like
C doesn't really put you at
a speed-disadvantage compared to using
assembler, because the compiler will perform
all sorts of optimizations. So if the
programmer writes sound code and picks
a sound implementation, any hacks left unturned
to get that extra juice can be left to the
compiler to optimize.


That isn't true at all. I have definitely improved the speed of a C
program by using an assembler language sub routines and even had two C
compilers that would compile the same program into two different sizes
that performed the same "test" program at two different speeds.

And I remember a "payroll program" that we developed in Pascal that
ran so slowly that we had to rewrite nearly all the in/out stuff in
assembler.

You want to go back to writing code for a single core CPU screaming
along at 1 Mhz :-)



Perhaps John Barnaby could do it by moving
individual data items back and forth but for
mere mortals it is an open question if any
performance benefits will follow. Not to
mention (or I will mention it) it will take
some 10 or 100 times the longer to write.

Here is some assembler I wrote some 10 years
ago:

http://user.it.uu.se/~embe8573/os/asm.S

--
Cheers,

John B.

Ads
 

Home - Home - Home - Home - Home