> >> Disassembling a standard MSX-DOS V1 boot sector I've come across the
> >following:
> >>
> >> It uses a BDOS function 6 loop to output the boot error string instead
of
> >> function 9 (!). Any reason?
> >
> >Yes. It probably is a null-terminated string, which sometimes is
nessacary
> >if you for instance want to display a '$'-sign, or when you are printing
an
> >ASCIIZ-string Dos2 uses for its diskroutines.
>
> But this string:
>
> C085 426F6F74206572 DEFM "Boot error"
> 726F720D0A DEFB #0D,#0A
> C091 50726573732061 DEFM "Press any key for retry"
> 6E79206B657920 DEFB #0D,#0A
> 666F7230726574
> 72790D0A

Ah, no. You have to include the byte after #0A too!!! I bet it is a 0.


> Has not a single $. Neither DOS2 did exist. It's the bootsector as found
in
> the Philips NMS 8250 MSX-DOS release *1*.
>
> I really don't understand the programming style of the bootsector. Really
> BAD habits.

Well at the start of COMMAND.COM there is a reason they don't want to use
"$". Because you can, exept for using the command for it, also view the
DOS-version by executing COPY COMMAND.COM CON. If they used "$" then at the
end you would have seen an ugly "$"... When they use a 0, it is not visible.

Only nasty thing is that they didn't let the string start with a code 13
(Carriage Return)... Then the code of the first Jump wouldn't have been
visible either.


> >By the way, if you disassemble function 9 you'll see it's nothing more
but a
> >loop which calls function 6 until it encounters an '$'.
>
> I guess so, but that's precisely the reason to use 9 instead of
reinventing
> it and the wheel!

No, it saves some time... :) It saves a CALL and a RET-instruction. And
besides, they use 0 as terminate-character, and not "$"... (I don't
understand why, for god's sake why does the stringroutine use "$" as
terminating character??? CP/M-compatibility, okay. But then why did the
developers of CP/M choose "$" instead of a 0????


> >Haven't checked that but I'm quite sure, I know quite a bit how Dos is
> >programmed and I really expect those kind of tricks of them.
>
> Tricks? To repeat a ROM function? To use JPs in loopless near jumps??? 8:?

Well okay that's not a trick, I meant it as an expression. But if you want
to see a Microsoft-trick, try to disassemble (and understand!) the first
part of the MSXDOS2.SYS-file.


> >> There're spurious JPs where it should have been JRs (!). Plenty of
> >space??? *:D
> >
> >Well JPs are a bit faster than JRs. Speed is more important on MSX than
> >space I think. Although in the case of Dos they don't seem to use that
> >policy. But the mapperroutines are as fast as they can get. They get
credits
> >from me for that.
>
> Faster for an error branch (no S/M code)?

Yes I know it is bullshiddd...

But if you really want to know why they used JP: let's just say that JP is
generally faster than JR, and you will never get 'out of range'-problems, so
most programmers use JP all the time. I do too. I hardly use
JR-instructions. Only sometimes, when it's faster than JPs (for example in
conditional jumps which are 'false' more than 60% of the times they are
executed).

So they have probably put an JP there because they always use it, and saw no
real reason to do it different. Or rather: they even didn't notice that it
could have been done different.


> >> Is the whole MS firmware this quality?
> >
> >:) Well looking to Windows...
>
> So now imagine a Windows MegaROM! 8:D
>
> GigaROM(tm) with a whole fancooled mapper daughterboard 8:D 8:D

hehehe...


~Grauw


--
>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<
          email me: [EMAIL PROTECTED] or ICQ: 10196372
             visit the Datax homepage at http://datax.cjb.net/
MSX fair Bussum / MSX Marathon homepage: http://msxfair.cjb.net/
>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<


****
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/)
****

Reply via email to