NightDOS congrats and a suggestion

123 views
Skip to first unread message

Maarten

unread,
Sep 17, 2016, 5:59:48 AM9/17/16
to night-do...@googlegroups.com
Hi all,

Below you can find an email we received. It contains a suggestion about the VESA graphics mode code.


I see that you actually have something to boot.
Congratulations.

now you only need floppy/disk I/O and you can start to execute
programs....

as a suggestion:

replace the 'draw 8 pixels' portion of VESAPrint32

8 times

 ; plot accordingly
 and dl, 10000000b
 cmp dl, 0
 jz .PointSkipA
 .PointPlotA:
 mov [edi], ecx
 jmp .PointDoneA
 .PointSkipA:
 mov [edi], ebp
 .PointDoneA:
 add edi, 4
 mov byte dl, dh


with



 push eax


 test dl, 10000000b
 cmovnz eax, ecx
 cmovz  eax, ebp
 mov [edi], eax

 test dl, 1000000b
 cmovnz eax, ecx
 cmovz  eax, ebp
 mov [edi+4], eax

 test dl, 100000b
 cmovnz eax, ecx
 cmovz  eax, ebp
 mov [edi+8], eax

 test dl, 10000b
 cmovnz eax, ecx
 cmovz  eax, ebp
 mov [edi+12], eax

 test dl, 1000b
 cmovnz eax, ecx
 cmovz  eax, ebp
 mov [edi+16], eax

 test dl, 100b
 cmovnz eax, ecx
 cmovz  eax, ebp
 mov [edi+20], eax

 test dl, 10b
 cmovnz eax, ecx
 cmovz  eax, ebp
 mov [edi+24], eax

 test dl, 1b
 cmovnz eax, ecx
 cmovz  eax, ebp
 mov [edi+28], eax

 add edi,32



which should execute significant faster (although still SLOW as it's a
graphics mode)
Tom



Regards,
Maarten

Maarten

unread,
Sep 24, 2016, 11:00:38 AM9/24/16
to Night DOS Kernel
Update:

I heard we started working on this.

Mercury Thirteen

unread,
Sep 24, 2016, 11:42:32 AM9/24/16
to Night DOS Kernel
Well, Tom, if you're reading this... thanks for the suggestion! I'm hoping to implement it this coming week.

Mercury Thirteen

unread,
Nov 6, 2016, 2:06:13 PM11/6/16
to Night DOS Kernel
Okay, so it wasn't as soon as I'd like... but I added Tom's suggestion in and observed an approximate 30% speedup in text printing. Thanks Tom!

Mercury Thirteen

unread,
Nov 6, 2016, 2:10:57 PM11/6/16
to Night DOS Kernel
Details on my test:
I had a specific string printed 10 million times, which initially took about 46 seconds with predictable repeatability.
After changing the code, this was shortened to 32 seconds for the same workload.

I'll port this change over to the 24 bit text printing routine later on.

Maarten

unread,
Nov 13, 2016, 8:30:10 AM11/13/16
to Night DOS Kernel
Sounds good!
Reply all
Reply to author
Forward
0 new messages