8bit
Electronics & Computers
6809
2023.11.19 05:26:35 - 2024.02.23 17:55:19 end 6809 HW OMENkilo SW Gilhad

2   External clock

XTAL (39) and EXTAL (38) slouží pro připojení krystalu, alternativně na EXTAL 38 mohou být připojeny externí TTL hodiny, XTAL se pak nechá nezapojený (plovoucí)

3   Missing instructions

  • ABA ADD acumulator B to acumulator A
    • PSHS B
      ADDA ,S+
      
    • wer twtre

  • wer
    • something else

4   Optimalizace 6309

  • AIM - AND with Immediate
    7/4     AIM     #~$40,V_ACIA_CTRL_byte
    4/3     LDA     V_ACIA_CTRL_byte
    11/7 (nebo 7/4)
    
    vs.
    4/3     LDA     V_ACIA_CTRL_byte
    2/2     ANDA    #~$40
    4/3     STA     V_ACIA_CTRL_byte
    10/8
    

7   Push order for 6809 stack:

(Made with DrawIt VIM plugin)

                  New S                                 Old S
                  |                                     |
                  |                                     |
$0000             v                                     v                 $FFFF
+--+-     -+--+--+--+--+--+--+--+--+--+--+--+--+---+---+--+--+--+--+-     -+--+
|..|.......|..|..|CC| A| B|DP|Xh|Xl|Yh|Yl|Uh|Ul|PCh|PCl|##|##|##|..|.......|..|
+--+-     -+--+--+--+--+--+--+--+--+--+--+--+--+---+---+--+--+--+--+-     -+--+
                                         |Sh|Sl|
                                         +--+--+ for PSHU ...

    PUSH / PULL order

         +-----+-----------------------------+
         | CC  | Condition Code Register     |      .
    |    +-----+-----------------------------+     /_\
    |    | A   | A Accumulator               |      |
    |    +-----+-----------------------------+      |
         | B   | B Accumulator               |      |
    P    +-----+-----------------------------+
    U    | DP  | Direct Page Register        |      P
    L    +-----+-----------------------------+      U
    L    | X   | X Index Register            |      S
         +-----+-----------------------------+      H
    |    | Y   | Y Index Register            |
    |    +-----+-----------------------------+      |
   _|_   | S/U | Hardware/User Stack Pointer |      |
   \ /   +-----+-----------------------------+      |
    '    | PC  | Program Counter             |
         +-----+-----------------------------+