Reccomend a CPU emulator to teach assembly program

Miscellaneous Forums/General Discussion/Reccomend a CPU emulator to teach assembly program

I have to teach some basic assembly language programming as part of a new course I have been forced to introduce. (Edexcel BTEC National Award {Level 3 = A Level equivalent} - IT for General Practitioners in case you care !)

Here are a few of the criteria, taken from the syllabus...


Machine and assembly language programming: design simple machine and/or assembly language programs to use data transfer, arithmetic and jump and branch instructions

Pass grade
========
write very basic program functions (such as fetching and adding together two numbers, and storing the result) in a low level language

Merit Grade
========
describe, with the aid of diagrams, the hardware including logic gates, registers, buses, CU, ALU and memory) and its function within a model microprocessor

design and write programs in a low level programming language which include data transfer, arithmetic, jump and branch instructions.

Distinction
=======
describe in detail the function of the fetchdecode-execute cycle and its relationship to the workings of a microprocessor, making detailed reference to the role played by hardware and software in this relationship



I did some assembly language programming decades ago (Z80A on ZX81 and 6502 on BBC + some 68000 on a university rig) but haven't touched it since then.

So......

Can anyone recommend an emulator that can be used to teach assembly language programming to A level students who have no programming experience at all. {Most won't even have recorded a macro in VBA}

Better still - does anyone know of an online course attached to a CPU emulator that I can make use of ?

Or.... would people recommend adopting an x86 emulator as being relevant to modern computing (as opposed to old 8 or 16 bit machines that might be conceptually easier, but lack proper applications) ?

N.B. I have just finished teaching binary representation (e.g. bin/oct/hex + fixed and floating point with basic arithmetic) and the students coped reasonably - although most of the math would be accessible by analogies to denary work carried out at GCSE

[edit]
.... and here is the real kicker - I have to deliver the criteria above in about 10 or fewer hours of teaching !!!!
[/edit]

reccomend/recommend... gets me 50% of the time ;-)

Vice emulator and c64 assembler.

@smilertoo: thanks - had a look and it has potential. BUT I was a sinclair baby and the Vic stuff was the sworn enemy back in the day, so I have never dabbled - potential learning curve ahead !

Keep them coming !

I'd recommend a BBC emulator. Simpler than the C64 (in my opinion!) and there's a wealth of technical reference material available.

Granted, there's plenty available for the C64 too, but hey ;)

If you wanted to stick with 6502, perhaps a Vic-20 emu, rather than C64? It would steer people well away from graphical and sound niceties and would concentrate their minds on the programming.

Another alternative is an Amiga emulator - though there are serious legality issues there (you'd need DevPac assembler, or similar, to teach constructively).

Go with something more usefull. Teach Assembly for Intel based computers. Intel 80x86 and up are more useful as knowledge than older and non used machines.

BBC emulator is sounding tempting... I might even still have a copy of "Assembly language Programming on the BBC Micro" around somewhere.

Have looked at emu8086 and Flat_asm, but the problem is that emu costs a bundle and Flat has no integrated IDE/debugger. Unless anyone knows different ?

Rip this off... I mean, take inspiration from this...

http://www3.cc.gatech.edu/classes/AY2006/cs2260_spring/

They use HAM, the Gameboy Advance programming environment (with emulator), which let even stupid me get a little rocket program running on the real GBA. I didn't touch the ARM assembly, but they mention it... there's also a nice IDE called VisualHAM for it.

This is the internet bible for beginning ARM assembly programming (they have an emulator too, so check that as well)...

http://www.heyrick.co.uk/assembler/

I've never done asm, but even I was able to vaguely grasp a tiny bit of the general rough idea with the ARM processor. ARM is in everything these days, and much simpler than x86.

BBC is probably simpler, though not sure of the copyright status of BBC ROMs for emulators. The Spectrum ROMs are apparently allowed to be distributed for emulation, thanks to Amstrad...

I think many microcontroller manufactures offer free IDE+assembler+debugger+emulator for their microcontrollers. I have programmed Atmel 8bit AVR series a little bit and tools were very usable.

From botton of the page: "AVR Studio 4.12"
http://www.atmel.com/dyn/products/tools.asp?family_id=607#soft

IDE:

http://webster.cs.ucr.edu/AoA/

That is the URL of Art of Assembly, possibly the best documented assembly course going.

A few years ago the same author had a course based round a simulated cpu with nice delphi programs that showed register contents, and allowed you do do stuff such as switch on LED inputs and outputs, sadly he seems to have done away with that and now has this x85 based course to be used with HLA, a "high level assembler" written by the author.

Not exactly what you asked for (the old course would have been perfect), but there is some really good general assembly based docs in there (boolean algebra, logic therom's etc)

Roger

I've got this book called "How Computers Do Math" featuring the DIY-Calculator [do-it-yourself]. It takes you on a guided tour how computers work and throughout the book there is this workshop to build/program a calculator using assembly-language. Quit fun!

How Computers Do Math

Ghislain

the BBC assembler was *piss* easy to do- Depending on age it may be too easy IMO, I picked it up when I finally decided to try it in about 10 minutes (I needed something to disable IRQs so i could output pure tones to the speaker using clicks :))

I was prob about 10 at the time :)

I did ASM on BBC/C64/Spec/Amiga/PC and Amiga was best followed by C64. Actually the assembly I did on the BBC was on a BBC emulator on an Amiga! It was pretty easy though so maybe the BBC emulator is the way to go, it's just the C64 was cool- also of course only 256 op codes to memorise ;-)

BRK &BA115. What fun the 6502 is :D

UAE & AsmOne as 68k Assembly is easy to deal with. :O)

But i guess there is some good stuff for PowerPC (OSX) around too. I just would try to avoid stepping into the creepy unlogical Little-Endian-World.

UAE & Devpac2 ;-p

|

UAE & BBC Emulator

Intel(TM)- backwards inside.

@Grey
DevPac is for lamers only! ;O)

The HLA stuff looks pretty neat - gonna buy that book!

@taumel: right that's it Deutscher, I'm sending you to Coventry again! ;-)

@Grey
As expected...
How long will it last this time? ;O)

Oh Noes! Not Coventry!!!!

@Boiled Sweets

The entire courseware for the HLA/AoA course is available as a PDF and HTML as well as the purchase book, it's on th site somwhere.

I'll see if I have the old AOA course archived somewhere, its pretty old (the simulator was written in 16bit Delphi 1 :), but I converted it to 32bit Dephi (v3 at the time I think)

The old one would be more usefull as to the question posed above.

Glad you liked the link

Hello.

How bizarre. When I did my A Level in Computer Science we had to do a piece of coursework and of course no-one had thought of anything to do. So the lecturer gave us 10 minutes to think of something. There was the usual library and number-plate systems but I chose to do "A 6502/Z80 Assembler Disassembler Emulator" solely to teach people the concepts of Assembly Language without requiring that they actually got dirty. It was a cracking application, but since that was 1988, probably wouldn't be too special now. I think I still have the source for it somewhere.

My tuppence - go with 6502 (6510?) on a C64 emulator and get them throwing sprites around in the borders using interrupts to silly whizzy noises. Lots of fun and decent payback for the effort made.

Goodbye.

Teach em like wot I was...Acorn System 1

Use the no$CPC emulator. I think it's got a built in assembler (you'd need to check, but can alwasy download one for it), an embedded debugger/memory dump and the code's all lovely Z80. Also, the Z80 is still used in embedded applications.

BTW- 10 hrs is stupidly little time...

Flat has no integrated IDE/debugger. Unless anyone knows different ?


http://fresh.flatassembler.net/index.php

For sources, references, etc. you may want to check out this page: http://www.programmersheaven.com/zone5/index.htm

Thanks for all the input so far. Just when I think I have closed my mind to a particular direction, someone throws new light and I find myself needing to re-assess. All of the above is useful (OK, maybe not the Coventry stuff) but a few special mentions to...

I am liking Yan's suggestion as we can do very simlpe stuff, but really get our hands dirty with the translation to Hex codes, etc.

... plus I learned to do machine code on a Science of Cambridge Mk14 with its bubble keyboard and 7-segment LED display - the Acorn is giving me fond memories



And yes, 10 hours is stupidly little - remember, these students have never even seen computer code at high level before !!

@kevin8084: Thanks for your link - good source of further links there