com.s 172 B

123456789101112131415
  1. .sect .text; .sect .rom; .sect .data; .sect .bss
  2. .define .com
  3. ! #bytes in cx
  4. .sect .text
  5. .com:
  6. mov bx,sp
  7. add bx,2
  8. sar cx,1
  9. 1:
  10. not (bx)
  11. inc bx
  12. inc bx
  13. loop 1b
  14. ret