Absolute division using loop

;program to divide absolute value like 20/5 = 4 etc.
;or like 4/2 not 20.5/12 no decimal values will be divided
ORG 0H          ;
MOV A, #25      ;
MOV R0, #05     ;
MOV R1, #00H    ;
LOOP: SUBB A, R0;
      INC R1    ;
      JNZ LOOP  ;
END

2 thoughts on “Absolute division using loop

  1. Hey there! I’m at work surfing around your blog from my new apple iphone! Just wanted to say I love reading your blog and look forward to all your

    posts! Carry on the great work!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s