home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / m6809 / 591 < prev    next >
Encoding:
Internet Message Format  |  1993-01-27  |  3.3 KB

  1. Path: sparky!uunet!news.univie.ac.at!scsing.switch.ch!univ-lyon1.fr!ghost.dsi.unimi.it!rpi!gatech!usenet.ins.cwru.edu!agate!doc.ic.ac.uk!uknet!comlab.ox.ac.uk!newshost!rpb
  2. From: rpb@psy.ox.ac.uk (Ray Bellis)
  3. Newsgroups: comp.sys.m6809
  4. Subject: PD m6809 simulator to be available soon
  5. Message-ID: <RPB.93Jan27125133@brain.psy.ox.ac.uk>
  6. Date: 27 Jan 93 12:51:33 GMT
  7. References: <C0v2us.3Ko@shograf.com>
  8.     <RPB.93Jan16141030@brain.psy.ox.ac.uk><74017@cup.portal.com>
  9.     <RPB.93Jan22121602@brain.psy.ox.ac.uk> <74389@cup.portal.com>
  10. Organization: Dept. of Experimental Psychology, Oxford, England.
  11. Lines: 62
  12. In-reply-to: blackbelt@cup.portal.com's message of 26 Jan 93 06:15:49 GMT
  13.  
  14.  
  15. In article <74389@cup.portal.com> blackbelt@cup.portal.com (Ben - Williams) writes:
  16.  
  17.    That's not too bad a speed! You do have a bit of horsepower, though. :^)
  18.  
  19. I'm not too worried about coding efficiency, I'll be running it on a
  20. 150 MHz Alpha very shortly :-)
  21.  
  22.    I can get almost realtime for the loop you show in the NON debug version
  23.    of my emulator; about 900k/sec, same instructions. That's on a 25 mhz 68040,
  24.    all caches on.
  25.  
  26.    My code is a great deal simpler than yours, though, and involves no
  27.    function calls to anything, anywhere, other than one call to execute the
  28.    instruction itself. All the non-indexed modes are coded completely inline,
  29.    your example being an immediate mode, it falls in that group.
  30.  
  31. My example wasn't immediate mode.  The `fetch_operand' function call
  32. handles operands for all modes except inherent.  My `execute' function
  33. first of all decodes the addressing mode and then uses a huge `switch'
  34. to find the function that implements the instruction.  I suspect that
  35. a lot of my CPU time is `wasted' by the C++ implememtation, and by the
  36. virtual functions that implement read/write `memory cycles'.
  37.  
  38.    Emulators are a kick, eh? <grin>
  39.  
  40. Yeah, I got quite a kick the first time I put that simple 2 byte
  41. counter into the system and traced the registers being incremented
  42. etc.
  43.  
  44. ------------
  45. Announcement:
  46. ------------
  47.  
  48. My C++ source code emulator of the MC6809 will be available to all
  49. and sundry very shortly.  If people are interested in Beta testing,
  50. please contact me, as I'm not sure if my interpretation of how things
  51. like the `C' flag is set are correct, so I'd really like people to
  52. verify the accuracy of my simulation.  At the moment, the only un-
  53. implemented facilities are asynchronous interrupts, as I haven't
  54. figured out a good mechanism for handling these yet.
  55.  
  56. I have a simple `machine' derived from the mc6809 base class which
  57. provides a read/write port at address 0xc000 and either gets or puts
  58. a character to stdin/stdout.  This derived class is written using
  59. POSIX `tc' functions to put the tty into `raw' mode but could easily
  60. be rewritten to use DOS `conio' functions.
  61.  
  62. Now all I've got to do is write an operating system, as the emulator
  63. was orignally just a tool for developing the OS for a simple MC6809
  64. based controller that I'm designing...
  65.  
  66. Ray.
  67.  
  68. --
  69. ------------------------------------------------------------------------------
  70. R. P. Bellis                E-Mail:    <rpb@psy.ox.ac.uk>
  71. Dept. of Experimental Psychology    Whois:    (RB83)
  72. University of Oxford            Tel:    +44 865 271419
  73. South Parks Road            Fax:    +44 865 310447
  74. Oxford OX1 3UD
  75. ------------------------------------------------------------------------------
  76.