flat assembler
Message board for the users of flat assembler.
![]() Goto page 1, 2 Next |
Author |
|
Ciper
Code: org 100h mov bh,123 ; Byte to convert mov ah,2 mov cx,8 bits: shl bx,1 jc carry mov dl,'0' jmp print carry: mov dl,'1' print: int 21h loop bits int 20h |
|||
![]() |
|
Ciper
Great.
Thanks! |
|||
![]() |
|
edfed
Code: org 100h mov bh,123 ; Byte to convert mov ah,2 mov cx,8 mov dh,'0' bits: shl bx,1 mov dl,dh adc dl, 0 ; If CF is set then '1' will be printed, otherwise '0' is printed. int 21h loop bits int 20h ? faster ? |
|||
![]() |
|
AsmGuru62
@edfed: JMPs are minimized, so most likely it is faster.
And the code is more elegant. |
|||
![]() |
|
edfed
mov dl,dh faster than mov dl,'0'?
![]() |
|||
![]() |
|
HaHaAnonymous
[ Post removed by author. ]
Last edited by HaHaAnonymous on 28 Feb 2015, 22:06; edited 1 time in total |
|||
![]() |
|
edfed
jmp there = mov eip,there
i dislike the mov, it is a very bastard instruction. |
|||
![]() |
|
Ciper
Hi guys (all):
I sincerely admire your assembly-optimizing wisdom. Why don't you share it via a series of "Best Practices:" posts (just a suggestion) so that a volunteer can accumulate them and perhaps write a booklet about FASM & DOS? Cheers & Regards, Ciper |
|||
![]() |
|
HaHaAnonymous
[ Post removed by author. ]
Last edited by HaHaAnonymous on 28 Feb 2015, 22:06; edited 12 times in total |
|||
![]() |
|
Ciper
Let's stop this nonsense.
MOV is the single most important instruction in the x86 instruction set... ...maybe after NOP ![]() ps: Even a jmp is a mov, after all. |
|||
![]() |
|
HaHaAnonymous
[ Post removed by author. ]
Last edited by HaHaAnonymous on 28 Feb 2015, 22:06; edited 2 times in total |
|||
![]() |
|
Ciper
Why?
What is the benefit? More importantly: What is the idea? How do you MOVe a value into a register? Just trying to understand... Last edited by Ciper on 03 Jan 2013, 23:30; edited 1 time in total |
|||
![]() |
|
HaHaAnonymous
[ Post removed by author. ]
Last edited by HaHaAnonymous on 28 Feb 2015, 22:06; edited 3 times in total |
|||
![]() |
|
Ciper
This was a soi-disant tutorial for God's sake!
Are we supposed to obfuscate tutorials? |
|||
![]() |
|
Ciper
@HaHaAnonymous: Our goal in practicing assembly is not to hack but to learn. We want to practice x86 & DOS because it is much easier than x64.
Please do not make assembly unapproachable to newcomers; FASM has the unique goal of making the x86 assembler easy (first for its author then for everybody else). If your goal is hacking, I am sure there are other venues. |
|||
![]() |
|
HaHaAnonymous
[ Post removed by author. ]
Last edited by HaHaAnonymous on 28 Feb 2015, 22:06; edited 1 time in total |
|||
![]() |
|
Ciper
We are all people who dislike Intel CPUs; but we try to cope with them
![]() |
|||
![]() |
|
ACP
Ciper wrote: Hi guys (all): While personally I think that every book idea is a good idea the problem with this particular one is that you already have it all in few great books from DOS and 16bit Windows era. The only difference is that they target MASM, TASM or A86 and not FASM but since FASM roots are in TASM Ideal mode (which actually always made me sad that even in TASM 5 Users Guide you had sample programs written only in MASM mode) if you find a good book about TASM & DOS you are setup for FASM too in most cases. |
|||
![]() |
|
HaHaAnonymous
[ Post removed by author. ]
Last edited by HaHaAnonymous on 28 Feb 2015, 22:05; edited 1 time in total |
|||
![]() |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.