Question

I know that this code here is supposed to create a segment containing the 16-bit code and the data.

segment code16 para public use16
assume cs:code16, ds:code16

But I'm not sure what is the format here.

I think that segment means we are declaring a segment, code16 is the name, but I'm not sure about para public use16.

And may be assume cs:code16, ds:code16 means that we'll be using it for both the code and data.

Était-ce utile?

La solution

para
This is the segment alignment. para is short for "paragraph", which in this context means 16 bytes. So you're aligning the segment on a 16 byte boundary.

public
This is the segment combine type. public means that all segments with this name should be concatenated into a single segment.

use16
This means that the segment will use 16-bit encoding for instruction by default, and that 32-bit instructions will need prefixed opcodes if they'd otherwise be ambigous.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top