XXXXXXXXXXThis lab is do be done using Edit68k Programmer and and to be sent bac to me in the same way. all instruction are on the files with the supporting file also there too

1 answer below »

This lab is do be done using Edit68k Programmer and and to be sent bac to me in the same way. all instruction are on the files with the supporting file also there too
Answered Same DayFeb 27, 2021

Answer To: XXXXXXXXXXThis lab is do be done using Edit68k Programmer and and to be sent bac to me in the same...

Pulkit answered on Feb 28 2021
139 Votes
*
*
*-----------------------------------------------------------
* Program :
* Written by :
*
Date :
* Description: Demonstrate use of toggle switches for user input.
*
* Displays the current state of toggle switches 0 and 1.
*-----------------------------------------------------------
ORG $1000
START: ; first instruction of program
* Display hardware window
MOVE.B #32,D0
MOVE.B #00,D1
TRAP #15
* Use trap task to get address of toggle switches in D1.L
MOVE.B #32,D0 ; trap task 32 Hardware/Simulator
MOVE.B #3,D1 ; D1.B = 03, Return address of toggle swithces in D1.L
TRAP #15 ; perform task
MOVE.L D1,A0 ; A0 is pointer to toggle switches
* Read starting state of toggle switches into D2
MOVE.B (A0),D2     ;;;;; Store value in D2
BSR DISPLAY ; display switch states
WHILE DO.S ; ***** INFINITE LOOP *****
REPEAT
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here