[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::amiga_v1

Title:AMIGA NOTES
Notice:Join us in the *NEW* conference - HYDRA::AMIGA_V2
Moderator:HYDRA::MOORE
Created:Sat Apr 26 1986
Last Modified:Wed Feb 05 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:5378
Total number of notes:38326

342.0. "Calling New 1.2 routines from Manx 3.20a" by COOKIE::WECKER (Dave (Cum Grano Salis) Wecker) Fri Feb 20 1987 23:28

Here is a little assembly file that will let you call the new 1.2 routines
from Manx 3.20 (BTW: They just released 3.40!!!! it will start shipping on
Monday... yahooooo!)

P.S.	This is off of the Usenet.. I didn't write it and don't guarantee
	ANYTHING about it (except that it now assembles/links without error).

************************************************************************
*	NewBindings.ASM
*
* This assembly file contains binding routines for the new gadget functions
* provided in V1.2 of AmigaDOS.  You can use these binding routines
* if you have an old version of C compiler, for instance Manx V3.20A
* ( Though with a couple minor changes it can be used with the old
*   MetaComco Assember and Lattice C V3.03 )
************************************************************************

LIB_VERSION		equ	$14

_LVOActivateGadget	equ	-$1CE
_LVOActivateWindow	equ	-$1C2
_LVOAddGList		equ	-$1B6
_LVORefreshGList	equ	-$1B0
_LVORemoveGList		equ	-$1BC
_LVOGetScreenData	equ	-$1AA
_LVOAreaEllipse		equ	-$BA

	public	_ActivateGadget
	public	_ActivateWindow
	public	_AddGList
	public	_RefreshGList
	public	_RemoveGList
	public	_GetScreenData
	public	_AreaEllipse
	public	_IntuitionBase
	public	_GfxBase

*************************************************************************
*	ActivateGadget(&gadget, p_window, p_requester);
*		BOOLEAN return true on sucess
*************************************************************************
_ActivateGadget:
	movem.l	A2/A6,-(sp)		* A6 isn't mandatory w/Manx
	movem.l	12(sp),A0-A2		* ( but if you toss, adjust to 8! )
	move.l	_IntuitionBase,A6
	cmp	#32,LIB_VERSION(A6)	* SPECIAL TEST FOR LEGIT V1.2
	ble	nicht1
	jsr	_LVOActivateGadget(A6)
nicht1:	movem.l	(sp)+,A2/A6
	rts

************************************************************************
*	ActivateWindow(p_wind);
*
************************************************************************
_ActivateWindow:
	move.l	4(sp),A0
	move.l	A6,-(sp)		* Not necessary w/Manx
	move.l	_IntuitionBase,A6
	cmp	#32,LIB_VERSION(A6)	* SPECIAL TEST FOR LEGIT V1.2
	ble	nicht2
	jsr	_LVOActivateWindow(A6)
nicht2:	move.l	(sp)+,A6
	rts

*************************************************************************
*	AddGList( &gad, p_wind, position, number)
*		Return value is actual position inserted
*************************************************************************
_AddGList:
	movem.l	4(sp),A0/A1
	movem.l	12(sp),D0/D1
	move.l	A6,-(sp)			* Nicht Manx
	move.l	_IntuitionBase,A6
	jsr	_LVOAddGList(A6)
	move.l	(sp)+,A6
	rts

*************************************************************************
*	RefreshGList( &gad, p_wind, p_requester, number )
*
*************************************************************************
_RefreshGList:
	movem.l	A2/A6,-(sp)
	movem.l	12(sp),A0-A2
	move.l	$18(sp),D0
	move.l	_IntuitionBase,A6
	jsr	_LVORefreshGList(A6)
	movem.l	(sp)+,A2/A6
	rts

*************************************************************************
*	RemoveGList( &gad, p_wind, number);
*************************************************************************
_RemoveGList:
	movem.l	4(sp),A0-A1
	move.l	12(sp),D0
	move.l	A6,-(sp)			* Toss w/Manx
	move.l	_IntuitionBase,A6
	jsr	_LVORemoveGList(A6)
	move.l	(sp)+,A6
	rts

*************************************************************************
* AreaEllipse( p_rast, xcenter, ycenter, xdel, ydel);
*	(?) Returns 0 if no error a_la_AreaDraw()
*************************************************************************
_AreaEllipse:
	movem.l	D2/D3/A6,-(sp)
	move.l	16(sp),A1
	movem.l	20(sp),D0-D3
	move.l	_GfxBase,A6
	jsr	_LVOAreaEllipse(A6)
	movem.l	(sp)+,D2/D3/A6
	rts
	
*************************************************************************
*	GetScreenData( p_buffer, buffsize, type, p_somescreen);
*
*	Where p_buffer is a data area, sizeof(buffsize) which is
*	sizeof (struct Screen). type is WBENCHSCREEN or CUSTOMSCREEN
*	if type = CUSTOM, p_somescreen is the customscreen
*	Returns buffer containing a cloned_data for the screen requested
*************************************************************************
_GetScreenData
	move.l	4(sp),A0
	movem.l	8(sp),D0/D1/A1
	move.l	A6,-(sp)		* Gonzo Manx_a_mania
	move.l	_IntuitionBase,A6
	jsr	_LVOGetScreenData(A6)
	move.l	(sp)+,A6
	rts

T.RTitleUserPersonal
Name
DateLines
342.1Need help with ActivateGadget()COOKIE::WECKERDave (Cum Grano Salis) WeckerFri Feb 20 1987 23:3621
re:	.0

Now that I've got a way to call these wonderful routines, I can't seem to
get a certain one to work - ActivateGadget(). ActivateWindow() works like
a charm, but ActivateGadget() just returns FALSE and does nothing.

This is of course for the VT100 emulator... I've tried everything I can
think (yes I followed all of the guidelines in autodocs).

If any brave sole would like to come up with a simple example of a string
requester that is selected (or just hack up VT100 so it works) it would be
greatly appreciated... right now I'm stumped!

thanks!
dave

P.S.	If you want to really get mired down, I traced execution into the
	kernal where I hit:

	fc1f6c	btst	#7,124(a6)	; a6 = 676, 124(a6) = 0
		beq	failure		; which is what happens
342.238007::SMCAFEESteve McAfeeMon Feb 23 1987 11:476
    
    Uhh. Off the usenet?  I haven't gotten any messages in weeks.
    
    sorry to digress.
    
    steve mcafee