the two instructions

AHI     1,-1
AHI     1,X'FFFF'
-
if they are compiled produce coding

00000000 90EC D00C              0000000C      5          STM     14,12,12
(13)
00000004 A71A FFFF               FFFFFFFF      6          AHI     1,-1

00000008 A71A FFFF               0000FFFF      7          AHI     1,X'FFFF'



the development in the compilation of any immediate operand depends on the
type of instruction in which it is used and how it is interpreted by the
instruction itself.

with reference to: principle of operation v2r2:

for example considering the move immediate instructions we have:

For MOVE (MVC), each operand is processed left to right. When the operands
overlap, the result is obtained as if the operands were processed one byte
at a time and each result byte were stored immediately after fetching the
necessary operand byte.
For MOVE (MVI, MVIY), the first operand is one byte in length, and only one
byte is stored.
For MOVE (MVGHI, MVHHI, and MVHI,), the second operand is treated as a
16-bit signed integer, signextended as necessary,
 and placed in the first-operand location.
The first operand is two, four, or eight bytes for MVHHI, MVHI, and MVGHI,
respectively.


Aldo Crosio
tel:   051-4991812 /3488858416
fax:  051-6255762


CSE Consorzio Servizi Bancari
Società consortile a responsabilità limitata
Via Emilia n. 272
40068-San Lazzaro di Savena (BO)


Ai sensi del D.Lgs. 196/2003 si precisa che le informazioni contenute nel 
presente messaggio, corredato dei relativi allegati, sono strettamente 
riservate ed a uso esclusivo dei destinatari. Qualora Le fosse pervenuto per 
errore, La invitiamo ad eliminarlo immediatamente, dandocene gentilmente 
comunicazione. Grazie.
------------ *** ------------ *** ------------ *** ------------

Reply via email to