home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
CMDS
/
memacs400_src.lzh
/
MEMACS400
/
SRC
/
gsscsz.c
< prev
next >
Wrap
Text File
|
1996-04-24
|
2KB
|
65 lines
/* gsscsz.c */
#include <types.h>
#include <machine/reg.h>
#include <winfo.h>
short fontszx, fontszy;
/* Get Screen Info */
_gs_scsz(path, xsize, ysize)
int path, *xsize, *ysize;
{
WINFO winf;
struct {
short gn, bn, xsz, ysz, cpx, cpy, attr;
} finf;
if (_gs_winfo(path,&winf) == -1)
return (-1);
if (_gs_finfo(path,&finf) == -1)
return (-1);
fontszx = finf.xsz;
fontszy = finf.ysz;
*xsize = ((winf.w_wa_xmax + 1) / finf.xsz);
*ysize = ((winf.w_wa_ymax + 1) / finf.ysz);
return(0);
}
#asm
_gs_winfo:
link a5,#0 this is for debuggers' frame links
movem.l d1-d2/a0,-(sp) this is for _sysret
* the first parameter is always in D0
move.w d0,d0 just for fun; this is passed path
* the second parameter is always in D1
move.l d1,a0 ss_winfo wants packet address in A0
* D1 must contain the StatCall number
move.w #161,d1 DS_WInfo this time
* now we can do the system call
os9 I$GetStt
* if carry is set, _sysret will stick a -1 in D0 (return value)
bra _sysret
_gs_finfo:
link a5,#0 this is for debuggers' frame links
movem.l d1-d2/a0,-(sp) this is for _sysret
* the first parameter is always in D0
move.w d0,d0 just for fun; this is passed path
* the second parameter is always in D1
move.l d1,a0 ss_winfo wants packet address in A0
* D1 must contain the StatCall number
move.w #177,d1 DS_FontInfo this time
* now we can do the system call
os9 I$GetStt
* if carry is set, _sysret will stick a -1 in D0 (return value)
bra _sysret
#endasm