asm -> hex

  • 18 years ago

    Hello


    don't think that i am trying to ask a assembly language question in the vb board.


    my question is i need to compile a *.asm file (i am actually using a string with the assembly code in it) into a *.hex file.
    I think it is an Intel Hexdecimal or something like that. I also think that .hex is a unsigned application, i don't know too much about assembly and hex file but i know a fair amount of assembly and i am trying to compile or convert it to the hex version


    Also when it is in the hex way can it be converted back easily? Would that be decompiling? Because i don't want ppl to get my assembly code


    Thanks for your time

  • 18 years ago

    You can probably assemble your code if you use Shell()
    to invoke MASM or whatever assembler you use (I hope you use MASM ).


    Assembly and hex are on a 1 to 1 ratio, if you have one you can ALWAYS get
    the other. (I shouldn't say always, but who would want to look at a large app
    written in all Win32 ASM? )

  • 18 years ago

    yeah, I was going to say the same thing...


    are you talking "hex" as if it is a different language?
    or do you mean the hexadecimal representation?


    if you are talking about "intel" assembly, the main difference,
    say, as opposed to motorola, is how it stores words, i.e.,
    instead of "msb|lsb", it is "lsb|msb"... other than that, it
    is pretty much the same (i.e., opcodes are represented by
    values, etc...)


    but yeah, I'm a bit confused by what you are asking?
    as soon as you make/compile an assembly program, it is
    in "hex" (rather, binary/whatever)...


    and if all you are talking about is the hexadecimal representation
    of the assembly, you can't really ask if it can be "decompiled" (the
    question doesn't make sense), because the hexadecimal is
    the (computer) representation of the assembly that is programmed.


    which would lead me to my next question... if you say you
    "know a fair amount of assembly", then why are you asking this
    question? because you should already know the answer... it's like
    saying you're a race car driver, but then asking what is a "standard"
    on a car... it sounds like you are trying to figure out how to take apart/rip someone else's stuff?


  • 18 years ago

    sorry it didn't make much sense
    let me get some things straight; coolio i am not trying to steal someones stuff
    i brought a TI Calculator and u can write apps for it but u have to write it in assembly language, i only know a fair amount of asm because i have read some tuts. What i am trying to achieve is that i want to make a program that you write in the BASIC language and then it interpretrates into assembly for you. The TI-83 Plus Flash Debugger requires a .hex file so it can sign it for use on the calc (a Z80 microprocesser).


    What i need to know is how to make the hex file from the asm file and any include files needed.


    If u don't understand any of that or any portion then please tell and and i will gladly reexplain.


    Thank you for your time

  • 18 years ago

    i have opened up one of the simple programs that i found in the tut that i made into a .hex file
    this is the contents

    Quote:
    :10400000800F000000008012010480210180310136
    :10401000804848656C6C6F2020208081018090036F
    :10402000260904046F1B80020D40A16B99F659BC50
    :1040300067F5859C096C0FB4039BC903322CE00320
    :1040400020E32CF42D73B427C4A07254B9EA7C3B4E
    :10405000AA16F677837AEE1AD4424C6B8B131FBBE9
    :10406000938BFC191C3CEC4DE575807F0000000033
    :104070000000000000000000000000000000000040
    :10408000EF4045AF324C843E03324B8421A34011B4
    :104090007884EFE344217884EF0A45EF7249CD50EC
    :0E40A00000274048656C6C6F204A6F6E6F0001
    :00000003FD
    :00000001FF


    that was made up from:
    hello.asm (2.39kb)
    ti83plus.inc (244kb)


    I don't know how it compresses it so much but thanks for having a look for me

  • 18 years ago

    ok... I'm a bit confused then what exactly it is you
    are asking, but I may be assuming that you know how
    to do stuff that you don't...


    Is the "hello.asm" something you wrote, or just a demo
    file?


    What you need to do is this:
    1) Write whatever .asm file you want.
    2) I'm assuming the ".inc" is a header file to be compiled together
    with any .asm file you make.
    3) You will need to get a "compiler" (from the sounds of it, since
    you are writing this for a 'TI83' calculator) -- probably they have
    a compiler available that you can either order/purchase/get for free.
    So you have to contact them.
    4) Then, you "compile" your .asm file, and it will most likely put
    it in the format you need in order to upload/stick on your calculator.

  • 18 years ago

    Hello


    hello.asm is the file from a tuturial but u end up having any file you want as the main app.


    1. got hello.asm
    2. yes the .inc file in a header file to be compiled together with the asm file
    3. I have a compiler it is called Zilog Developer Studio. When u start you chose the Z80 microprocessor, that i what i want to be able to compile to in my program, the Z80 processor edition of the assembly language.
    4. Yes TI provide a program to digitally sign the .hex file and that creates the .8xk (TI-8x Application)


    I need a way to compile from the source code files (?.asm and ti83plus.inc) to the .hex file so that it will work on the Z80 processor family.


    Thanks for all your time

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.”