[Gambas-user] Gambas-user Digest, Vol 35, Issue 54
Andreas Müller
andreas at ...2139...
Thu Apr 23 20:45:32 CEST 2009
Hello Charlie,
this comment makes me very happy and pushes me to continue with the
project :-) For a programmer it's allways a somewhat difficult situation
to 'put the trousers down' and show what is behind the sceenes, but I
was so happy with the result, that I had to make it public.
* WITHOUT GAMBAS IT WOULD NOT BE POSSIBLE *
Yesterday I wrote the code for printing programs and X,Y,Z registers, I
will continue today and possibly publish that possibly on weekend in the
next release. (Are there any problems installing on different
distributions?)
The next steps are:
* The HP 9101A Extented Memory (FMT commands..)
* HP 9125A Plotter (screen plotter with printing)
* Program library (see: source../Programs)
This helps me to understand the Gambas components i.e. drawing pictures,
using SHELL commands etc. and it makes fun!
Your question about the truth of the emulation can be answered this way.
I have an HP9100A on my desk since 1979 and I tried to make the emulator
as close as possible to the real machine. There are still some
differences, but I will remove them step by step. On the other hand I
take the freedom to add features when they are nice to have and make the
programming more comfortable like the "Program Listing" Menu. There are
other differences like the possibility to program the "record" and
"enter" buttons which gives one the option to program a "load program"
command -> subroutines! Generally it's difficult to emulate a machine
which is build up from discrete electronic parts as to HP is. There is
no "digital chip" inside. Only flip-flops, transistors, diodes,
resistors, magnetic core memory and a 16-fold-multilayer plantine as
'rom'. So the emulation emulates the 'behaviour' not the discrete parts.
There is a diagostic program of the real HP which calculates every
function possible on keyboard. (see: ../Programs within project folder)
I needed one week to get the emulator working in a way that it computes
the same results, The only differencs other than the "display font" is
that real display shows
1
2.000000000
3
and not
1
2
3
as the emulator does. I will fix that when I have understood why the
real machine does show this display. The handling of Zeros is a
difficult part within the emulator because the HP does it in a complete
other way as common pocket calculators do it.
I have the HP9100A program library and use that to test the emulator
results - so far I did not find an error :-)
The file extension .hpf is registered at
http://www.fileinfo.com/extension/hpf
but the maintainer thought it is related to Windows ;-)
I have a question to Benoit: The emulator is recursiv when working in
run mode:
State Module:
(..)
CASE "47"
' Continue
(..)
calls State.ChangeRun within State.ChangeRun. I suppose this will fill
up the return stack and may be a problem with long running programs.
For that reason I took the largest possible stack size of 64k within the
project options. Is that correct?
There is an other problem with "button feedback" when a program runs. So
I took a 'forced delay' of every 711th program step to give time to the
interpreter to catch the button click of a "STOP" button. Without that
delay I could start the program but not stop it any more:
Example: unstoppable program
HP 9100A Program Listing - created: 04/23/2009 20:11:55.151
___________________________________________________________________
File: Untiteld
Line Code Instruction
____________________________
0.0 01 1
0.1 33 +
0.2 44 GO TO()()
0.3 00 0
0.4 00 0
0.5 46 END
This is a counting loop, which can not be stoped by the "STOP" button,
if there is no 711-delay build in.
Finally when I switch the emulator into "OFF" mode and then back into
"POWER ON" the left switch called "DEGREES/RADIANS" shows a dottet
square like an artefact. I don't know why?
There is an error in the "POWER OFF" mode, because you can change the
stack during that mode - which should not be the case - but that's easy
to fix and will be in the next release.
best regards
Andreas Mueller
Am Donnerstag, den 23.04.2009, 03:07 +0000 schrieb
gambas-user-request at lists.sourceforge.net:
> Am Mittwoch, den 22.04.2009, 01:24 +0200 schrieb Andreas M?ller:
> 8<---------------------------------------------------------------------------
> > Btw. if someone wants to have an emulation of the "first PC" aka
> HP9100A
> > one can find that on my homepage under software.
> http://www.poipoi.de/software
> > Comments are welcome! But don't punish me for the code - I know it's
> a
> > terrible mixture somewhere between object and spagetti code ;-> but
> I have
> > started with Gambas and the project this month.
> >
> 8<---------------------------------------------------------------------------
>
> Salut,
>
> just know, Spagetti Code is just bad for those who can't read this
> code,
> never for the functionality of that code.
> I find your project just wonderful. (I do not know if it is a real
> emulation of an HP9100A and even not, if all works OK )
> I'm impressed by the way the mechanics of the 'computer' is realized.
> Good job.
> --
> Amicalment
> Charlie
More information about the User
mailing list