Advertisement
Guest User

Untitled

a guest
May 21st, 2018
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. ; r3 high, a low, r1 denominator
  3. ; result r2 low, r4 high
  4. mov r3, #07h
  5. mov a, #0d1h
  6. mov r1, #03h
  7.  
  8. mov r2, #0h
  9. mov r4, #0h
  10. nhi:
  11.     clr c
  12. ncarry:
  13.     subb a, r1
  14.     mov 22h, c
  15.     cjne r2 , #0FFh , notovf
  16.  
  17.     ;mov r2, #00h
  18.     inc r4
  19. notovf:
  20.     inc r2
  21.     mov c, 22h
  22.  
  23.     jnc ncarry
  24.     dec r3
  25.     cjne r3, #0FFH,nhi
  26.  
  27. dec r2
  28. nnop :ljmp nnop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement