Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
ctboard:peripherals:dipsw [2022/12/27 16:38] – [Registers] ruanctboard:peripherals:dipsw [2026/06/25 14:53] (current) – [Programming Example] scbj
Line 31: Line 31:
 \\ \\
  
-<code asm+<code text
-ADDR_DIPSW      EQU      0x60000200+.equ ADDR_DIPSW,     0x60000200
                                  
-                LDR      r0, =ADDR_DIPSW +        ldr     r0,  =ADDR_DIPSW 
-                LDRB     r1, [r0, #0]          Read byte from S7..0. +        ldrb    r1,  [r0, #0]          // Read byte from S7..0. 
-                LDRH     r1, [r0, #2]          Read half word from S31..16. +        ldrh    r1,  [r0, #2]          // Read half word from S31..16. 
-                LDR      r1, [r0, #0]          Read all DIPSW at once into a word.+        ldr     r1,  [r0, #0]          // Read all DIPSW at once into a word.
 </code> </code>
 \\ \\
  • ctboard/peripherals/dipsw.1672159083.txt.gz
  • Last modified: 2022/12/27 16:38
  • by ruan