Need Assembler help...

Discussion in 'Electronics Resources' started by justaslau, Dec 9, 2012.

  1. justaslau

    Thread Starter New Member

    Dec 9, 2012
    Hello guys, I need your help with assembler. I'll have test on tuesday and I will have to convert assembler code to hex code... Do you know program which can convert ir for me ? i have an example:

    stekas segment stack
    db 8 dup ('aabb')
    stekas ends
    ds1 segment
    d1 db 055h, 0ffh Answer: 0000 55 FF
    d3 db 0cch, 33h, 55h, 2, 80h, 80h Answer: 0002 CC 33 55 02 80 80
    d4 db 'abcde' Answer: 0008 61 62 63 64 65
    d11 dw 7777h, 0505h, 13h, 34h, 0ffffh
    ds1 ends
    prr segment
    assume ds:ds1, ss:stekas,cs:prr
    pradzia: mov ax,ds1
    mov ds,ax
    mov ax,d11+1
    and ax, 0ffffh
    xor al,d1
    mov cx,word ptr d4+1
    neg cx
    not ax
    mov bx, d11+2
    and d11+2,bx
    or bx,ax
    mov cl,d3+3
    rcl bx,cl
    rol ax,cl
    mov dx,d11+2
    test dx,d11+3
    shr dx,1
    mov dx,word ptr d3+4
    sal dx,1
    sar dx,1
    mov dh, 0cch
    sar dx,1
    shr dx,1
    rcl ax,1
    prr ends
    end pradzia
  2. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    Any compiler will convert from assembler to hex. That is what they do. This post probably belongs in the programming forum.
  3. milozoo

    New Member

    Dec 10, 2012
    i don't know
  4. Sparky49

    Well-Known Member

    Jul 16, 2011

    Introductory post of the century.:D
  5. atferrari

    AAC Fanatic!

    Jan 6, 2004
    He is trying to participate in a rather weird way ... :eek:

    But now we hold breath waiting for more... :D
  6. t06afre

    AAC Fanatic!

    May 11, 2009
    This look like Intel Ix86 mnemonics to me so you will need some basic Ix86 assembler. I am somewhat puzzled that you ask a question like this. Then you are preparing for an exam. Have you been sleeping in class up to now ;)
  7. SolderFlux

    New Member

    Dec 6, 2012
    definately Ix86 mnemonics. I am suprise any lecturer will test a student on memorising the mnemonics and translate that to hex. I speculate the lesson to be learnt here is to understand the operand and operator and how that translate into a intel hex file format.