View source code
Display the source code in dmd/backend/disasm86.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.

Function dmd.backend.disasm86.getopstring

Write to put() the disassembled instruction

void getopstring (
  nothrow @nogc void delegate(char) put,
  ubyte[] code,
  uint c,
  uint siz,
  uint model,
  int nearptr,
  ubyte bObjectcode,
  nothrow @nogc const(char)* function(uint, uint, uint) mem,
  nothrow @nogc const(char)* function(ubyte[], uint, int) immed16,
  nothrow @nogc const(char)* function(uint, uint, bool, bool) labelcode,
  nothrow @nogc const(char)* function(uint, int) shortlabel
) nothrow @nogc @trusted;

Parameters

NameDescription
put function to write the output string to
code instruction bytes
c address (index into code[]) of start of instruction to disassemble
siz number of bytes in instruction (from calccodsize())
model memory model, 16/32/64
nearptr use 'near ptr' when writing memory references
bObjectcode also prepend hex characters of object code
mem if not null, then function that returns a string representing the label for the memory address. Parameters are c for the address of the memory reference in code[], sz for the number of bytes in the referred to memory location, and offset for the value to be added to any symbol referenced.
immed16 if not null, then function that returns a string representation of immediate value. Parameters are code is the binary instructions, c is the address of the memory reference in code[], sz is the number of bytes in the instruction that form the referenece (2/4/8)
labelcode if not null, then function that returns a string representation of code label. Parameters are c is the address of the code reference to the label in code[], offset is the address of the label in code[], farflag is if far reference (seg:offset in 16 bit code), is16bit is if 16 bit reference
shortlabel if not null, then function that returns a string representing the label for the target. Parameters are pc for the program counter value, and offset for the offset of the label from the pc.

Authors

Walter Bright

License

Boost License 1.0