• 2026-09-21 The first code to run on the A5

    tomdehavas • an hour ago • 1 comment

    This is the code with comments removed. It is explained in detail here https://a5computer.com/code/firstever.html
    but briefly 

    016 04000020 :ADDRESS 16#100010 017 04000020 018 04000020 .START 019 04000020 ;Experiment to move an immediate value in and out of A3 020 04000020 000000 000 0 11 100 000 010 011 MOV (PC++) DAR 021 04000021 001 100 110 011 001 100 110 011 :WORD 16#333333 022 04000022 000000 000 0 00 011 111 000 000 MOV DAR A3 023 04000023 000000 000 0 00 111 011 000 000 MOV A3 ADR 024 04000024 000000 000 0 00 000 000 000 000 NOP 025 04000025 026 04000025 ;Jump back to START 027 04000025 000000 000 0 11 100 000 010 011 MOV (PC++) DAR 028 04000026 000 100 000 000 000 000 010 000 :WORD .START 029 04000027 000000 000 0 00 011 100 000 000 MOV DAR PC

  • The three digit number on the extreme left is the line number in decimal.
  • The number following it is the memory address of the instruction in octal.
  • The binary numbers where they appear are the instruction stored at the address or the constant :WORD value. 
  • They are broken into blocks of binary digits because each block is a part of the instruction and has a particular meaning;

    • 23-18 ALU Function
    • 17-15 3bit Test Condition if any use 000 for no test
    • 14 Test for 0 or 1 use 0 for no test
    • 13 Ax_CountOrHold
    • 12 Ax_DownOrUp
    • 11-9 Source Address
    • 8-6 Destination Address
    • 5-3 Source Data
    • 2-0 Destination Data
  • Then follows the mnemonic and the parameters. (PC++) means the contents of the memory location pointed to by PC and then increment PC again after this instruction.
  • The PC is the Program Counter
  • A3 is an address register connected to the address bus
  • DAR the Data bus to Address bus Register
  • ADR the Address bus to Data bus Register