Hi,
Stefano Fronteddu <[EMAIL PROTECTED]> wrote:
> A lot of You know that MAIN ROM slot's identificator is located at
> 0FCC1H.
> In MSX2 the MAIN ROM can be in any slot, while in MSX1 it's in slot
> 0 or slot 0-0. Why is there this difference ?
No, that's for MSX2 Sub-ROM. Main ROM has to be in slot 0 or 0-0, as
for MSX-1.
> Is it wrong to call Basic using 80H as slot identifier ?
Yep, for 2 reasons:
-It tells the MSX to switch secondary slots 0-x, which there are not
if (FCC1h) was 0. This also messes up memory location FFFFh here,
which it SHOULD not (and will not, if called correctly)
-It makes the MSX do a lot of unnecessary extra work if slot 0 wasn't
expanded, as is the case on many MSX's.
> I know that the following code works well in both MSX type
>
> LD A,(0FCC1H)
> LD H,40H
> CALL ENASLT
So why not use this correct way then? Replacing "LD A,(FCC1h)" with
"LD A,80h" saves 1 byte of code, and a TINY amount of CPU time on
some machines, wastes a lot of CPU work on many other machines, and
(strictly speaking) makes your program non MSX-compatible.
So on average, the above way works both better and faster, and I
couldn't think of ANY reason not to use this.
Greetings,
Alwin Henseler ([EMAIL PROTECTED])
http://huizen.dds.nl/~alwinh/msx (MSX Tech Doc page)
****
MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED] and put
in the body (not subject) "unsubscribe msx [EMAIL PROTECTED]" (without the
quotes :-) Problems? contact [EMAIL PROTECTED] (www.stack.nl/~wiebe/mailinglist/)
****