• Aucun résultat trouvé

Set Memory and Port Content Commands

Dans le document OPER~TING INSTRUCTIONS FOR ISIS-II USERS (Page 178-185)

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 Input/Output Port Contents

Discussion

Memory Content References

A memory content reference has the form:

memory-type address

[ !!mod-name ] !symbol-name ...

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

BYTE

WORD

SINTEGER INTEGER POINTER

The content of a single byte (8-bit) memory location. 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-88 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-88 memory map is consulted to find the physical address whose content 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-88 memory map is consulted to find the physical address whose con-tent is referenced.

ICE-88

ICE-88 Interrogation and Utility Commands

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

numeric-expression The forms for numeric expressions are presented in Chapter 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-ot-double-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 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 the low address of a quadruple, the pointer formed from the content 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-numbered access.

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).

Interrogation and Utility Commands

7-32

Setting Memory Contents

To assign a new content to a byte, sinteger, word, integer, pointer or reallocation, use a command with the form:

I

mem-type address

I

= new-content

numeric-expression A numeric expression evaluated by the ICE-88 emulator to a single number.

If mem-type is a POINTER, new-content must be a pointer value. Otherwise, new-content must be an integer value.

When a single byte address is to be set, the ICE-88 emulator treats the new-content as an 8-bit quantity. If new-content has more than eight bits, the least significant eight bits in the quantity are used as the new content; and the other (higher) bits are lost. If new-content has fewer than eight bits, the bit values in the quantity are right-justified (placed in the low-or.der bits in the address), and the remaining (high) bits in the location are set to zeroes.

Here are some examples of setting byte contents. The first line of each example shows the command that sets the new contents; the second line gives a command that produces a display of the contents just set; the third line shows the resulting display. The output radix is assumed to be H (hexadecimal).

* BYTE 1000H = FFH

ICE-88 Interrogation and Utility Commands

When a single word address is to be set, the ICE-88 emulator treats the new- con-tent as a pair of bytes. The least significant byte is loaded into the low address in the pair, and the most significant byte is loaded into the high address in the pair. If new-content has fewer than 16 bits, the bit values are loaded starting with the low ad-dress, and right-justified. The remaining (high) bits in the address pair are set to zeroes. The following examples demonstrate some of the possibilities for the setting address pairs.

*WORD 1030H = WORD 1000H

*WORD 1030H the quadruple, and most significant byte is loaded into the high address. The follow-ing examples demonstrate some of the possibilities for settfollow-ing pointers.

*POINTER 1000H = 1122:3344H

*POINTER 10000H

POI0000:1000H=1122:3344H

(or) *POI100:0 = 1122:3344H

*POI0:1000H

POI0000:1000H=1122:3344H

A command of the form BYTE X =BYTE Y copies the content of the address Y to the content of address X where addresses X and Yare either integer or pointer values as shown in the examples above. A command of the form WORD X = WORD Y

The commands used to set a range of addresses differ in some details.

One way to set a range of addresses is with the command of the form:

mem-type address =list of new-content values

With this form the address on the left side of the equals sign gives the starting loca-tion and the number of values in the list to the right of the equals sign tells the ICE-88 emulator how many consecutive addresses to load. Consecutive locations are changed to the values of the new-contents in left-to-right order. The list of new content values can consist of expressions, multi-character strings and memory partitions.

Interrogation and Utility Commands

7-34

Here are some examples showing the use of this form of the set memory contents command.

*BYTE 1000H = 11 H, 22H, 33H, 44H, 55H, 66H, 'AB'

* BYT 1000H LEN 8T

BYT 0000:1000H=11 H 22H 33H 44H 55H 66H 41 H 42H

*WOR 200:0H = FFFFH, WORD 100:0H

*WOR 200:0H LENGTH 4T WOR 0200:0000H=FFFFH 2211 H

*POI4000:20H = 1122:3344H, WOR 1002H, BYT 1002

*POI4000:20H

POI4000:0020H=1122:3344 0000:4433 0000:0033

To set a range of addresses all to the same new value, use a command of the form:

mem-type partition = new-content

The forms of partition are discussed above in this section. All addresses in the parti-tion are set to the single new-content value. The following examples show some of the possible results obtained with this command form.

*BYT 1000H TO 1005H =FFH

*BYTE 1000H LEN 5H

BYT 0000:1000H=FFH FFH FFH FFH FFH

*WORD 200:0 LENGTH 6T = AAOOH

*WOR 200:0H TO 200AH

WOR 0200:0000H=AAOOH AAOOH AAOOH AAOOH AAOOH AAOOH

*POINTER 3000H LEN 3T = 1234:5678H POI 0:3000H TO 0:300BH

WOR 0000:3000H=1234:56781234:56781234:5678

The last form of the set memory contents command sets the contents of each address in a range (partition) to the corresponding new-content in a list of values. This form is as follows.

mem-type partition =list of new-content values

This form combines the two forms discussed above. The list of new-content values can consist of expressions, multi-character strings and memory partitions.

If the number of locations in the partition is equal to the number of values in the new-content list, the addressed locations are set to the corresponding values in the list, in left-to-right order.

If the number of locations in the range is greater than the number of new values in the list, the locations are filled with the values from left-to-right, repeating the values in left-to-right order as necessary to fill all the locations. The maximum number of new content bytes that can be repeated is 128. With more than 128 bytes, the data is transferred but not repeated, and an error message is displayed.

If the number of new values in the list is greater than the number of locations in the partition, the lowest location receives the first value, and successive locations in the range receive values in left-to-right order until all locations in the range have re-ceived values. The excess values are then detected by the ICE-88 emulator as an error condition, and an error message is displayed. The excess values are lost.

ICE-88

ICE-88 Interrogation and Utility Commands

Here are a few examples showing this form of command.

* BYT 1 OOOH TO 1004H = 'ABCDE' o,BYT 1000H LEN 5T

BYT OOOO:1000H=41 H 42H 43H 44H 45H o,WORD 200:0H LENGTH 6T = 1122H, 'AB' o,WOR 200:0H TO 200:AH

WaR 0220:0000H=1122H 0041 H 0042H 1122H 0041 H 0042H o,BYTE 1000H TO 1002H = 11H, 22H, 33H, FFH

(an error message such as EXCESSIVE DATA is displayed)

* BYT 100:0 LEN 4T

BYT 1000:0000=11 H 22H 33H 44H

In the third example, note that the byte at location 1003H retains the value set in the first example in the group of examples (44H rather than the FFH given in the command.)

Port Content References

The set port contents commands parallel those of the set memory contents com-mands with exception of port addressing. There are a total of 65536 8-bit ports available for input/output in the ICE-88 emulator. The ports are referenced by the mnemonic PORT. These ports can be referenced as 16-bit ports by the mnemonic WPORT. Each port is referenced by a port-number that is an integer value in the range of 0 through 65535.

To assign a new content to an 8-bit or 16-bit port, use the following command with the form:

port-type port-number

=

new-content

The meta-terms port-type and port-number are used to specify individual ports.

port-type Defines the port type and size:

PORT An 8-bit port.

WPORT A 16-bit port.

port-number An integer value specifying a specific port.

The following are examples of the use of this command form.

PORT 123

=

FFH WPORT 123 = FFFFH

One way of setting a range of ports is with the command of the form:

port-type port-number =/ist of new-content values

With this form the port-number on the left side of the equals sign gives the starting port location and the list to the right of the equals sign tells the ICE-88 emulator how many consecutive ports to load. Consecutive ports are changed to the values of the new-contents in left-to-right order.

Interrogation and Utility Commands

7-36

Here are some examples showing the use of this form.

PORT 1000H

=

11,22, 33H, 44H, 55H, 66H WPORT 1000H

=

1122H, 3344H, 5566H

To set a range of ports all to the same new value, use a command of the form:

port-type partition

=

new-content The following are examples of this form:

PORT 1 OOOH TO 1005

=

FFH

WPORT 2000H LENGTH 20H = FFFFH

The last form of the set port contents sets the contents of each port in a range (parti-tion ) to the corresponding new-content in a list of values. This form is as follows:

port-type partition

=

list of new-content values

If the number of ports in the partition is equal to the number of values in the new-content list, the addressed ports are set to the corresponding values in the list, in left-to-right order.

If the number of ports in the range is greater than the number of new values in the list, the ports are filled with the new values from left-to-right, repeating the values in left-to-right order as necessary to fill all the ports.

If the number of new values in the list is greater than the number of ports in the par-titian, the lowest numbered port receives the first value, and successive ports in the range receive values in left-to-right order until all ports in the range have received values. The excess values are then detected by the ICE-88 emulator as an error con-dition, and an error message is displayed. The excess values are lost.

Here are a few examples showing this form of command.

PORT 1000 TO 1005H = 'ABCDE' WPORT 2000H LEN 6T = 1122H, 'AB' PORT 1000H TO 1002H = IlH, 22H, 33H, FFH

(an error message such as EXCESSIVE DATA is displayed)

ICE·88

ICE-88 Interrogation and Utility Commands

Dans le document OPER~TING INSTRUCTIONS FOR ISIS-II USERS (Page 178-185)