Topic : The ATARI Compendium
Author : Scott Sanders / JAY Software
Version : 1.25 (20/6/2003)
Subject : Documentation
Nodes : 1117
Index Size : 32614
HCP-Version : 6
Compiled on : Atari
@charset : UTF-8
@lang : en
@default :
@help : %About
@options : +g -i -t4 +y +z
@width : 100
View Ref-FileBconin()Bconout()Rsconf()Iorec()Bconmap() XBIOSSyntaxLONG Bconmap( devno )
WORD devno;
Function Bconmap() maps a serial device to BIOS device #1. It is also
used to add serial device drivers to the system.
Opcode 44 (0x2C)
Availability To reliably check that Bconmap() is supported, the TOS version must be 1.02 or higher and the following function
should return a TRUE value.
#define BMAP_EXISTS 0
BOOL IsBconmap( VOID )
{
return (Bconmap(0) == BMAP_EXISTS);
}
Parameters The value of devno has the following effect:
Name devno Meaning
BMAP_CHECK 0 Verify the existence of the call
(systems without Bconmap() will return
the function opcode 44).
- 1-5 These are illegal values (will return 0).
See XBIOS 6- Redefine BIOS device 1 (the GEMDOS Serial Port 'aux:' device) to map to the named
Mapping serial device. All Bcon...(1,...),
for Rsconf(), and Iorec() calls will return
constants. information for the named device.
Returns the old value.
BMAP_INQUIRE -1 Don't change anything, simply return
the old value.
BMAP_MAPTAB -2 Return a pointer to the serial device
vector table (see below).
Binding move.w devno,-(sp)
move.w #$2C,-(sp)
trap #14
addq.l #4,sp
Return Value See above.
Caveats You should never install the 38th device (BIOS device number
44). It would be indistinguishable from the case where
Bconmap() was unavailable. In the unlikely event that this
case arises, you should install two new devices and assign
your new device to the second one.
All current versions of Falcon030TOS (4.00 - 4.04) contain
a bug that prevents the BIOS from accessing the extra
available devices. A patch program named FPATCH2.PRG is
available from Atari Corporation to correct this bug in
software.
Comments To add a serial device to the table, use Bconmap(-2) to
return a pointer to a BCONMAP structure. maptab points to
a list of MAPTABstructures (the first entry in MAPTAB is
the table for device number 6). The list will contain
maptabsize devices. Allocate a block of memory large enough
to store the old table plus your new entry and copy the old
table and your new device structure there making sure to
increment maptabsize. Finally, alter maptab to point to your
new structure.
typedef struct
{
WORD (*Bconstat)();
LONG (*Bconin)();
LONG (*Bcostat)();
VOID (*Bconout)();
ULONG (*Rsconf)();
IOREC *iorec; /* See Iorec() */
} MAPTAB;
typedef struct
{
MAPTAB *maptab;
WORD maptabsize;
} BCONMAP;
See Also Bconin(), Bconout(), Rsconf(), Iorec()