I have to do a homework assignment in which the program will receive 2 numbers from the keyboard and add and multiply them, but I don’t know how. So far, I've done this:
ORG $1000
START:
LEA INPUT, A1
MOVE.B #14, D0
TRAP #15
MOVE.B #4, D0
TRAP #15
JSR SHOWNEWLINE
LEA INPUT, A1
MOVE.B #14, D0
TRAP #15
MOVE.B #4, D0
TRAP #15
JSR SHOWNEWLINE
ADDX D0, D0
MOVE.B #14, D5
TRAP #15
SIMHALT
SHOWNEWLINE:
LEA NEWLINE, A3
MOVE.B #0, D1
MOVE.B #0, D0
TRAP #15
RTS
INPUT DC.B 'Enter numbers', 0
NEWLINE DC.B ''
END START
It should be done in the EASy68K simulator.
Thank you!
My deadline was until midnight so I had to find a solution. Since it was not explained to us in the lecture how to use EASy86k, I tried to find help here. I hope this can help beginners.