Another atempt at MSX ASM programming

Page 3/3
1 | 2 |

By iamweasel2

Hero (604)

iamweasel2's picture

01-10-2020, 20:11

What is the reason for PINLIN BIOS function to return in HL the address of the buffer - 1? Shouldn't it be the first caracter in the Buffer instead of the address of the first caracter - 1?

By Sandy Brand

Master (196)

Sandy Brand's picture

02-10-2020, 01:44

Hmm, there is conflicting information on this to be found on the internet:

msx.org Wiki says HL = BUF (0F55Eh).

Grauw's resource page says HL is buffer - 1.

What does it give as a result when you debug it in your code?

By iamweasel2

Hero (604)

iamweasel2's picture

02-10-2020, 14:38

Sandy Brand wrote:

Hmm, there is conflicting information on this to be found on the internet:

msx.org Wiki says HL = BUF (0F55Eh).

Grauw's resource page says HL is buffer - 1.

What does it give as a result when you debug it in your code?

Well, It seems to me that Graw's resource page is the correct one, since my code only worked when I did a inc HL after calling PINLIN.

I assume this byte is the size of the string but I didn't debug to verify that hipothesis. I'll do it later, thanks.

By iamweasel2

Hero (604)

iamweasel2's picture

02-10-2020, 14:40

I was wondering, all the functions available under BDOS have their equivalent in the MSX BIOS? Does BDOS calls make use of the bios functions when they do the same thing?

By Sandy Brand

Master (196)

Sandy Brand's picture

02-10-2020, 18:06

Hmm, well, a lot of the functions that are exposed as part of the BIOS is functionality that is used directly by the BASIC interpreter. So maybe the strange behavior makes sense in that context, in that it made some things easier while executing BASIC code, but it's a wild guess of course.

By NYYRIKKI

Enlighted (5595)

NYYRIKKI's picture

03-10-2020, 02:39

iamweasel2 wrote:

I was wondering, all the functions available under BDOS have their equivalent in the MSX BIOS?

No... Only disk routines that are available trough BIOS are PHYDIO and FORMAT.

Quote:

Does BDOS calls make use of the bios functions when they do the same thing?

No, I would say it is more like other way around although that is not accurate either... BIOS PHYDIO & FORMAT routines are just calls to disk ROM that is the home of BDOS as well. (Actually they are empty calls that disk ROM hooks to it self) MSX-BASIC naturally has more common functionality with BDOS, but any interactions are done directly without BIOS or official BDOS-calls in between. MSX disk BASIC lives inside same disk ROM as BDOS, but the way it interacts with rest of the MSX-BASIC environment is quite a horrible mess that looks pretty much like super-glue solution. There is no standard layer, they have been just patched quite roughly together.

If you tend to think that BDOS is somehow just MSX-DOS thing then I must say you are wrong... The role of MSXDOS.SYS is only to patch things like SP usage to better work with 64k RAM environment. All the real functionality is inside the disk ROM. If you want to use disk routines from inside your ML program under BASIC-environment, your only real option is to use BDOS calls... regardless if your computer has ever seen MSX-DOS disk or not...

Page 3/3
1 | 2 |