You could also have a look at the source code for the display toolkit by Dilwyn
- http://www.dilwyn.me.uk/tk/

This works on all QL systems.

> On January 13, 2016 at 9:02 PM Tobias Fröschle <[email protected]>
> wrote:
>
>
> Marcos,
>
> that is not exactly trivial to do portably over all QDOSMSQ platforms. Below a
> recipe how I do it:
>
> Check for PE (IOP.PINF). If available, screen extent is easy: you can get
> scr_xlim and scr_ylim via the IOP.FLIM PE call. (If not, xlim is a bit more
> difficult and ylim not 100% possible afaik)
> open a con_ channel (or use channel id 0, which might give you wrong info on
> Minerva)
> Get System Variable address (MT.INF)
> get the channel table address from SV_CHBAS from system variables
> Walk the channel table starting at that address, looking for the tag part of
> your channel id from (2) in $10. Some people simply take the first channel
> table entry, which is for con_ #0 most of the time….. But sometimes it
> isn't...
> once you found your channel, look into sd_scrb (or scr_base, $32 from start of
> that con_ channel definition block) and scr_llen at $64 from start
> If you don’t have PE, scr_xlim can be derived from the current mode (which
> gives you bits per pixel, 2==Mode 4, 4 == Mode 8, 8 ==Mode 256,…) . You simply
> divide scr_llen * 8 by the # of bits/pixel and get the number of pixels per
> line.
> I currently have no idea how to properly get at scr_ylim without PE - My code
> normally just guesses from the above. The only platform that does not
> necessarily have PE loaded (because of SMSQ/E) and still supports other than
> the standard QL resolutions is uqlx, to my knowledge.
>
> For the exact layout of the data structures, have a look at the QL Technical
> guide or the QDOS/SMSQ Reference Manual.
>
> Hope this helps,
> Tobias
>
>
> > Am 13.01.2016 um 21:26 schrieb Marcos Cruz <[email protected]>:
> >
> > Hi all,
> >
> > I need some help.
> >
> > Which is the easiest way to get the screen info from assembly is SMSQ/E?
> > I mean, what `scr_base`, `scr_xlim`, `scr_ylim` and `scr_llen` do in
> > SBASIC.
> >
> > I've found the code of those keywords in the SMSQ/E sources, and I'm
> > studying it in order to remove the SBASIC stuff, but I'm wondering if
> > someone has done this before.
> >
> > Thanks.
> >
> > --
> > Marcos Cruz
> > http://programandala.net
> > _______________________________________________
> > QL-Users Mailing List
>
> _______________________________________________
> QL-Users Mailing List
Rich Mellor
RWAP Software
www.rwapsoftware.co.uk
www.sellmyretro.com
_______________________________________________
QL-Users Mailing List

Reply via email to