Assembler

From RoutineWiki

Jump to: navigation, search

Contents

big numbers

In this section, you can find useful subroutines for handling big numbers. These routines were written (not translated) in assembler to speed up the bbnum library.

requirements

  • NASM : All the following assembler source code subroutines were written for the incredible good compiler NASM.
  • Header files : The following header files are required for compiling the big-numbers soubroutines
    • macros.inc : general purpose useful macros.
    • fpu.inc : specific macros for the big-numbers routines.

logical

  • bsfbi.asm  : Gets the order of the less significative bit with value 1 in the bigint buffer.
  • bsrbi.asm  : Gets the order of the more significative bit with value 1 in the bigint buffer.
  • nbsfbi.asm : Gets the order of the less significative bit with value 0 in the bigint buffer.
  • nbsrbi.asm : Gets the order of the more significative bit with value 0 in the bigint buffer.
  • negbi.asm  : Two's complement of bigint.
  • shrdw.asm  : Logical bit shift right.
  • shldw.asm  : Logical bit shift left.

memory


conversion

  • ascbi.asm : Creation of decimal ascii representation from bigint.
  • biasc.asm : Creation of bigint from decimal ascii representation.
  • hexbi.asm : Creation of hexadecimal ascii representation from bigint.

validation

  • cutbi.asm : Cleaning of non-significative digits.
  • error.asm : Error handling subroutines and error state data.

arithmetic

  • addbi.asm  : Addition of two bigint objects.
  • cmpbi.asm  : Comparation of two bigint objects.
  • diubi.asm  : Incomplete division between a bigint object and a unsigned dword.
  • divbi01.asm  : Incomplete division between positive bigint objects.
  • divbi.asm  : Incomplete division between bigint objects.
  • mswbi.asm  : Multiplication of a bigint object by a signed dword.
  • mulbi.asm  : Multiplication of bigint objects.
  • muwbi.asm  : Multiplication of a bigint object by a unsigned dword.
  • prmtable.asm : Creation of incremental prime number table.
  • sardw.asm  : Arithmetical bit shift right.
  • subbi.asm  : Substraction of bigint objects.
  • tstbi.asm  : Sign and zero check of a bigint object.
  • wpwbi.asm  : Dword left shift of a bigint with a needed extensions.

Others

  • data.asm  : Required data and constants.
Personal tools