Skip to content

Sample programs

Pavel Dovgalyuk edited this page Nov 26, 2016 · 57 revisions

Fibonacci sequence

 ; A, B, or C contain successive elements of the sequence
  ORG 0
  MOVI A, 1    ; 00: 0000 0000 0000 0001 (0001h)
 Label:
  ADD C, B, A  ; 01: 0100 1010 0001 1000 (4B18h)
  MOV A, B     ; 02: 0001 1000 0001 0000 (1810h)
  MOV B, C     ; 03: 0001 1001 0010 0000 (1920h)
  JMP Label    ; 04: 1000 0111 0000 0001 (8701h)

Multiplication subroutine

TODO

Clone this wiki locally