AminetAminet
Search:
84782 packages online
About
Recent
Browse
Search
Upload
Setup
Services

dev/misc/fd2pragma2_0.lha

Mirror:Random
Showing: i386-aros icongeneric icon
No screenshot available
Short:Pragmas, LVOs for Aztec, Dice, SAS, Maxon
Author: wiedmann at mailserv.zdv.uni-tuebingen.de
Uploader:wiedmann mailserv zdv uni-tuebingen de
Type:dev/misc
Architecture:m68k-amigaos
Date:1994-03-14
Download:dev/misc/fd2pragma2_0.lha - View contents
Readme:dev/misc/fd2pragma2_0.readme
Downloads:726

This is a new version of my fd2pragma utility. It introduces support of
tag functions, either by using the SAS pragma "tagcall" or by creating
stub routines automatically. (Don't look at these functions: They look
BCPL-like, horrible! But I hope, they'll work. ;-)

As before, the following pragma formats are supported:

Program     Recommended filename    pragma format (example)

Aztec-C     xxx_lib.h		    #pragma amicall(xBase,0x1e,xfunc(a0,d1))
Maxon	    xxx_pragmas.h	    #pragma amicall(xBase,0x1e,xfunc(a0,d1))
Dice	    xxx_pragmas.h	    #pragma libcall xBase xfunc 1802
SAS-C	    xxx_pragmas.h	    #pragma libcall xBase xfunc 1802

Aztec-As    xxx_lib.asm 			xdef	_LVOxfunc
				    _LVOxfunc	equ	-30

The tag functions are supported by certain comments. (Note, that the official
includes from the Native Developer Update Kit don't have this comments
included.) Lets look at an excerpt from the fd-file muimaster_lib.fd:

MUI_NewObjectA(class,tags)(a0,a1)
*tagcall
MUI_DisposeObject(obj)(a0)
MUI_RequestA(app,win,flags,title,gadgets,format,params)(d0,d1,d2,a0,a1,a2,a3)
*tagcall
MUI_AllocAslRequest(type,tags)(d0,a0)
*tagcalltags

The comments tell us, that MUI_NewObjectA, MUI_RequestA and
MUI_AllocAslRequest should have stub routines. The respective names are
MUI_NewObject, MUI_Request (as the comment has just the word tagcall) and
MUI_AllocAslRequestTags (as the comment has the word tags included).
Another possibility would be to write something like

SystemTagList(command,tags)(d1/d2)
*tagcall-TagList+Tags

This would create a stub-routine SystemTags (dropping the word TagList,
adding the word Tags).

Tag functions with arguments on the stack are supported in two different ways:
- SAS-C allows special pragmas called "tagcall". Pragmas for the above
  functions would look like this:

  #pragma tagcall MUIMasterBase MUI_NewObject 1e 9802
  #pragma tagcall MUIMasterBase MUI_Request 2a BA9821007
  #pragma tagcall MUIMasterBase MUI_AllocAslRequestTags 30 8002
  #pragma tagcall DOSBase SystemTags 25e 2102

- Other C compilers need stub routines which are compiled separately and
  linked to the program. fd2pragma can create these stub routines for you.


The command template pf fd2pragma is
    fd2pragma fdfile/a,aztec/k,as/k,dice/k,sas/k,maxon/k,tagdir/k
where "fdfile" is the file to convert. The arguments aztec, as (Aztec-As),
dice, sas and maxon are the pragma or LVO files that should be created.
The tagdir argument is the name of a directory where to store stub routines.


This program is in the public domain. Use it as you want, but WITHOUT ANY
WARRANTY!


Contents of dev/misc/fd2pragma2_0.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO     CRC       STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]                 8650   16676  51.9% -lh5- 0165 Mar 12  1994 fd2pragma/fd2pragma
[generic]                 6379   25502  25.0% -lh5- d8ef Mar 12  1994 fd2pragma/fd2pragma.c
[generic]                 1289    2754  46.8% -lh5- 24d6 Mar 12  1994 fd2pragma/fd2pragma.readme
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total         3 files   16318   44932  36.3%            Mar 14  1994
Page generated in 0.02 seconds
Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>