Minerva question

Anything QL Software or Programming Related.
Post Reply
Martin_Head
Aurora
Posts: 852
Joined: Tue Dec 17, 2013 1:17 pm

Minerva question

Post by Martin_Head »

Does anyone know if at some point Minerva changed the handling of printing strings to a channel, by converting a IO_SSTRG into a sequence of IO_SBYTE's

I have a problem with a program that prints to a channel, who's device driver does not support IO_SBYTE, but does support IO_SSTRG. The program works in JS and Minerva v1.89, but in Minerva v1.97 I get a 'not implemented' error.

I have tried looking in the Minerva source code, And I think it does, But I may be reading it wrong, or looking in the wrong place. I also looked at the Minerva versions document on Dilwyn's site, But could not see a mention of it being changed.


User avatar
tofro
Font of All Knowledge
Posts: 2701
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Minerva question

Post by tofro »

Hi Martin,

Minerva prints strings (and most other arguments as strings (see the sstrg routine in print_asm).

It does, however, print characters like newlines and tabs, as well as separating spaces using io_sbyte (through the print_1 routine in print_asm).

Code: Select all

PRINT "Hello";
Should actually only end up in io_sstrg.

Code: Select all

PRINT "Hello"
(Note the missing semicolon)
Would end up in io_sstrg (for "Hello") and io_sbyte (for the trailing NL)

Tobias


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Martin_Head
Aurora
Posts: 852
Joined: Tue Dec 17, 2013 1:17 pm

Re: Minerva question

Post by Martin_Head »

Thanks for that. That will probably account for my 'not implemented' errors.

I was just worried that one of my machine code routines had left a landmine somewhere in the system, that PRINT was stepping on in Minerva 1.97


Post Reply