Zilog Z80380 Manual do Utilizador Página 49

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 116
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 48
UM004001-COR1103 2–15
C-Compiler Overview Incorporating C with assembly
call.ib _imul; (hl)=product
add sp,4; clean the stack
ret; return result in (hl)
Referenced C file.
typedef unsigned long uint32;
typedef unsigned short uint16;
typedef char int8;
uint32
imul(uint16 x, uint16 y)
{
uint32 res;
int8 i;
res = 0;
for (i=0; i < 16; i++)
{
if (y & 1)
{
res += x;
}
x = x << 1;
y = y >> 1;
}
return res;
}
Vista de página 48
1 2 ... 44 45 46 47 48 49 50 51 52 53 54 ... 115 116

Comentários a estes Manuais

Sem comentários