blm.s 155 B

123456789101112131415
  1. .sect .text
  2. .define .blm
  3. ! cx: count in words
  4. .blm:
  5. mov bx,sp
  6. mov ax,si
  7. mov dx,di
  8. mov di,2(bx)
  9. mov si,4(bx)
  10. rep movs
  11. mov si,ax
  12. mov di,dx
  13. ret 4