tags:

views:

34

answers:

1

i am writing a subroutine which that could be called to meet the following specifications;

A company has a number of employees and a boss. They have a party with Pizza and pop if the number of employees is larger than 15, then the boss will pay $50 and each employee will equally share the remaining amount, else, the boss will pay half of the overall amount and each employee will equally share the remaining amount. In the subroutine, use appropriate data and address registers for all inputs and outputs.

this how i started but i am stock on this one...

CLR.W D5

ClR.W D6

CMPI #15, D2

BLE LOOp

MOVE.W D4,D5

SUBQ.W #50, D5

DONE

Loop MOVE.W D4, D6

   DIVU    #2, D4

    SUB.W   D4, D6

  DiVU   D2, D6

Done MOVE.L (SP)+, D4, D6

 RTS

 END
+1  A: 

I think I speak for a few people here when I say you are posting too many of your homework questions here. It seems like you are trying to use SO as a free resource to get past some kind of assembly language course without having put in sufficient effort yourself. Please give it a rest and do some research on your own for a bit.

1800 INFORMATION