Advertisement
Guest User

Untitled

a guest
Jul 25th, 2014
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. A more elegant approach than my prior attempt.
  2. Mostly stolen from elsewhere.
  3. Check out the logic of this though.
  4. Compiles to a 28 byte .COM file.
  5. Uses INT 29h "fast console output" to output.
  6.  
  7.  
  8. .486
  9. cseg segment dword public use16 'code'
  10. assume cs:cseg, ds:cseg, es:cseg, ss:cseg
  11.  
  12. org 100h
  13. start: mov ah,2
  14. int 1ah ; time in BCD , dl=0
  15. mov al,3 ;ensure, that we are on 80x25 text mode and clear the screen
  16. int 10h
  17.  
  18. push cx
  19. push dx
  20. pop eax
  21. m1: mov al,163
  22. sub dl,160 ; gives c,c,nc,c,c,nc,c,nc+z
  23. ja $+3 ; h h : m m : s s
  24. rol eax,4
  25. int 29h
  26. jne m1
  27. ret
  28. cseg ends
  29. end start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement