pub struct Env { /* private fields */ }
Expand description

Environment of the assembly

Implementations

Symbols handling

Compute the expression thanks to the symbol table of the environment. If the expression is not solvable in first pass, 0 is returned. If the expression is not solvable in second pass, an error is returned

However, when assembling in a crunched section, the expression MUST NOT fail. edit: why ? I do not get it now and I have removed this limitation

Report handling

Error handling

If the error has not been raised at the previous pass, store it and do not propagate it. Otherwise, propagate it

Create an environment that embeds a copy of the given table and is configured to be in the latest pass. Mainly used for tests.

Output handling

Return the address where the next byte will be written

Return the address of dollar

. Update the value of $ in the symbol table in order to take the current output address

Produce the memory for the required limits TODO check that the implementation is still correct with snapshot inclusion BUG does not take into account extra bank configuration

Returns the stream of bytes produced for a 64k compilation

Returns the address of the 1st written byte

Returns the address from when to start the program TODO really configure this address

Output one byte either in the appropriate bank of the snapshot or in the termporary bank return true if it raised an override warning

Write consecutives bytes

Get the size of the generated binary. ATTENTION it can only work when geneating 0x10000 files

Evaluate the expression according to the current state of the environment

Write in w the list of symbols

Visit all the tokens of the slice of tokens. Return true if an additional pass is requested

return the page and bank configuration for the given address at the current mmr configuration https://grimware.org/doku.php/documentations/devices/gatearray#mmr

Remove the given variable from the table of symbols

Print the evaluation of the expression in the 2nd pass

Handle a crunched section. bytes generated during previous pass or previous loop are provided TO NOT crunched them an additional time if they are similar

Handle the switch directive

Handle the iterate repetition directive Values is either a list of values or a Expression that represents a list

Handle the for directive

Handle the standard repetition directive

Handle the statndard repetition directive

Macro related code

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Converts self into T using Into<T>. Read more

Causes self to use its Binary implementation when Debug-formatted. Read more

Causes self to use its Display implementation when Debug-formatted. Read more

Causes self to use its LowerExp implementation when Debug-formatted. Read more

Causes self to use its LowerHex implementation when Debug-formatted. Read more

Causes self to use its Octal implementation when Debug-formatted. Read more

Causes self to use its Pointer implementation when Debug-formatted. Read more

Causes self to use its UpperExp implementation when Debug-formatted. Read more

Causes self to use its UpperHex implementation when Debug-formatted. Read more

Formats each item in a sequence. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Pipes by value. This is generally the method you want to use. Read more

Borrows self and passes that borrow into the pipe function. Read more

Mutably borrows self and passes that borrow into the pipe function. Read more

Borrows self, then passes self.borrow() into the pipe function. Read more

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more

Borrows self, then passes self.as_ref() into the pipe function.

Mutably borrows self, then passes self.as_mut() into the pipe function. Read more

Borrows self, then passes self.deref() into the pipe function.

Mutably borrows self, then passes self.deref_mut() into the pipe function. Read more

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().

Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().

Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().

Immutable access to a value. Read more

Mutable access to a value. Read more

Immutable access to the Borrow<B> of a value. Read more

Mutable access to the BorrowMut<B> of a value. Read more

Immutable access to the AsRef<R> view of a value. Read more

Mutable access to the AsMut<R> view of a value. Read more

Immutable access to the Deref::Target of a value. Read more

Mutable access to the Deref::Target of a value. Read more

Calls .tap() only in debug builds, and is erased in release builds.

Calls .tap_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_borrow() only in debug builds, and is erased in release builds. Read more

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_ref() only in debug builds, and is erased in release builds. Read more

Calls .tap_ref_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_deref() only in debug builds, and is erased in release builds. Read more

Calls .tap_deref_mut() only in debug builds, and is erased in release builds. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Attempts to convert self into T using TryInto<T>. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.