i can't understand this code (assembly) -


what code do? don't understand does.

mov ah,00h mov al,bl mov lp,cl mov cl,10 div cl mov cl,lp 

  1. store value 0 in register ah.
  2. store value in register bl in register al.
  3. store contents of register cl in register lp
  4. store value 10 in register cl
  5. divide contents of cl contents of ax
  6. store value lp in cl.

in summary, code divides number "10" whatever stored in register bl. answer located in register al. remainder located in ah.

line 2 backs cl register (since gets overwritten). line 5 restores it.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -