[Coco] Syscall to get the window screen and width
Wayne Campbell
asa.rand at gmail.com
Sat Mar 8 10:49:32 EST 2025
You should already know which window you are using. Your code should be
reflecting which window you have currently selected. If you are not doing
that, then I don't know what to tell you.
On Sat, Mar 8, 2025, 7:28 AM plt via Coco <coco at maltedmedia.com> wrote:
>
> In Basic09 is there a way to find the current window that your using?
>
> Thanks
>
> On Sat, March 8, 2025 15:11, Wayne Campbell via Coco wrote:
> > This should work, but I haven't tested it.
> >
> >
> > TYPE REG=cc,a,b,dp:BYTE; x,y,u:INTEGER
> > DIM regs:REG \(* registers type
> > DIM callCode,path:BYTE
> > DIM erCode,cols,rows:INTEGER
> >
> >
> > OPEN #path,"/w":READ \ (* open path to window - /w is next available
> > window, specify which device here callCode:=$8D \(* getstat call
> > regs.a:=path
> > regs.b:=$26
> > RUN SysCall(callCode,regs)
> > IF LAND(regs.cc,1)<>0 THEN \ (* Carry set on error
> > erCode:=regs.b \ (* Error code (if any)
> > (* handle error *)
> > ELSE
> > cols:=regs.x
> > rows:=regs.y
> > ENDIF
> >
> >
> >
> >
> >
> > On Sat, Mar 8, 2025, 6:19 AM plt via Coco <coco at maltedmedia.com> wrote:
> >
> >
> >>
> >> I am not sure if this will the screen width and length but can you
> >> provide a example of how to do the system call and get the return
> >> results please?
> >>
> >> How can you get the current window if /w1 or /w2?
> >>
> >>
> >> Chapter 9. System Calls NitrOS-9 EOU Technical Reference Manual
> >> SS.ScSiz Returns the window or screen size
> >> Function Code $26
> >> Entry Conditions:
> >> A path number
> >> B $26
> >> Exit Conditions:
> >> X number of columns on screen/window
> >> Y number of rows on screen/window
> >> Error Output:
> >> CC carry set on error
> >> B error code, if any
> >>
> >>
> >> Chapter 9. System Calls NitrOS-9 EOU Technical Reference Manual
> >> SS.ScSiz Returns the window or screen size
> >> Function Code $26
> >> Entry Conditions:
> >> A path number
> >> B $26
> >> Exit Conditions:
> >> X number of columns on screen/window
> >> Y number of rows on screen/window
> >> Error Output:
> >> CC carry set on error
> >> B error code, if any
> >>
> >>
> >> Additional Information:
> >>
> >>
> >> • Use this call to determine the size of an output screen. The values
> >> returned depend on the on device in use: ◦ For non-VTIO devices,
> >> the call returns the COL and ROW values in the device descriptor.
> ◦
> >> For VTIO/CoVDG devices, the call returns the size of the window or
> >> screen in use by the specified device (32x16). ◦ For window
> >> devices, the call returns the size of the of the current working area of
> >> the window. • This call is handled by CoVDG, CoGrf/CoWin, SC6551,
> >> SC6850, S16550 (and
> >> any future serial port drivers).
> >>
> >>
> >>
> >>
> >> --
> >> Coco mailing list
> >> Coco at maltedmedia.com
> >> https://pairlist5.pair.net/mailman/listinfo/coco
> >>
> >>
> >
> > --
> > Coco mailing list
> > Coco at maltedmedia.com
> > https://pairlist5.pair.net/mailman/listinfo/coco
> >
> >
>
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>
More information about the Coco
mailing list