Parameters for OS_swis in oslib/os.h library
David J. Ruck
druck at druck.org.uk
Fri Feb 5 00:01:34 GMT 2016
On 04/02/2016 20:15, Chris Dewhurst wrote:
> Hi all,
>
> I am not much more than a beginner at the C language which may explain
> why I'm stuck on the following. Hope one of you can help.
>
> The StrongHelp for os_screen_mode (for example) says:
>
> Declaration: extern void os_set_mode ( void );
>
> Description: VDU command to change display mode - must be followed
> by 'mode' - prefer OS_ScreenMode
That's the old BBC Micro style way of changing the screen mode by
sending bytes the VDU stream e.g. MODE 7 is VDU 22,7. In OS Lib the
os_set_mode is the 22.
> So the start of my C program looks like:
>
> #include "oslib/os.h
> extern void osscreenmode_select ( void );
That's a completely different mechanism based on the SWI OS_ScreenMode
and a mode description block, which you need to be able to select modern
high resolution, high colour modes.
> My question is how do you "follow" the os_set_mode call with a 'mode'
> number? For instance, to change to Mode 7 where does the 7 go?
Mode 7 isn't supported on modern hardware. If you want an emulation, see
my !GraphTask program which gives you BBC style graphics in a
multi-tasking window.
https://armclub.org.uk/free/
> Incidentally when StrongHelp says "prefer OS_ScreenMode" there appears
> to be no reference to OS_ScreenMode, at least it isn't listed in the
> StrongHelp.
You need a more recent help file, or get yourself PRM5a.
Cheers
---David
--
Email: druck at druck.org.uk
Phone: +44-(0)7974 108301
More information about the oslib-user
mailing list