Re: from elsewhere, an assembler




Wannabee wrote:

cmp al 0a |db 72 02 |add al 7 |add al 30
woldn't work then and will need a rewrite of many source code.

Ok.

cmp al b$Label is six bytes. al cmp al b$reg is 2 bytes
and the instructions are seperated by | in this case as well.
So in this case it could work?

cmp al D$Label
72 02
04 07
add al 30

at this level you hex coders seem to have more fun.

Yes, but I'd like to have it as a function grouped line:

L0: 3c 0a 72 02 04 07 04 30 ;bin_low_nib_to_ascii_in_AL

But RosAsm don't need this form as I can do it with my HEXEDIT anyway.

translation (not fastest but short):
cmp al,10
jc +2
add al,7
add al,48

__
wolfgang



.



Relevant Pages

  • Re: Lock-free datastructures...
    ... Here is all the source code and some questions will follow. ... int tmp, cmp = shared; ... int64 xchg, cmp = shared; ...
    (comp.programming.threads)
  • Re: Efficiency
    ... cmp al,'a' ... alignment and also it seems that modern Pentiums and above really like ... This old short-cut instructions may work fine within large REP loops, ...
    (alt.lang.asm)
  • Re: announce: my very first disassembler now available (GPL)
    ... adc dh,0x99 ... 0000000b cmp dh,0x33 ... I noticed from disassembling a larger file (all the instructions in NASM's ... or exotic undocumented opcodes that are no longer valid on the latest ...
    (alt.lang.asm)
  • Re: Code transformation
    ... There are no equivalent 16bit instructions for all 32bit ... jge d2, d1, target ... and finally the jump is taken to "target" if ... Doesn't the processor have any CMP instruction. ...
    (comp.programming)
  • Re: Efficient way to use saturation
    ... Just compare to your routine ... The most general version takes 4 instructions: ... CMP x, #MIN ... I compared your instructions with the original C routine that I had ...
    (comp.sys.arm)