Miasm2
 All Classes Namespaces Files Functions Variables Typedefs Properties Macros
Classes | Macros | Functions
JitCore_msp430.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  vm_cpu_t
 

Macros

#define RETURN_PC   return BlockDst;
 

Functions

uint16_t bcdadd_16 (uint16_t a, uint16_t b)
 
uint16_t bcdadd_cf_16 (uint16_t a, uint16_t b)
 
uint16_t hex2bcd_16 (uint16_t a)
 
uint8_t hex2bcd_8 (uint8_t a)
 
uint8_t bcd2hex_8 (uint8_t a)
 
uint16_t bcd2hex_16 (uint16_t a)
 

Macro Definition Documentation

#define RETURN_PC   return BlockDst;

Definition at line 158 of file JitCore_msp430.h.

Function Documentation

uint16_t bcd2hex_16 ( uint16_t  a)
uint8_t bcd2hex_8 ( uint8_t  a)
uint16_t bcdadd_16 ( uint16_t  a,
uint16_t  b 
)

Definition at line 335 of file vm_mngr.c.

336 {
337  int carry = 0;
338  int i,j = 0;
339  uint16_t res = 0;
340  int nib_a, nib_b;
341  for (i = 0; i < 16; i += 4) {
342  nib_a = (a >> i) & (0xF);
343  nib_b = (b >> i) & (0xF);
344 
345  j = (carry + nib_a + nib_b);
346  if (j >= 10) {
347  carry = 1;
348  j -= 10;
349  j &=0xf;
350  }
351  else {
352  carry = 0;
353  }
354  res += j << i;
355  }
356  return res;
357 }

+ Here is the call graph for this function:

uint16_t bcdadd_cf_16 ( uint16_t  a,
uint16_t  b 
)

Definition at line 359 of file vm_mngr.c.

360 {
361  int carry = 0;
362  int i,j = 0;
363  int nib_a, nib_b;
364  for (i = 0; i < 16; i += 4) {
365  nib_a = (a >> i) & (0xF);
366  nib_b = (b >> i) & (0xF);
367 
368  j = (carry + nib_a + nib_b);
369  if (j >= 10) {
370  carry = 1;
371  j -= 10;
372  j &=0xf;
373  }
374  else {
375  carry = 0;
376  }
377  }
378  return carry;
379 }

+ Here is the call graph for this function:

uint16_t hex2bcd_16 ( uint16_t  a)
uint8_t hex2bcd_8 ( uint8_t  a)