Message board for the users of flat assembler.
> DOS > I have seen 1 problem with my previous programs.
I called the DOS interrupt so many times that it was slowing it down.
I wrote a new binary counting program that is far faster than anything else I've made.
It does call 9 int $21 only once in the program.
Everything else automatically loads bytes into memory
so it prints them all at once!
This has a good and bad side.
The good news is,it's faster than my other programs at printing this.
The bad news is that it consumes a lot more memory.
Because of the 64KB limit,I wouldn't be able to do this very far.
My other program that writes to a file is probably better since
it can actually write to files and is only limited by hard disk space.
However,this is purely meant for speed!
org $100 mov bx,b xor al,al p1: xor cl,cl p0: rol al,1 mov byte[bx],al and byte[bx],1 or byte[bx],$30 inc bx inc cl cmp cl,8 jne p0 mov byte[bx],$D inc bx mov byte[bx],$A inc bx inc al cmp al,0 jne p1 mov byte[bx],$24 mov ah,9 mov dx,b int $21 ret b rb $A01
There are 10 kinds of people in the world.
Those who know binary and those who haven't met me.
|28 Dec 2006, 20:51||
< Last Thread | Next Thread >
Copyright © 1999-2020, Tomasz Grysztar.
Powered by rwasa.