Reserve registers for a device driver


AllocRegisters( deviceno, registercount )

This command allocates registers for a device driver. Repeated calls will not reset the registers unless the register count changes. There is no need to de-allocate registers as the system will automatically free registers that are not in use.

Up to 150 registers can be allocated for each device, up to 2000 registers total for the ezeio.


deviceno Device number (1-40)
registercount Number of registers to allocate (1-150)

Return value


Example usage

    AllocateRegisters(3, 8);        // Allocate eight registers for device 3
    SetRegister(3, 1, 1234, INT);   // Set register 1 on device 3 to the value 1234
  • ezeio2/scriptref/allocregisters.txt
  • Last modified: 2019-09-02 21:37
  • by andreh