I remember someone posted a code in a thread here in MRC with some calculation in BASIC that showed an incorrect result due to a bug in Math Pack. I can't find this thread anymore. Anyone remember what bug was that?
A very limited test with SQR(10) learns that MSX-BASIC is 3.5 times slower...
Note also that MBASIC is pure i8080 code, but even the bigest part of MSX-BASIC is still using the original i8080 code, not Z80 optimized.
but the MBASIC ran on an msx?
can you test some basic operations like summing n times a double or single precision number?
Or a multiply / divide operation?
A very limited test with SQR(10) learns that MSX-BASIC is 3.5 times slower...
Note also that MBASIC is pure i8080 code, but even the bigest part of MSX-BASIC is still using the original i8080 code, not Z80 optimized.
It would be interesting experiment to disassemble math pack from i8080 version and plug it back to MSX-BASIC to see how much faster real MSX-BASIC programs would run with it in practice. The speed is affected by this in many places that would not even seem automatically obvious (like in PLAY and CIRCLE commands) Most likely such patch would be quite a bit harder task than it sounds like though. It was anyway not very clever business decision to rewrite that part and I've been wondering why on earth they put the effort here. Even back in the day when MSX was actively marketed the slow math routines were many times mentioned in reviews that compared MSX to other home computers.
Microsoft later switched back to base 2 version, so I guess they came to same conclusion after experimenting with SVI/MSX line of machines. I think they just got mesmerized by the Z80 brand new DAA-instruction and took it as powerful expansion to 8080 command set without actually bothering to evaluate the total cost that it causes in the end. When ASCII released MSX-BASIC kun compiler (aka. X-BASIC) they also went back to base 2 numbers, but in X-BASIC the whole approach is so different, that you can't really compare the speed differences in a fair way. (and it also can't run all MSX-BASIC programs as is)
A very limited test with SQR(10) learns that MSX-BASIC is 3.5 times slower...
Note also that MBASIC is pure i8080 code, but even the bigest part of MSX-BASIC is still using the original i8080 code, not Z80 optimized.
but the MBASIC ran on an msx?
can you test some basic operations like summing n times a double or single precision number?
Or a multiply / divide operation?
MBASIC is a CP/M program, so yes it runs on MSX-DOS.
We have develope some sort of floating point benchmark basic program to test this. Does anyone have suggestions ?
A very limited test with SQR(10) learns that MSX-BASIC is 3.5 times slower...
Note also that MBASIC is pure i8080 code, but even the bigest part of MSX-BASIC is still using the original i8080 code, not Z80 optimized.
It would be interesting experiment to disassemble math pack from i8080 version and plug it back to MSX-BASIC to see how much faster real MSX-BASIC programs would run with it in practice. The speed is affected by this in many places that would not even seem automatically obvious (like in PLAY and CIRCLE commands) Most likely such patch would be quite a bit harder task than it sounds like though. It was anyway not very clever business decision to rewrite that part and I've been wondering why on earth they put the effort here. Even back in the day when MSX was actively marketed the slow math routines were many times mentioned in reviews that compared MSX to other home computers.
Microsoft later switched back to base 2 version, so I guess they came to same conclusion after experimenting with SVI/MSX line of machines. I think they just got mesmerized by the Z80 brand new DAA-instruction and took it as powerful expansion to 8080 command set without actually bothering to evaluate the total cost that it causes in the end. When ASCII released MSX-BASIC kun compiler (aka. X-BASIC) they also went back to base 2 numbers, but in X-BASIC the whole approach is so different, that you can't really compare the speed differences in a fair way. (and it also can't run all MSX-BASIC programs as is)
I have the orginal MBASIC source code including the F4 module. To replace the MSX F4 module should be do-able, but as already stated before, the format of the floating point is different and incompatible.
I just happened to watch a Dave’s Garage video which mentioned that the MathPack was written by Monte Davidoff rather than Bill Gates or Paul Allen.
I just happened to watch a Dave’s Garage video which mentioned that the MathPack was written by Monte Davidoff rather than Bill Gates or Paul Allen.
Yeah, I remember reading somewhere about that. Turns out Bill / Allen didn't want to get into the trouble of writing Math Pack, so they hired Monte. IIRC his name appears on a manual about MBasic.
I just happened to watch a Dave’s Garage video which mentioned that the MathPack was written by Monte Davidoff rather than Bill Gates or Paul Allen.
That's a nice video to watch, lot's of old info on how the seems to work and copyrighted there software :)
So it would be possible to rewrite the math pack and hook it to the default MSX basic, resulting in a quicker basic overall
The most important thing is, in Dave's Garage video, he says that the 6502 Basic source code was found. We already have the GW Basic source code.
How long it will take to the MSX Basic source code to appear? Maybe Nishi has it.