Re: [Ql-Users] screen info in assembler

2016-01-13 Thread Tobias Fröschle
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 :
> 
> 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

Re: [Ql-Users] screen info in assembler

2016-01-13 Thread Dilwyn Jones
Have a look at the source assembler for my display_cde extensions at 
http://www.dilwyn.me.uk/tk/display2.zip


Dilwyn

-Original Message- 
From: Marcos Cruz

Sent: Wednesday, January 13, 2016 8:26 PM
To: ql-users@lists.q-v-d.com
Subject: [Ql-Users] screen info in assembler

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


-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2016.0.7294 / Virus Database: 4489/11391 - Release Date: 01/13/16 




-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2016.0.7294 / Virus Database: 4489/11391 - Release Date: 01/13/16

___
QL-Users Mailing List


[Ql-Users] screen info in assembler

2016-01-13 Thread Marcos Cruz
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


Re: [Ql-Users] screen info in assembler

2016-01-13 Thread jms1

Studying George Gwilts EasyPeasy may help

On 2016-01-13 20:26, Marcos Cruz wrote:

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.


___
QL-Users Mailing List


Re: [Ql-Users] screen info in assembler

2016-01-13 Thread Tobias Fröschle
Yep, Dillwyn’s code does more or less what I described, except that it uses 
SD.EXTOP to get to the channel definition block.

But  it doesn’t get the screen extent right on uqlx without PE. (Which, as I 
said, is not possible for scr_ylim anyhow and thus maybe not so relevant ;) ) 
Code I write in that case tries to get scr_xlim right as described and then 
assumes a 4:3 screen extent - Which is kind of guessing.

Tobias

> Am 13.01.2016 um 22:03 schrieb Dilwyn Jones :
> 
> Have a look at the source assembler for my display_cde extensions at 
> http://www.dilwyn.me.uk/tk/display2.zip
> 
> Dilwyn
> 
> -Original Message- From: Marcos Cruz
> Sent: Wednesday, January 13, 2016 8:26 PM
> To: ql-users@lists.q-v-d.com
> Subject: [Ql-Users] screen info in assembler
> 
> 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
> 
> 
> -
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2016.0.7294 / Virus Database: 4489/11391 - Release Date: 01/13/16 
> 
> 
> -
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2016.0.7294 / Virus Database: 4489/11391 - Release Date: 01/13/16
> 
> ___
> QL-Users Mailing List

___
QL-Users Mailing List