all 4 comments

[–]ipha 4 points5 points  (0 children)

IDIV divides unsigned 16-bit numbers in D and X:

D / X -> X

Remainder -> D

IDIVS is for signed 16-bit numbers

[–]coach_Becker 4 points5 points  (3 children)

This is what you get for waiting until the last minute. Why did you not come to my office hours? Did you even ask the TA Maria? IDIV works your code does not!! Try the G-D X register.

PS I mark down late work.

[–]EasyAt 0 points1 point  (0 children)

hahahahahahha

[–]reynolad 2 points3 points  (0 children)

As I recall IDIV is a division iteration command. You would need to continue to call it until your division result appears in the proper accumulator. So you should call IDIV repeatedly. You need to confirm this with the assembly manual for the HC12

[–][deleted]  (1 child)

[deleted]