[sebhc] More Emulator (Got BASIC running) & Q on interrupts

Dave Dunfield dave04a at dunfield.com
Tue May 11 17:17:07 CDT 2004


Made reasonable progress today...

The front panel implementation is complete, looks and works quite nicely.

This morning, I implemented the single-step interrupt, and support for the console break
to monitor function --- what a pain! - spent several hours figuring it out. System kept
hanging and when I stopped and looked, it was in the TAPE LOAD function!

Turns out that the "invalid" 0+# key combination used to force monitor entry produces an
8 when run through the 'RCK' routine at 003,260 - this is the same as the '8' button, so
the system thinks you are doing LOAD when you hold these keys down. The real H8 does
this too, however it relies on the fact that you will continually interrupt the tape
loader while the keys are held down ... thats why the display flickers and you get
sporadic beeps when holding these keys --- poor design if you ask me.
Anyway, my emulator now does it just like the real H8.

Btw, I'm too lazy to implement an entire keyboard interrupt handler just to detect the
these two-key combinations, so when in console mode, I have used 'R' to Reset (0+/) and
'M' to force monitor entry (0+#). Not having a special INT-9 handler will also insure
that the emulator remains highly portable.

After that, I could start/stop/step program just like on the real H8.

This afternoon, I cooked up a rudimentary virtual 8251 console port tied to a terminal
window, decoded the BHBASIC.PID file that Carrol sent to me, and loaded it into the
emulator. Launched it at 040,100 and up came the startup prompts!

Took a little while to figure out that I needed an interrupt (3) tied to the virtual
8251 for input, but after that input worked as well, and I was able to enter, list and
run (correctly):
  10 FOR I=1 to 100
  20 PRINT I
  30 NEXT I

[I didn't know that the H8 basic did word completion!]

As far as I can tell, the BASIC seems fully functional.

Still have to implement the complete H19 (or perhaps H9 at first), the serial I/O
redirector (for real serial I/O), and possibly a file I/O redirector - so you can
load/save .PID files directly.

Haven't even started moving the debugger over from the Altair simulator, however it
shouldn't take too long as it's all been done and is working - just a matter of
connecting it up - mostly cosmetic things.

Haven't even thought about the disk controller yet (need docs etc.)

Question: I didn't find a standard for the interrupt assignments in the docs - I note
that the serial port allows you to configure them any way you like.

 - Is there a standard assignment for the basic hardware interrupt (Console, Tape etc.)
 - Does this need to be configurable in an INI file or some such?

Regards,
Dave Dunfield
-- 
dave04a (at)    Dave Dunfield
dunfield (dot)  Firmware development services & tools: www.dunfield.com
com             Vintage computing equipment collector.
                http://www.parse.com/~ddunfield/museum/index.html

--
Delivered by the SEBHC Mailing List



More information about the Sebhc mailing list