• Aucun résultat trouvé

Set Memory and Port Content Commands

The commands in this section set new values or change the current content stored in designated memory locations or input/output ports. The commands discussed in this section are as follows. The purpose of each command is indicated by its title.

Command

Set Memory Contents

Set'lnput/Output Port Contents

Discussion

Memory Content References

A memory content reference has the form:

memory-type address

[!!mod-name 1 !symbol-name ...

The meta-term memory-type means one of the following 'content-of' modifiers for memory locations.

BYTE

WORD

SINTEGER INTEGER POINTER

REAL

The content of a single byte (8-bit) memory'lucation. The address following BYTE is treated as a logical address; the physical address whose content is referenced is determined by look-up in the ICE-86A memory map (see Memory and I/O Port Mapping Commands).

The content of two adjacent bytes in memory. The most-significant byte is located in the high address of the address pair; the least-significant byte is stored in the low address of the pair. The address following WORD is treated as a logical address; the ICE-86A memory map is consulted to find the physical address whose con-tent is referenced.

The same as BYTE except when displaying.

The same as WORD except when displaying.

The content of four adjacent bytes in memory, interpreted as a base and displacement. The displacement is located at the low 2 bytes of the 4, and the base is at the high 2 bytes. The address following POINTER is treated as a logical address; the ICE-86A ~emory

map is consulted to find the physical address whose content is referenced.

(Also called "Short Real" in some manuals.) The content of four adjacent bytes in memory, interpreted as a real number. The address following REAL is treated as a logical address; the ICE-86A memory map is consulted to find the physical address whose content is referenced. The highest bit of the highest byte con-tains the sign field. The exponent field stretches from the highest bit of the highest byte through the highest bit of the second-highest byte (eight bits). The remaining twenty-three bits are dedicated to storing the significand field.

ICE-86A

DREAL

TREAL

(Also called "Long Real" in some manuals.) The content of eight adjacent bytes in memory, interpreted as a real number. The address following DREAL is treated as a logical address; the I CE-86A memory map is consulted to find the physical address whose content is referenced. The highest bit of the highest byte con-tains the sign field. The exponent field stretches from the second-highest bit in the second-highest byte through the fourth-second-highest bit in the second highest byte (eleven bits). The remaining fifty-two bits are dedicated to storing the significand field.

(Also called "Temporary Real" in some manuals.) The content of ten adjacent bytes in memory, interpreted as a real number. The address following TREAL is treated as a logical address; the ICE-86A memory map is consulted to find the physical address whose content is referenced. The highest bit of the highest-addressed byte contains the sign field. The exponent field stretches from the second-highest bit of the highest byte to the lowest bit of the second-highest byte (fifteen bits). The remaining sixty-four bits are dedicated to storing the significand field.

Real numbers (type REAL, OREAL, or TREAL) are stored in three "fields": the number's significant digits are held in the significand field, the exponent field locates the binary point within the significant digits, and the sign field indicates whether the number is positive or negative. The most significant digits of each field are stored in the highest addresses. See figure 7-1 for the format of these types in memory.

See The 8086 Family User's Manual Numerics Supplement, Manual Order Number:

121586, for further details on the storage of real values.

The meta-term address means one of the following types of entries.

numeric-expression The forms for numeric expressions are presented in Chap-ter 5. The result obtained when the expression is evaluated becomes an address modulo 64K.

(mem-type address) A memory content reference with a form such as BYTE (WORD 1000) represents an indirect reference. The content of the address or address-pair inside the parentheses is treated as the address for the mem-type outside the parentheses.

To obtain the content of bytes, words, or pointers in a range of addresses, use the form:

memory-type partition

Apartition can be a single address or one of the following types of constructs:

address TO address

address LENGTH number-ot-bytes (for BYTE and SINTEGER) address LENGTH number-ot-words (for WORD and INTEGER) address LENGTH number-dt-doub/e-words (for POINTER)

The first form of partition uses the keyword TO. The address on the right of the

keyword TO must be greater than or equal to the one on the left. With BYTE and SINTEGER, this form allows you to access the content of each byte location in the

7-35

Interrogation and Utility Commands

MSE/LSE: Mosllieast significant exponent bit MSS/LSS: Mostlleast significant significand bit

IL

Is

Figure 7-1. REAL, DREAL and TREAL Memory Types 162554-8

range; the range includes both the first and last address in the partItIon. With WORD or INTEGER, the first address is treated as the low address of the first address pair in the range; subsequent pairs of addresses are accessed until the second address is reached. If the second address is the low address of a pair, the word formed from the content of that address and the next consecutive higher address is accessed; if the second address is not the low address of a pair (that is, if it turns out to be the high address of a pair already accessed in the range), the access ends after the last complete pair has been accessed. Word-length accesses can begin on either an even-numbered or an odd-numbered address. With POINTER, the first address is treated as the low address of the first address quadruple in the range; subsequent quadruples of addresses are .accessed until the second address is reached. If the second address is thd.ow address of a quadruple, the pointer formed from the con-tent of that address and the next three consecutive higher addresses is accessed; if the second address is not the

low

address of the quadruple, the access ends after the last quadruple has been accessed. Pointer-length accesses can begin on either an even-numbered or an odd-even-numbered access.

lCE-86A

The second, third and fourth forms use the keyword LENGTH. The address preceding the keyword LENGTH is the starting address in the range, as with the first form (using TO). The number or expression following the keyword LENGTH gives the number of addresses (when the controlling memory-type is BYTE or SINTEGER), the number of address pairs (for WORD or INTEGER), or the number of addresses quadruples (for POINTER). (Must be an integer value.)