Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- A more elegant approach than my prior attempt.
- Mostly stolen from elsewhere.
- Check out the logic of this though.
- Compiles to a 28 byte .COM file.
- Uses INT 29h "fast console output" to output.
- .486
- cseg segment dword public use16 'code'
- assume cs:cseg, ds:cseg, es:cseg, ss:cseg
- org 100h
- start: mov ah,2
- int 1ah ; time in BCD , dl=0
- mov al,3 ;ensure, that we are on 80x25 text mode and clear the screen
- int 10h
- push cx
- push dx
- pop eax
- m1: mov al,163
- sub dl,160 ; gives c,c,nc,c,c,nc,c,nc+z
- ja $+3 ; h h : m m : s s
- rol eax,4
- int 29h
- jne m1
- ret
- cseg ends
- end start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement