flat assembler
Message board for the users of flat assembler.
Index
> Main > PrintHex16 size optimizations? |
Author |
|
revolution 20 Mar 2010, 13:05
19 bytes:
Code: PrintHex16: mov cx,4 .cycle: rol dx,4 mov al,dl and al,0Fh cmp al,10 sbb al,069h das stosw loop .cycle ret |
|||
20 Mar 2010, 13:05 |
|
Tomasz Grysztar 20 Mar 2010, 13:07
The SBB+DAS trick is already widely known on this forum, you can strip a few bytes with it.
EDIT: Oh, revolution was first with it. |
|||
20 Mar 2010, 13:07 |
|
bitshifter 20 Mar 2010, 13:24
Cool, i was unaware of this method (i searched 4 a while)
I have been searching/pondering this for about 2 hours. I had SBB in my back pocket but wasnt enough by itself. I figured i could spend the rest of my life theorizing it or i could just ask someone with more brains than me. Hey, at least im only a few bytes behind the times, right? Now i go read about this DAS instruction. Thanks for help |
|||
20 Mar 2010, 13:24 |
|
revolution 20 Mar 2010, 13:34
I pwned Tomasz.
|
|||
20 Mar 2010, 13:34 |
|
DOS386 20 Mar 2010, 13:55
revolution wrote: 19 bytes: NOT 8086-compatible, better code: http://board.flatassembler.net/topic.php?t=9738 http://www.bttr-software.de/forum/forum_entry.php?id=6631 Quote: I pwned Tomasz. I pwned revolution. |
|||
20 Mar 2010, 13:55 |
|
Fanael 21 Mar 2010, 08:35
DOS386 wrote: NOT 8086-compatible |
|||
21 Mar 2010, 08:35 |
|
rugxulo 23 Mar 2010, 15:40
Fanael wrote:
|
|||
23 Mar 2010, 15:40 |
|
DOS386 10 May 2010, 09:50
WARNING: old thread
rugxulo wrote: Wolfenstein 3D for 8086 url=http://www.lootube.com/watch?v=5f7gW5X24ao All what we need is a thing allowing to watch LooTubeFlashCrap on 8086 |
|||
10 May 2010, 09:50 |
|
edemko 29 Jul 2010, 17:11
Code: ;;dedicated to DOS386 a funny man and al,$0f ;prepare for DAA add al,'0' ;$00..$0f->'0'..'?' -> (AL<$100)&(CF=0) -> DAA.2nd_if with +$60 skept daa ;if (AL and $0f > 9)|(AF=1(never TRUE)){ADD AL,$06} cmp al,'A'-1 ;if $06 was not added sbb al,-1 ;do nothing ;; ;hope more polite then DAS |
|||
29 Jul 2010, 17:11 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.