assembly language

Discussion in 'Programmer's Corner' started by chino22, Nov 1, 2006.

  1. chino22

    Thread Starter New Member

    Oct 2, 2006
    6
    0
    How would i write the assembly language for a motorola 68000, that would read from a dip switch and send it to LEDs. Using loop control to move four bits at a time from DIP switch to LED.

    I need this for a single board computer i'm designing. But i dont remember any assembly language. Its been a really long time since i took my assembly lang. class. Can anyone help me out
     
  2. Papabravo

    Expert

    Feb 24, 2006
    10,145
    1,791
    IIRC all I/O is treated like memory in a large linear address space. So I would load an address register with the address of the switches. I would then move the data pointed at by the address register to a data register. Then I would load an address register with the address of the LEDs, then I would write the switch data from the data register to the address pointed at by the address register. Sounds like four instructions inside a do forever loop.
     
Loading...