assembly language

Thread Starter

chino22

Joined Oct 2, 2006
6
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
 

Papabravo

Joined Feb 24, 2006
21,094
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.
 
Top