private SubField[] parseSubFields(String name, int ior, String desc) {
        int totalbits = 0;
        int count = 0;
        SubField[] sfs = new SubField[8];
        StringCharacterIterator i = new StringCharacterIterator(desc);
        int ior_hbit = 7;
        while ( ior_hbit >= 0 && i.current() != CharacterIterator.DONE ) {
            if ( i.current() == '.') {
                ior_hbit = readUnusedField(i, sfs, count, ior_hbit);
                totalbits += sfs[count].length;
            } else if ( i.current() == 'x') {
                ior_hbit = readReservedField(i, sfs, count, ior_hbit);
                totalbits += sfs[count].length;
            } else {
                ior_hbit = readNamedField(i, ior, sfs, count, ior_hbit);
                totalbits += sfs[count].length;
            }
            count++;
            StringUtil.peekAndEat(i, ',');
            StringUtil.skipWhiteSpace(i);
        }

        // check that there are exactly 8 bits
        if ( totalbits != ioreg_length ) {
            throw new Util.Error("Layout Error", "expected "+ioreg_length+" bits, found: "+totalbits+" in "+StringUtil.quote(name));
        }

        // resize the array to be smaller
        SubField[] subFields = new SubField[count];
        System.arraycopy(sfs, 0, subFields, 0, count);
        // calculate the commit points (i.e. last write to the field)
        HashSet fs = new HashSet();
        for ( int cntr = subFields.length - 1; cntr >= 0; cntr-- ) {
            SubField subField = subFields[cntr];
            if ( !fs.contains(subField.field) ) subField.commit = true;
            fs.add(subField.field);
        }
        return subFields;
    }