getopstring

Write to put() the disassembled instruction

nothrow @nogc public
void
getopstring
(
void delegate
(
char
)
nothrow @nogc
put
,
ubyte[] code
,
uint c
,
addr siz
,
uint model
,,,
const(char)* function
(
uint c
,
uint sz
,
uint offset
)
nothrow @nogc
mem
,
const(char)* function
(
ubyte[] code
,
uint c
,
int sz
)
nothrow @nogc
immed16
,
const(char)* function
(
uint c
,
uint offset
,
bool farflag
,
bool is16bit
)
nothrow @nogc
labelcode
,
const(char)* function
(
uint pc
,
int offset
)
nothrow @nogc
shortlabel
)

Parameters

put void delegate
(
char
)
nothrow @nogc

function to write the output string to

code ubyte[]

instruction bytes

c uint

address (index into code[]) of start of instruction to disassemble

siz addr

number of bytes in instruction (from calccodsize())

model uint

memory model, 16/32/64

nearptr int

use 'near ptr' when writing memory references

bObjectcode ubyte

also prepend hex characters of object code

mem const(char)* function
(
uint c
,
uint sz
,
uint offset
)
nothrow @nogc

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 const(char)* function
(
ubyte[] code
,
uint c
,
int sz
)
nothrow @nogc

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 const(char)* function
(
uint c
,
uint offset
,
bool farflag
,
bool is16bit
)
nothrow @nogc

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 const(char)* function
(
uint pc
,
int offset
)
nothrow @nogc

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.

Meta