Echelon Neuron Manual de usuario Pagina 203

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 237
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 202
_sign_extend16 (Convert 8 Bit to 16 Bit, Preserve
Sign)
This function sign extends an 8-bit value. If the most-significant byte (MSB) of
the value is 1, then the high byte is 255; otherwise it is 0.
Stack Transformation: (value -- valuelo, valuehi)
Location: Near
Registers Affected: None
Example:
This example sign extends -2.
push #@lb(-d’2) ; (h’fe)
call _sign_extend16 ; (h’fe, h’ff)
_sub16 (Subtract, 16 Bit)
This function subtracts two 16-bit integers.
Stack Transformation: (a(2), b(2) -- a(2) - b(2))
Location: Near
Registers Affected: None
Example:
This example subtracts 50 from 300.
pushd #d’300 ; (d’44, 1)
pushd #d’50 ; (d’50, 0, d’44, 1)
call _sub16 ; (d’250, 0)
_sub16s (Subtract Signed, 16 Bit)
This function subtracts two signed 16-bit integers.
Stack Transformation: (a(2), b(2) -- a(2) - b(2))
Location: Near
Registers Affected: None
Example:
This example subtracts 50 from 300.
pushd #d’300 ; (d’44, 1)
Neuron Assembly Language Reference 193
Vista de pagina 202
1 2 ... 198 199 200 201 202 203 204 205 206 207 208 ... 236 237

Comentarios a estos manuales

Sin comentarios