I'm trying to create a program in Easy68K that is able to test if two numbers entered by the user are equal. I know roughly how to get the input from the user, and load it into a data register, and I think I need to use a while loop that will test whether the two numbers are equal.
I'm not asking for people to write the program for me, I just really need some advice.
This is the code I have so far:
*-----------------------------------------------------------
* Title : Number Comparison
* Written by : Robert Dudley
* Date : 23/04/2017
* Description: Compares two numbers and determines if they are equal
*-----------------------------------------------------------
ORG $1000
START: ; first instruction of program
* Put program code here
LEA enterFirst,A1 ; load message into adreg A1
MOVE.B #14,D0
TRAP #15
MOVE.B #4,D0 ; read number from keyboard into D1.L
TRAP #15
LEA enterSecond,A1
MOVE.B #14,D0
TRAP #15
MOVE.B #4,D0
TRAP #15
SIMHALT ; halt simulator
* Put variables and constants here
enterFirst DC.B 'Enter first number: ',0
enterSecond DC.B 'Enter second number: ',0
END START ; last line of source
NOTE: Also, how do I move the input from D1.L
to another register?