Confession: I never did ASM

I would love to join the recently started confession fest.

I’ve got a similar problem as Jay, but in a totally different domain.
Having started as a script kiddo - what kind of book can introduce me
in the beautiful but-oh-so-scary world of things like bit shifts,
number representations, registers and that 0xF of them all, so that I
can (not too urgently) start in C with at least some level of self-
confidence and understanding?

Is there some kind of book like “Everything you should know about the
Von Neumann machine to get by unscathed without brain damage” or so?
Except Donald Knuth because I also have a day job to fulfill :slight_smile:

julik wrote:

Von Neumann machine to get by unscathed without brain damage" or so?
Except Donald Knuth because I also have a day job to fulfill :slight_smile:

Straight from the horse’s mouth:

http://www.cs.unc.edu/~adyilie/comp265/vonNeumann.html

:slight_smile: :slight_smile: :slight_smile:

And no, I never met Von Neumann but I did write software for an
original Von Neumann machine – ILLIAC I :).

On Sep 27, 2007, at 1:21 AM, M. Edward (Ed) Borasky wrote:

confidence and

http://www.cs.unc.edu/~adyilie/comp265/vonNeumann.html

:slight_smile: :slight_smile: :slight_smile:

And no, I never met Von Neumann but I did write software for an
original Von Neumann machine – ILLIAC I :).

WOW, that’s some classically fluffed up academic writing…

On Thu, 27 Sep 2007 14:21:49 +0900, julik wrote:

I’ve got a similar problem as Jay, but in a totally different domain.
Having started as a script kiddo - what kind of book can introduce me
in the beautiful but-oh-so-scary world of things like bit shifts,
number representations, registers and that 0xF of them all, so that I

Wow, that’s a tough one today. When I did assembler (or machine
language,
as many pointed out it should more properly be called), it was the next
natural step for a beginner too advanced for BASIC, and there were many,
many “ML for Beginners” books - in fact, I think I recall one titled
just
that from Compute! Books.

These days, I’m not sure that there are many beginner assembler
resources,
since it’s more a tool of game designers, firmware developers, etc.
Also,
assembler is much, much more complicated these days, with multi-core,
hyperthreading, pipelines, caches, microcodes, out-of-order execution,
branch prediction, and what-not. The 6502 had only 56 instructions
(plus
some undocumented combination ones), and order and execution time were
guaranteed. I imagine there’s some college coursework material
somewhere.

If you want to be totally anachronistic, you could download a Commodore
64
emulator, and find copies of the old Compute! books; I think at least
one
of them is now a free PDF. Look for Jim Butterfield, Richard Mansfield,
Tom Halfhill.

Just remember: $FFD2 is CHROUT, $FFE4 is GETIN, and $C000 is a great
place
to put code.

Jay L. wrote:

These days, I’m not sure that there are many beginner assembler resources,
since it’s more a tool of game designers, firmware developers, etc. Also,
assembler is much, much more complicated these days, with multi-core,
hyperthreading, pipelines, caches, microcodes, out-of-order execution,
branch prediction, and what-not. The 6502 had only 56 instructions (plus
some undocumented combination ones), and order and execution time were
guaranteed. I imagine there’s some college coursework material somewhere.

Beginner: Guide to Assembly Language Programming in Linux, Sivarama P.
Dandamudi

Advanced: (way advanced) http://www.agner.org/optimize

I don’t know of anything in between, but I’m sure there is something. :slight_smile:

On Thu, Sep 27, 2007 at 02:21:49PM +0900, julik wrote:

Neumann machine to get by unscathed without brain damage" or so? Except
Donald Knuth because I also have a day job to fulfill :slight_smile:

There are two aspects to ASM. One is how to write efficient ASM code,
which
is mainly covered by the code generation and optimization sections of
good
compiler books (read the Dragon book). The other is just understanding
the
low-level language of the processor, and for this I recommend finding a
copy of spim (MIPS simulator) and a quick reference guide to the
instructions (MIPS is very much a RISC chip, emphasis on Reduced, so
there
is a very manageable set of instructions to remember).

If that’s a bit too steep to climb on your own (I had it fed to me in
college, after all, so I wouldn’t blame you), look for course web pages
at
various respected universities that involve teaching MIPS assembly. They
should have some good guidance.

–Greg

John J. wrote:

too urgently) start in C with at least some level of self-confidence and

http://www.cs.unc.edu/~adyilie/comp265/vonNeumann.html

:slight_smile: :slight_smile: :slight_smile:

And no, I never met Von Neumann but I did write software for an
original Von Neumann machine – ILLIAC I :).

WOW, that’s some classically fluffed up academic writing…

You did see the date, right? Von Neumann died in 1957. That paper, as
well known as it is, was pretty tough to track down in HTML. Remember,
he was a theoretical and applied mathematician for decades before he
turned to “computer engineering”. If you think it’s “classically fluffed
up academic writing,” you ought to see some of his papers on Hilbert
spaces. :slight_smile:

There was actually a second paper on programming the machine, which is
even harder to find. I have a printed copy somewhere, but I haven’t
found it on line yet.

John J. wrote:

me in

original Von Neumann machine – ILLIAC I :).
There was actually a second paper on programming the machine, which is
even harder to find. I have a printed copy somewhere, but I haven’t
found it on line yet.

Sorry Ed, think we crossed wires. I was talking about the Priess piece
somebody posted a link to earlier. The guy “translated” his “web book”
(think 1993 web sites) to 8 or 9 programming languages, but it all seems
rooted in C++ so it just doesn’t make sense with Ruby (let alone most of
the others)

Ah … yes … the Priess book is junk, even the clean and “published”
versions. The Ruby version is a tad worse than the originals.

Programming From The Ground Up - An Introduction to Programming using
Linux
Assembly Language is quite good.

But if you’re looking to start programming in C, why not just start
programming in C?

I’ve always liked the O’Reilly Practical C book and, of course, The C
Programming Language (K&R) is a classic and well worth the read. And I
seem
to have lost my copy :-/

MBL

On Sep 27, 2007, at 11:01 PM, M. Edward (Ed) Borasky wrote:

number
Except Donald Knuth because I also have a day job to fulfill :slight_smile:
And no, I never met Von Neumann but I did write software for an

There was actually a second paper on programming the machine, which
is even harder to find. I have a printed copy somewhere, but I
haven’t found it on line yet.

Sorry Ed, think we crossed wires. I was talking about the Priess
piece somebody posted a link to earlier. The guy “translated” his
“web book” (think 1993 web sites) to 8 or 9 programming languages,
but it all seems rooted in C++ so it just doesn’t make sense with
Ruby (let alone most of the others)

Michael Bevilacqua-Linn wrote:

Programming From The Ground Up - An Introduction to Programming using
Linux
Assembly Language is quite good.

Although my link to the free Priess book didn’t seem to go over well,
here is a link to a free version of this book:

http://www.computer-books.us/assembler_6.php

David B. Williams
http://www.cybersprocket.com

On 29-sep-2007, at 5:25, David B. Williams wrote:

Although my link to the free Priess book didn’t seem to go over well,
here is a link to a free version of this book:

http://www.computer-books.us/assembler_6.php

Lovely! Just what I needed. Thanks alot.

On 29-sep-2007, at 19:05, Brian A. wrote:

What’s wrong with this group? No one has mentioned K&R ???

I don’t want to go doing C just yet without having some understanding
of what it is doing.
Moreover, without these fundamentals C looks like a pile of terrible
klunky gunk to me, the workings of
which I can neither understand nor use. That’s what I am trying to
resolve in the first place, hoping that
understanding the machine will help me wrap my head around the
gunkiness and klunkiness (by at least
knowing that it is justified).

Brian A. wrote:

On Sep 27, 1:21 am, julik [email protected] wrote:

so that I
can (not too urgently) start in C with at least some level of self-
confidence and understanding?

What’s wrong with this group? No one has mentioned K&R ???

Actually someone did. :slight_smile: I don’t think there is any reason to buy
another book on C. K&R is C!

Julian T. wrote:

resolve in the first place, hoping that
understanding the machine will help me wrap my head around the gunkiness
and klunkiness (by at least
knowing that it is justified).

I think at some point (probably coincident with the “RISC revolution” in
processor design) machine architectures, compilers and the C language
became inextricably intertwined. To a lesser extent, Unix also got
intertwined into the mix, although there were a number of other
operating systems that leveraged off of this, one of which – Windows NT
– still thrives.

So I’m not sure you can separate the gunkiness and clunkiness of
assembler and C any more. At least for the Intel and AMD x86-64
architectures, there’s some marvelously detailed information at
http://www.agner.org/optimize on both C++ and assembler level gunkiness
and clunkiness.

On Sep 27, 1:21 am, julik [email protected] wrote:

so that I
can (not too urgently) start in C with at least some level of self-
confidence and understanding?

What’s wrong with this group? No one has mentioned K&R ???

Not often that I get to quote myself!

I’ve always liked the O’Reilly Practical C book and, of course, The C
Programming Language (K&R) is classic and well worth the read. And I
seem
to have lost my copy :-/

MBL

On Sep 29, 2007, at 12:05 PM, Brian A. wrote:

On Sep 27, 1:21 am, julik [email protected] wrote:

so that I
can (not too urgently) start in C with at least some level of self-
confidence and understanding?

What’s wrong with this group? No one has mentioned K&R ???

Somebody did, but the one criticism we can always leverage against
K&R is that it is not a beginner’s introduction to C. Before going
into data structures or algorithms in K&R, it is important to first
get a grasp of the C language.
Unfortunately, not all of the stuff in K&R is applicable to Ruby. You
can try to write C or C++ style in Ruby but it always shows.
Sometimes it might be appropriate (a begin-end-while in Ruby when you
would have a do-while in C/C++) but Ruby has its own devices that
generally make more sense in Ruby code.

Michael Bevilacqua-Linn wrote:

On Sep 27, 1:21 am, julik [email protected] wrote:

so that I
can (not too urgently) start in C with at least some level of self-
confidence and understanding?

What’s wrong with this group? No one has mentioned K&R ???

What I what I would like to know within 20-30 years…

http://www.cs.utah.edu/~elb/folklore/mel.html

TerryP.

Terry P. wrote:

On Sep 27, 1:21 am, julik [email protected] wrote:

TerryP.

I will have to admit hand-optimizing for a drum machine (IBM 650)
although I did let the assembler do the rest of the things it could
do.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs