flat assembler
Message board for the users of flat assembler.
Index
> Main > I not found Call NZ and Call Z on x86. ZX-Spectrum have. |
Author |
|
Roman 29 Dec 2018, 15:47
I was surprised when I did not find on x86
Call NZ and Call Z Ret NZ and Ret Z Useful commands. On zx-spectrum was this commands. |
|||
29 Dec 2018, 15:47 |
|
Roman 29 Dec 2018, 15:50
emulation CAll nz
Code: cmp eax,10 push lab1 jnz ProcDoSomeCode lab1: Code:
ProcDoSomeCode:
some code
ret
|
|||
29 Dec 2018, 15:50 |
|
Furs 29 Dec 2018, 19:58
Roman wrote: emulation CAll nz Also it always pushes, I don't think that's intentional and probably a bug (I don't know about ZX Spectrum). Why not keep it simple like: Code: cmp eax, 10 jz @f call ProcDoSomeCode @@: |
|||
29 Dec 2018, 19:58 |
|
Roman 30 Dec 2018, 07:57
Furs
Yes good too Code: cmp eax, 10 jz @f call ProcDoSomeCode @@: ZX-Spectrum was in 1982 !!! I just show on example how useful Call Z or Call NZ. One Call Nz or write 3 line code. |
|||
30 Dec 2018, 07:57 |
|
revolution 30 Dec 2018, 08:54
ARM in 32-bit mode can also do conditional calls.
But in 64-bit code that was eliminated. C code compilers can't generated conditional call instructions, so the instructions are unused by most software. Therefore the CPU makers found no compelling reason to include it in the instruction set. And, as we all know, no one writes assembly code directly, by hand. OMG, that would be just too difficult for any human to do. |
|||
30 Dec 2018, 08:54 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.