"Nobody programs in machine language" (was: Modern Electronics(was

From: Bert Thomas <bert_at_brothom.nl>
Date: Tue Jun 22 04:21:52 2004

Fred Cisin wrote:
>
> This fall, I get to teach Assembly Language again! (after 2 years)
> They've scheduled it for Saturday morning, which sucks,
> but it's still worth it.
>
> I need to make some decisions about some of the content.
> Should I include discussion of the .Net IL assembler?

I'm not sure. I hate proprietary microsoft stuff, therefore my guess
whould be no.

> How much on other kinds of processors? (RISC)

That should be covered in another class: computer architecture. I think
it would suffice if you only discussed intel, since that allows students
to experiment with what they learned. Assembly languages are all so much
related that if you learned one, you easily learn any other. At least
that is my experience.

> How much time should I spend on interrupt handlers, v

Interrupt handling is very important, but you can't do that in ring 3 on
Windows.
I feel you should discuss interrupt handling and point out stuff like
interrupt nesting and what to do if there's no space available on the
stack at the time the interrupt occurs.

> file handling?

I have no idea what that has to do with assembly programming, but that
might be my ignorance.

> How much time should I spend on coupling assembly language
> subroutines with high level languages?

*Very* important:

- passing parameters by C calling convention and Pascal calling
convention
- linking stuff, different output sections and stuff like that

> How much on using assembly language knowledge to debug
> high level language problems?

Also *very* important, perhaps even more important than the previous one
as most people will probably never write assembly programs, but almost
anyone debugging C programs gains a lot knowing how to debug C programs
on assembly level.

> Should I get into writing assembly language stuff that
> runs as real Windoze applications, or stick to DOS based stuff?


Other stuff, that also might belong to the computer architecture class:

- paging, virtual memory
- supervisor mode vs user mode (ring 0 vs ring 3)

Okay, what are the options:

* DOS
 - obsolete in the viewpoint of many (not mine)
 - 16 bit
 - no possibility to demonstrate "advanced" concepts as supervisor mode
vs user mode and paging
 + allows demonstration of interrupt handling
* Windows
 - Perhaps doable if you discuss device driver writing (might not be a
bad idea at all)
* Linux
 - I'm not sure at what level these student are, but they might also use
Linux at home as lots of students do these days
 - Allows easy device driver writing
 - Free tools available, no royalties included (as opposed to MS stuff,
but you might be able to work out a deal)

But being a student at the VU in Amsterdam I might suggest using Minix,
as that is primarly intended for teaching. It is mostly written in C,
but (of course) portions are in assembly and those are IMHO the hardest
parts to understand (task context switching for example).

Is there practical work included in this course? I think that is *very*
important, as I think it's very hard to memorize all the details if
you've "worked" on it. Someone wise said something like "Tell it, and it
will be memorized for a month; Show it, and it will be memorized for a
year; Experience it and it will be memorized for a lifetime."

Regards,
Bert
Received on Tue Jun 22 2004 - 04:21:52 BST

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:36:59 BST