public int handler(int offset) {
            //if( errorlog ) fprintf( errorlog, "INPUT e000[%x] \n", offset);
            switch (offset) {
                case 0x0: /* DIPSW 1&2 */

                    return readinputport(4) + readinputport(5) * 256;
                case 0x2: /* IN1-IN2 */

                    return readinputport(0) + readinputport(1) * 256;
                case 0x4: /* ???-??? */

                    return readinputport(2) + readinputport(3) * 256;
                default:
                    return (0xffff);
            }
        }