flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
rugxulo 07 Oct 2007, 03:04
Nice job, thimis! I tweaked it for 8086 compatibility and added it to my FreeDOS disk #2.
![]() Code: ; BINCLOCK.ASM -- by thimis (tweaked a bit for 8086 by Rugxulo, 200 bytes) ; ; http://board.flatassembler.net/topic.php?t=7628 org 100h call cls mov ax,0b800h mov es,ax main: mov si,04dbh ;dark red color box mov di,1126 ;first led position call timee mov ah,1 int 16h jz main call cls ; clear screen at exit ret timee: mov ah,02h ;time in bcd int 1ah mov bl,ch ;hour call split mov bl,cl ;minutes call split mov bl,dh ;seconds call split ret split: push bx ;split bcd value push cx mov cl,4 shr bl,cl pop cx call status pop bx and bl,0fh call status ret status: push cx dx xor dx,dx mov al,bl mov cx,2 div cx cmp dx,1 ;case 1 jne @f mov si,0cdbh ;light red color box @@: call led ;show led cmp bl,2 ;case 2-3-6-7 jb @f cmp bl,4 je @f cmp bl,5 je @f cmp bl,7 ja @f mov si,0cdbh @@: call led cmp bl,7 ;case <=7 >=4 ja @f cmp bl,4 jb @f mov si,0cdbh @@: call led cmp bl,8 ;case >=8 jb @f mov si,0cdbh @@: call led add di,1286 ;next row pop dx cx ret led: cmp di,486 ;non visible leds je off cmp di,166 je off cmp di,178 je off cmp di,190 je off show: xchg ax,si stosw stosw sub di,324 ;next led pos mov si,04dbh ret off: xor si,si jmp show cls: mov ax,3 ;clear screen int 10h mov ax,0103h mov cx,2000h int 10h ret |
|||
![]() |
|
Picnic 08 Oct 2007, 19:11
hey that's very nice, thanks rugxulo!
![]() |
|||
![]() |
|
mikegonta 20 May 2008, 23:54
[ Post removed by author. ]
Last edited by mikegonta on 28 Jan 2009, 09:12; edited 2 times in total |
|||
![]() |
|
rCX 21 May 2008, 03:18
Cool! Have you guys considered submitting these to 256b?
|
|||
![]() |
|
edfed 21 May 2008, 18:28
ok, it's pretty good, then, i decided to make it in fool 16bits.
![]() and it works. ![]() it compiles in 345 bytes, waste ~ 200 bytes, but is very modular and evolutive. includes only the needed functions, and halts to save cpu time.
Last edited by edfed on 25 May 2008, 21:34; edited 1 time in total |
|||||||||||
![]() |
|
Picnic 25 May 2008, 21:11
Works nice edfed!
rCX wrote: Cool! Have you guys considered submitting these to 256b? hmm i guess not, it's a simple script and there are some really amazing demos inside there ![]() |
|||
![]() |
|
JN 30 Sep 2008, 13:45
nice code, thimis !! it looks cool
![]() |
|||
![]() |
|
Picnic 04 Oct 2008, 12:19
thanks JN
![]() |
|||
![]() |
|
Coddy41 22 Jan 2009, 11:54
Nice, their is some goodies in there
![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.