Skip to Content
Amiga Assembly Library v41.21 — Motorola 68020 shared library for Commodore Amiga

FindREI

Synopsis

rei = FindREI(name) D0 A1

C Prototype

struct REI *FindREI(STRPTR);

Description

Searches the internal lists for the REI structure that matches the name provided in the inputs. If no list exists, it means no interface has been opened, and the function fails. If the name is found, the address of the matching REI is returned.

Inputs

  • name — Address of the name of the REI to search for. This must be a null-terminated string.

Result

  • rei — If NULL, the REI could not be found because no matching name was found. Otherwise, returns the address of the matching REI.

Example

/* C Only Example */ struct Interface *i = OpenInterface("I:test.rei"); struct REI *myrei = FindREI("Screen n.1"); /* etc... */

See Also

ActiveREI, OpenREIA

Implementation

The original 68020 assembly implementation:

; (20-Jan-1995) --- rei = FindREI(name) (a1) _LVOFindREI move.l a1,d0 beq.s FDRExit move.l ab_ExecBase(a6),a0 move.l ([ThisTask.w,a0],TC_Userdata.w),d0 * (Struct MinList *) beq.s FDRExit move.l d0,a0 FINDNAME FDRExit rts
Last updated on