Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (843)
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

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?

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

I've created a page for my students to use this week:

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,

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.

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.

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:

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!


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]
EgonOlsen (42 views)
2018-06-10 19:43:48

EgonOlsen (22 views)
2018-06-10 19:43:44

EgonOlsen (43 views)
2018-06-10 19:43:20

DesertCoockie (197 views)
2018-05-13 18:23:11

nelsongames (124 views)
2018-04-24 18:15:36

nelsongames (123 views)
2018-04-24 18:14:32

ivj94 (863 views)
2018-03-24 14:47:39

ivj94 (124 views)
2018-03-24 14:46:31

ivj94 (768 views)
2018-03-24 14:43:53

Solater (140 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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‑
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!