Topic: assembly lang in c++


Author: rtf@cadre.com (Read Fleming)
Date: Tue, 1 Nov 1994 15:03:37 GMT
Raw View
In article u21@bigblue.oit.unc.edu, Topher.Hughes@launchpad.unc.edu (Christopher Hughes) writes:
>Help:
> =-).   I have been asked by a professor to update a class for the
>computer science department at my college. Formerly the class was taught
>using MACRO, the assembler for VAX/VMS. The class is essentially about the
>structure of computers (gates, etc), and low level languages. The
>professor has been...vague...as to his requirements. Im wondering if
>anyone has any opinions as to modelling assembly language code in c++ or
>else actually using the asm command(in borland, but not sure if its
>standard.)
   ...

It sounds to me like the class is about computer architecture and implementation.
If this is the case, C and C++ are tangential to the topic.  You should take
a look at "Computer Architecture: A Quantitative Approach" by John Hennessy
("Mr. MIPS") and David Patterson ("Mr. SPARC"), published by Morgan Kaufman.
That has become the standard text in computer architecture classes and
deservedly so, IMHO.  They also have a new book out, "Computer Organization
and Design: The Hardware/Software Interface."  It's probably more suitable for
a one-semester hardware "fly-by," as it's an easier read for software folk.
A hypothetical RISC machine called DLX that is very close to the MIPS
architecture is used for the examples.  You can get a DLX assembler and
simulator from the publisher or from an ftp site.








Author: Topher.Hughes@launchpad.unc.edu (Christopher Hughes)
Date: 26 Oct 1994 07:07:45 GMT
Raw View
Help:
 =-).   I have been asked by a professor to update a class for the
computer science department at my college. Formerly the class was taught
using MACRO, the assembler for VAX/VMS. The class is essentially about the
structure of computers (gates, etc), and low level languages. The
professor has been...vague...as to his requirements. Im wondering if
anyone has any opinions as to modelling assembly language code in c++ or
else actually using the asm command(in borland, but not sure if its
standard.)

If you have any opinions pls email me either at
topher.hughes@lambada.oit.unc.edu,
    or preferably at
hughesch@vax.dickinson.edu

I also read these newsgroups regularly, so if you feel this is something
appropriate for posting, Ill see it there too.


Thank you much for your timeand consideration, as well as badwidth.


     Topher Hughes
--
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Launchpad is an experimental internet BBS. The views of its users do not
necessarily represent those of UNC-Chapel Hill, OIT, or the SysOps.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --




Author: Topher.Hughes@launchpad.unc.edu (Christopher Hughes)
Date: 26 Oct 1994 07:10:39 GMT
Raw View
mea culpa....the first address should be

topher.hughes@launchpad.unc.edu

sorry.
--
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Launchpad is an experimental internet BBS. The views of its users do not
necessarily represent those of UNC-Chapel Hill, OIT, or the SysOps.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --




Author: Kimbal.Welch@bsis.com (Kimbal Welch)
Date: 27 Oct 1994 17:04:31 GMT
Raw View
In article <38kv81$u21@bigblue.oit.unc.edu>, Topher.Hughes@launchpad.unc.edu (Christopher Hughes) says:
>
>Help:
>        =-).   I have been asked by a professor to update a class for the
>computer science department at my college. Formerly the class was taught
>using MACRO, the assembler for VAX/VMS. The class is essentially about the
>structure of computers (gates, etc), and low level languages. The
>professor has been...vague...as to his requirements. Im wondering if
>anyone has any opinions as to modelling assembly language code in c++ or
>else actually using the asm command(in borland, but not sure if its
>standard.)

-- I like open discussions so I'll post --

I've found it is much easier, clearer and re-useable to write the bulk of
system oriented code in C/C++ and resort to assembler only when I absolutly
have to. I have done a great deal of assembler development as well as C and C++.
Nearly every bit of assembler code I have written has had to be re-written in
C because it was unmaintainable (not because I didn't write good structured assembler,
but because its hard to find a good assembly programmer.)

Yes I am slightly off the subject.

As for a class, unless you are actually teaching assembler I would stick with C
since C structures and function calls are easier to understand than assembler.
I'm not sure I would use C++ since this introduces encapsulation, and you are
not trying to hide the system but expose it for examination. In many cases C is
very close to assembler. You will of course need some inbedded assembler or calls
to linked assmebler routines when executing CPU operations not available under the
C language.