contents   index   previous   next



Dos.offset()

syntax:

Dos.offset(buf)

Dos.offset(address)

where:

buf - a byte buffer.

 

address - address in memory.

 

return:

number - offset of buffer such that 8086 would recognize the address segment::buffer as pointing to the first byte of buf.

 

description:

Dos.segment() and Dos.offset() return the segment and offset of the data at index 0 of buf, which must be a byte array. The buffer must be big enough for whatever purpose it is used, and no changes may be made to the size of buf after these values are determined since changing the size of buf might change its absolute address. If the address versions are used, then address is assumed to be a far pointer to data, and segment will be the high word while address will be the low word. See Dos.address() for converting segment and offset into a single address.

 

see:

Dos.offset(), Dos.address()

 

 


Dos.outport()