Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (539)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (603)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Discussions / Miscellaneous Topics / Re: Little Man Computer - Simulator Applet on: 2012-10-24 10:11:31
Using just 00-09 for starters is a great idea, and is just enough for a few short examples (IN/OUT, add, double, etc).
2  Discussions / Miscellaneous Topics / Re: Little Man Computer - Simulator Applet on: 2012-10-24 00:21:03
What I'm trying to convey to the kids is that there's a no-thinking link between the branch statement and where execution then moves to.

For example, tomorrow afternoon I'm going to have them 'run' a paper-based LMC. I'll draw 100 boxes on the board (maybe less!) and write some compiled instructions in there. They get the hang of looking fetching whichever instruction is 'pointed to' by the Program Counter, looking it up in the 'Decode' list of mnemonics/instructions, then performing the required task (looking in the 'IN' mailbox and writing it's contents into the accumulator, putting stuff from the accumulator into the 'OUT' mailbox, etc...) and after each instruction executes they add one to the number in the program counter box (also on the board), having started it at zero.

Then we come to branching. They hit a statement that says '804' (ignoring labels for now). Looking in the 'decode' table they find 8xx, where '8' means copy the '04' into the program counter, then carry on with the next fetch/execute cycle as normal, only now execution has 'jumped' to memory location 04. The computer doesn't need to think, or even know/care that's there's been a 'jump', only the programmer knows. I'm trying to convey the utter dumbness of the computer, that any cleverness ONLY comes from the programmer. For me, that's what LMC is all about, pulling back the curtain on the 'magic box' and discovering it's just a clockwork machine that moves numbers around according to a small set of instructions which it follows slavishly.
3  Discussions / Miscellaneous Topics / Re: Little Man Computer - Simulator Applet on: 2012-10-23 22:31:19
Also there's no Program Counter field. This is necessary to help kids see how the computer can perform a branch instruction by copying whatever is at location xx into the Program Counter.
4  Discussions / Miscellaneous Topics / Re: Little Man Computer - Simulator Applet on: 2012-10-23 22:14:43
Riven,

Working with the simulator the other day I noticed a small error. Under 'Print Instructionset' you have STA and LDA reversed, ie they are correctly compiled to 3xx (STA) and 5xx (LDA), but listed the wrong way round in the print string.

Could you fix it and upload a new .jar file?

John.
5  Discussions / Miscellaneous Topics / Re: Little Man Computer - Simulator Applet on: 2012-09-09 01:09:49
I agree, but I was trying to make as few changes to the original code as possible. Possibly it's making the point that all memory 'starts off' with a default value of zero and therefore doesn't need initialising explicitly, though that approach doesn't hold water after the first run after the machine boots up (or even partway through the first run!).
6  Discussions / Miscellaneous Topics / Re: Little Man Computer - Simulator Applet on: 2012-09-08 23:29:13
Hi,

I've created a page for my students to use this week:
https://sites.google.com/a/bxs.org.uk/mrkershaw/lmc

Let me know if you're unhappy about any of it or if I've mis-representated anything. If you're happy I'd like to email a link to the page to the OCR exam board to check they're happy with my students submitting their work on your emulator.

Thanks again,

John.
7  Discussions / Miscellaneous Topics / Re: Little Man Computer - Simulator Applet on: 2012-09-03 07:44:51
Thanks a million - that's fantastic! Would you be okay with me approaching the exam board to offer this as an alternative LMC for project work? As I said, they are currently basing an entire chunk of the curriculum on a single implementation from a guy at York University, which doesn't offer the source code and could disappear at any moment! On that note (and because I'd still like to have a crack at compiling some 'real' Java source) would you be happy to post the complete source?

Thanks again for an excellent resource.

John.
8  Discussions / Miscellaneous Topics / Re: Little Man Computer - Simulator Applet on: 2012-09-02 21:48:09
The students have to use LMC - not even 100% sure yet whether I'm even allowed to suggest a *different* implementation of LMC than the one they've suggested in the materials, but I'd at least like to have a standalone exemplar page I can direct the exam board to.

Regards HOW it runs, I'm happy either in-browser or as a standalone app. Currently I can't figure out how to make either of them work. I've now downloaded the NetBeans environment too, but although I can make Hello World work there, the LMC code still chokes with the same error.

John.
9  Discussions / Miscellaneous Topics / Re: Little Man Computer - Simulator Applet on: 2012-09-02 16:54:42
Sorry to necropost, but I'm VERY interested in using your Little Man Computing app with my students this term, and I suspect others may too.

I'm switching to teaching GCSE Computing this year, from ICT. One of the programming research components has students use LMC to investigate 'bottom line' computing, learning how computers shift bits around, seeing how memory is used at low-level, etc. Unfortunately, the LMC app they recommend:

http://www.atkinson.yorku.ca/~sychen/research/LMC/LittleMan.html

doesn't work very well in any of my (Mac) browsers, specifically the text boxes are too small and only display one character, not much use when the box contain '901' and all I can see is a centre '0'. Definitely not good for students putting screenshots into reports...

So I went looking for an alternative LMC app... and there aren't any! The *idea* is well documented, but implementations are thin on the ground. Yours is excellent, especially the syntax colouring and single-stepping with line highlight. Unfortunately, I'm new to Java and can't figure out how to get this to be a standalone app, even though you kindly posted the source. I downloaded Eclipse, did the intro-tutorials, then pasted your code as a new project, but both 'checkAddress' and 'execute' are marked with red crosses, I *think* because 'EmulatorCrash cannot be resolved to a type'. Do I need to load a library/module/something to make this work? I did google 'EmulatorFeedback' and 'EmulatorCrash' but the only results point back to your page, which makes me think this is something specific to your code that I'm missing.

Alternatively, can I download the finished .jar file somehow? Not as good as having the source to go through with the students, but better than having to have them load the LMC from the discussion page!

John.

PS No offence, but the anti-spam sign-up requirements for this BB are mighty steep for someone just wanting to ask a casual question!
Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

rwatson462 (36 views)
2014-12-15 09:26:44

Mr.CodeIt (29 views)
2014-12-14 19:50:38

BurntPizza (61 views)
2014-12-09 22:41:13

BurntPizza (98 views)
2014-12-08 04:46:31

JscottyBieshaar (58 views)
2014-12-05 12:39:02

SHC (74 views)
2014-12-03 16:27:13

CopyableCougar4 (76 views)
2014-11-29 21:32:03

toopeicgaming1999 (137 views)
2014-11-26 15:22:04

toopeicgaming1999 (127 views)
2014-11-26 15:20:36

toopeicgaming1999 (37 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!