label   DCB value[, value ...]

        Allocate a byte space in read only memory for the value or list of values
503417
def directive_DCB(self, label, params):
        
        # TODO make this read only
        # TODO check for byte size
        self.labels[label] = self.space_pointer
        if params in self.equates:
            params = self.equates[params]
        self.memory[self.space_pointer] = self.convert_to_integer(params) & 0xFF
        self.space_pointer += 1
309077
def convert_bytes(b):
    ''''''
    if b is None:
        return '#NA'
    for s in reversed(memory_symbols):
        if b >= memory_size[s]:
            value = float(b) / memory_size[s]
            return '%.1f%sB' % (value, s)
    return "%sB" % b
364818
def write(self, offset, value):
		
		if(not self.mode & 0b10):
			raise ReadOnlyError("Device is Read-Only")
		if(offset >= self.size):
			raise AddressError("Offset({}) not in address space({})".format(offset, self.size))
		self.repr_[offset].setvalue(value)
300212
public static IoBufferEx doEncode(IoBufferAllocatorEx<?> allocator, int flags, WsMessage message, int maskValue) {
        final boolean mask = true;

        IoBufferEx ioBuf = getBytes(allocator, flags, message);
        ByteBuffer buf = ioBuf.buf();

    	boolean fin = message.isFin();

    	int remaining = buf.remaining();

    	int offset = 2 + (mask ? 4 : 0) + calculateLengthSize(remaining);
    		ByteBuffer b = allocator.allocate(offset + remaining, flags);

		int start = b.position();

		byte b1 = (byte) (fin ? 0x80 : 0x00);
		byte b2 = (byte) (mask ? 0x80 : 0x00);

		b1 = doEncodeOpcode(b1, message);
		b2 |= lenBits(remaining);

		b.put(b1).put(b2);

		doEncodeLength(b, remaining);

		if (mask) {
			b.putInt(maskValue);
		}

		if ( mask ) {
            WsFrameUtils.xor(buf, b, maskValue);
        }
            // reset buffer position after write in case of reuse
            // (KG-8125) if shared, duplicate to ensure we don't affect other threads
            if (ioBuf.isShared()) {
                b.put(buf.duplicate());
            }
            else {
                int bufPos = buf.position();
                b.put(buf);
                buf.position(bufPos);
            }
            b.limit(b.position());
            b.position(start);
    		return allocator.wrap(b, flags);
	}
1246712
def p_def_label(p):
    
    p[0] = None
    __DEBUG__("Declaring '%s%s' in %i" % (NAMESPACE, p[1], p.lineno(1)))
    MEMORY.declare_label(p[1], p.lineno(1), p[3])
173480
def convert(self, value, param, ctx):  # pylint: disable=inconsistent-return-statements
        """"""
        matches = MEMORY_RE.match(value.lower())
        if matches is None:
            self.fail('%s is not a valid value for memory amount' % value, param, ctx)
        amount_str, unit = matches.groups()
        amount = int(amount_str)
        if unit in [None, 'm', 'mb']:
            # Assume the user intends gigabytes if they specify a number < 1024
            if amount < 1024:
                return amount * 1024
            else:
                if amount % 1024 != 0:
                    self.fail('%s is not an integer that is divisable by 1024' % value, param, ctx)
                return amount
        elif unit in ['g', 'gb']:
            return amount * 1024
302145
def _allocate_output(self, windows, shape):
        
        if self.dtype == int64_dtype:
            return super(CustomClassifier, self)._allocate_output(
                windows,
                shape,
            )

        # This is a little bit of a hack.  We might not know what the
        # categories for a LabelArray are until it's actually been loaded, so
        # we need to look at the underlying data.
        return windows[0].data.empty_like(shape)
389013
def store_valuerange   # :nodoc:
    record   = 0x101F         # Record identifier.
    length   = 0x002A         # Number of bytes to follow.
    numMin   = 0x00000000     # Minimum value on axis.
    numMax   = 0x00000000     # Maximum value on axis.
    numMajor = 0x00000000     # Value of major increment.
    numMinor = 0x00000000     # Value of minor increment.
    numCross = 0x00000000     # Value where category axis crosses.
    grbit    = 0x011F         # Format flags.

    # TODO. Reverse doubles when they are handled.

    header = [record, length].pack('vv')
    data  = [numMin].pack('d')
    data += [numMax].pack('d')
    data += [numMajor].pack('d')
    data += [numMinor].pack('d')
    data += [numCross].pack('d')
    data += [grbit].pack('v')

    append(header, data)
  end
63382
def reserved(self, value):
        """"""
        self.bytearray[self._get_slicers(2)] = bytearray(c_uint16(value or 0))
1095683
public static final Mem byte_ptr(Label label, Register index, int shift, long disp) {
        return _ptr_build(label, index, shift, disp, SIZE_BYTE);
    }
12259
def fill(self, value=b'\xff'):
        

        previous_segment_maximum_address = None
        fill_segments = []

        for address, data in self._segments:
            maximum_address = address + len(data)

            if previous_segment_maximum_address is not None:
                fill_size = address - previous_segment_maximum_address
                fill_size_words = fill_size // self.word_size_bytes
                fill_segments.append(_Segment(
                    previous_segment_maximum_address,
                    previous_segment_maximum_address + fill_size,
                    value * fill_size_words,
                    self.word_size_bytes))

            previous_segment_maximum_address = maximum_address

        for segment in fill_segments:
            self._segments.add(segment)
206399
def value_to_db(self, value):
        

        assert isinstance(value, str)

        array = value.split("-")
        length = len(array) - 3

        assert length >= 0
        assert array[0] == 'S'

        array = array[1:2] + [length, 0, 0, 0, 0, 0] + array[2:]
        array = [int(i) for i in array]

        return struct.pack('<bbbbbbbb' + 'I' * length, *array)
1355858
public static void longToByteArray(long lValue, byte[] buffer, int nStartIndex) {
	buffer[nStartIndex] = (byte) (lValue >>> 56);
	buffer[nStartIndex + 1] = (byte) ((lValue >>> 48) & 0x0ff);
	buffer[nStartIndex + 2] = (byte) ((lValue >>> 40) & 0x0ff);
	buffer[nStartIndex + 3] = (byte) ((lValue >>> 32) & 0x0ff);
	buffer[nStartIndex + 4] = (byte) ((lValue >>> 24) & 0x0ff);
	buffer[nStartIndex + 5] = (byte) ((lValue >>> 16) & 0x0ff);
	buffer[nStartIndex + 6] = (byte) ((lValue >>> 8) & 0x0ff);
	buffer[nStartIndex + 7] = (byte) lValue;
    }
380100
def declare_label(self, label, lineno, value=None, local=False, namespace=None):
        
        ex_label, namespace = Memory.id_name(label, namespace)

        is_address = value is None
        if value is None:
            value = self.org

        if ex_label in self.local_labels[-1].keys():
            self.local_labels[-1][ex_label].define(value, lineno)
            self.local_labels[-1][ex_label].is_address = is_address
        else:
            self.local_labels[-1][ex_label] = Label(ex_label, lineno, value, local, namespace, is_address)

        self.set_memory_slot()

        return self.local_labels[-1][ex_label]
145329
def to_bytes_or_none(value):
    """"""
    if value == ffi.NULL:
        return None
    elif isinstance(value, ffi.CData):
        return ffi.string(value)
    else:
        raise ValueError('Value must be char[] or NULL')
902375
public static String getVertexId(Value value) {
        byte[] buffer = value.get();
        int offset = 0;

        // skip label
        int strLen = readInt(buffer, offset);
        offset += 4;
        if (strLen > 0) {
            offset += strLen;
        }

        strLen = readInt(buffer, offset);
        return readString(buffer, offset, strLen);
    }
899326
def struct_from_value( cls, name, volume,
			channel_list=None, mute=False, device=None ):
		''
		chan_map = c.PA_CHANNEL_MAP()
		if not channel_list: c.pa.channel_map_init_mono(chan_map)
		else:
			if not is_str(channel_list):
				channel_list = b','.join(map(c.force_bytes, channel_list))
			c.pa.channel_map_parse(chan_map, channel_list)
		if not isinstance(volume, PulseVolumeInfo):
			volume = PulseVolumeInfo(volume, chan_map.channels)
		struct = c.PA_EXT_STREAM_RESTORE_INFO(
			name=c.force_bytes(name),
			mute=int(bool(mute)), device=c.force_bytes(device),
			channel_map=chan_map, volume=volume.to_struct() )
		return struct