[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Making the present code run faster
Michael has had a problem with MICHAEL trying to run it with an old 50 MHz
computer. It took 5 minutes or so to read the memory to a disk file. I
have a possible solution that anyone who can write assembly code for PCs
might try.
QBasic has a shell command.
SHELL foo.exe
Exits QBasic, runs the program foo.exe and returns to QBasic, continuing
the QBasic code.
One could write a program in the language of his choice and substitute the
section where I write the disk file. Note that all you have to do in this
code is to read 2043*2037*2 bytes from the Memory card. This is done with
a INP(&H301). You just have to read two bytes and put them together as a
signed integer. You can see what I did by looking at the SaveIt1: code
in the QBasic operating program.
Any of you could do this and possibly speed up the Mark IV a lot. If
anyone wants to work on this, I will block out the code to replace and send
it to you with comments. The way the present code is written, you need
QBasic 7.1 to run it. This is because of TYPE statement with an
array. Changing out just this section of code would allow legal running
without owning a copy of QB 7.1. We can still run legally with a compiled
7.1, but that is not so convenient for making changes. QBasic does still
come with Windows, but you have to look for it.
Anyone working on this could do most of the work without any hardware. You
could then send the .exe code to one of the four of us that have suitable
test beds for trial.
It is relatively easy to test whether there is improvement possible. Just
write the loop:
do until counter = 8000000
a=INP(&H301)
counter = counter + 1
loop
and run it on a slow PC. Michael? If you beat 5 seconds by a lot, then
this is worth doing.
Tom Droege