This is a temporary, read-only recovery of the chessprogrammingwiki while a longer-term plan is worked out. Editing is not possible right now, but will be again soon.
Chess Programming Wiki All pages Other namespaces

Assembly

Home * Programming * Languages * Assembly

Assembly is a family of low-level languages for programming computers. They implement a symbolic representation of the machine instructions and data needed to program a particular CPU architecture with its particular instruction- and register set. An assembler is used to translate the assembly source code into executable machine instructions in object code. Almost each architecture and its extensions have their own proprietary assembly language with different syntax and mnemonics for operations, data declarations etc..

Contents
  1. Assembler
    1. CDC 6600/Cyber
    2. Cray
    3. Intel/AMD
      1. Architectures
      2. Syntax
    4. PDP-6
  2. Inline Assembly
  3. See also
  4. Publications
  5. Listings
  6. Manuals
    1. 6502
    2. 68000
    3. Alpha
    4. ARM
    5. Fairchild F8
    6. HP Saturn
    7. PowerPC
    8. SPARC
    9. x86-64
    10. Z80
  7. Forum Posts
  8. External Links
    1. DEC
    2. IBM
    3. Intel
  9. References

Assembler

CDC 6600/Cyber

Mobility in Chess 4.6 based on 47 CXi Xk Population Count, written in COMPASS, the CDC Macro Assembler for the CDC 6600 and CDC Cyber 1. The square list aka bitboard was loaded into two 60-bit registers, with both populations added and stored.

** COUNTS - COUNT MEMBERS OF A SQUARE LIST

COUNTS MACRO Y
.STST
LOADS Y
.CHK2
CX'.S1' X'.S1'
CX'.S2' X'.S2'
IX'.SS' X'.S2'+X'.S1'
.STND
COUNTS ENDM 
...
SETQ MOBIL,(PLUS,(COUNTS,(INDEXS,ATKFR,(LSHIFT,SQLN,1))),MOB

Cray

Cray Assembly Language (CAL) 2, some snippet from Cray Blitz Bitboard code for the Cray-1 or Cray X-MP 3:

l1020    =         *              
         s3        msave3-1,a2    
         s4        msave4-1,a2    
         a4        pcount-1,a1    
         a6        pcount-1,a5    
         pfirst-1,a1 s1           
         plast-1,a1 s2            
         pfirst-1,a5 s3           
         plast-1,a5 s4            
         a4        a4-1           
         a6        a6+1           
         pcount-1,a1 a4           
         pcount-1,a5 a6    

Intel/AMD

Architectures

CPU Assemblers
8080 / Z80 ASM80
8086 MASM, TASM, NASM, GNU Assembler
x86 FASM, MASM, NASM, TASM, GNU Assembler
x86-64 MASM64, NASM, GNU Assembler

Syntax

Intel-Syntax: operation target, source

  add rax, rdx  ; rax += rdx

AT & T Syntax operation source, target

  addq %rdx, %rax  /* rax += rdx */

PDP-6

HAKMEM 169, to count the ones in a PDP-6/PDP-10 36-bit word, written in MIDAS 4:

   LDB B,[014300,,A]      ;or MOVE B,A then LSH B,-1
   AND B,[333333,,333333]
   SUB A,B
   LSH B,-1
   AND B,[333333,,333333]
   SUBB A,B               ;each octal digit is replaced by number of 1's in it
   LSH B,-3
   ADD A,B
   AND A,[070707,,070707]
   IDIVI A,77             ;casting out 63.'s

Inline Assembly

Inline assembly is embedded inside various C, C++, D, Pascal and Delphi compiler 5.

See also

Publications

Listings

Manuals

6502

68000

Alpha

ARM

Fairchild F8

HP Saturn

PowerPC

SPARC

x86-64

Z80

Forum Posts

DEC

IBM

Intel

References

Up one Level


  1. Chess 4.6 source code, gift of David Slate, from The Computer History Museum, pdf↩︎

  2. Cray Assembly Language Reference - iPaper↩︎

  3. Robert Hyatt's Cray Blitz crayblitz.tar.gz Source Code see folder CAL, unmake.s↩︎

  4. HAKMEM 169 by Gosper, Mann, Lenard, [Root and Mann], HAKMEM↩︎

  5. Inline assembly for x86 in Linux by IBM↩︎

  6. pdf download link by Rodnay Zaks↩︎

  7. Macintosh Programmer's Workshop from Wikipedia↩︎

  8. Coding Horror: There Ain't No Such Thing as the Fastest Code by Jeff Atwood, February 19, 2008↩︎

  9. Re: Developments of the last two years by Don Dailey, CCC, March 03, 2013↩︎

  10. MIT PDP-10 'Info' file converted to Hypertext 'html' format by Henry Baker↩︎

What links here

Contributors: GerdIsenberg.