1. ASM Tutorial
- Posted by Andy <videogamefreak101 at hotmail.com> Nov 11, 2006
- 542 views
I am looking for some ASM or machine level tutorials for Euphoria or some open source programs that use machine level code in Euphoria, I am lookin for some that are easy to learn from prefably
2. Re: ASM Tutorial
- Posted by Bernie Ryan <xotron at bluefrog.com> Nov 11, 2006
- 518 views
Andy: There are no tutorials for using Euphoria for ASM programming. The first thing you will need to do is learn to program in assembler using 32-bit instuctions. There many assembler tutorials out on the web. Once you understand assembler you should be able to look at examples of using assembler with Euphoria in the archive. In other words there is no short-cut or easy way to learn how to use assembler with Euphoria Bernie My files in archive: WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API Can be downloaded here: http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan
3. Re: ASM Tutorial
- Posted by Andy <videogamefreak101 at hotmail.com> Nov 11, 2006
- 516 views
- Last edited Nov 12, 2006
I know some ASM, but is it the same as in Euphoria
4. Re: ASM Tutorial
- Posted by Bernie Ryan <xotron at bluefrog.com> Nov 11, 2006
- 524 views
- Last edited Nov 12, 2006
Andy wrote: > > I know some ASM, but is it the same as in Euphoria Andy: Yes it is the same as any INTEL Assembler. Take a look at mic's latest updated version of ASM.E which in the archive; it has a number of example programs in it. Euphoria can not use ASM directly. What you have e do is allocate memory and poke bytes into memory and then execute it from Euphoria. What ASM.E does is allows you to translate ASM nemonics like in text form. "mov eax, 123" into the machine code bytes that required to perform that operation. The ASM.E will output a file that will be Euphoria code that will run your assembler code. Download ASM.E and look at the examples. Bernie My files in archive: WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API Can be downloaded here: http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan
5. Re: ASM Tutorial
- Posted by Bernie Ryan <xotron at bluefrog.com> Nov 11, 2006
- 532 views
- Last edited Nov 12, 2006
I think see why you are haveing difficulty see how to use ASM.EX This is a really short tutorial. First Download: http://www.rapideuphoria.com/asm2.zip 1: Look at fpixel.asm this is a text file of assembler neumonics. 2: Run asm.ex like this: --------------------------------- ASM to Euphoria compiler (32-bit) by Pete Eberlein Nov 05, 2006 --------------------------------- Enter the name of the asm file to compile: fpixel.asm 1: commented source with line numbers (default), 2: commented source, 3: no source Select source option: 2 fpixel.inc compiled with great success. Warning: local constant SSE_MODRM_REG64 in asm.e is not used 3: Now you will have a file containing the machine code called fpixel.inc. This is not a complete program so you have to write some additional interface code to run it with Euphoria. 4: Compare this code in (fpixel.inc) with fpixel.ex and you will see that some extra code was needed to make a complete Euphoria. There are some locations that contain #00,#00,#00,#00, where there should be parameters loading into registers. For example the x value, the y value, and the color value. We have to poke these 4-bytes (dword) values into memory at correct offsets. Look at the comment in -- 1: mov ebx, dword x (2) in the fpixel.inc file; the dword x is at offset 2 that is what (2) in the comment means. Once all the parameters are setup (poked-in) then to execute the code you use call(fpixel) fpixel being the constant pointer that contains the allocated memory. The other code in the file is just ordinary Euphoria program code. 5: Now run the fpixel.ex file and see what happens. Bernie My files in archive: WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API Can be downloaded here: http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan
6. Re: ASM Tutorial
- Posted by Andy <videogamefreak101 at hotmail.com> Nov 11, 2006
- 521 views
- Last edited Nov 12, 2006
Thanks, now I kinda get it a little better, I'll keep working at it
7. Re: ASM Tutorial
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> Nov 12, 2006
- 559 views
On Sat, 11 Nov 2006 06:02:36 -0800, Andy <guest at RapidEuphoria.com> wrote: > > >posted by: Andy <videogamefreak101 at hotmail.com> > >I am looking for some ASM or machine level tutorials for Euphoria or some >open source programs that use machine level code in Euphoria, I am lookin for >some that are easy to learn from prefably What exactly would you be trying to do? Are you talking about using asm.e? What existing asm experience do you have? Regards, Pete
8. Re: ASM Tutorial
- Posted by "mic _" <stabmaster_ at hotmail.com> Nov 12, 2006
- 533 views
- Last edited Nov 13, 2006
One way to learn x86 assembly would be to download masm32 (it's free) and use iczelion's win32 asm tutorials (http://win32assembly.online.fr/tutorials.html). All the win32api-stuff may not be of much use when you write assembly code for euphoria programs, but it could help you learn the syntax, and what various instructions do. Downloading and reading these documents is also a good idea: http://www.intel.com/design/pentium4/manuals/index_new.htm (especially volumes 2A and 2B). After you've figured out the instruction set reasonably, just look at the examples that come with the "mini assembler" (asm2.zip) in the archives to see how to add assembly code to your euphoria programs.
9. Re: ASM Tutorial
- Posted by "mic _" <stabmaster_ at hotmail.com> Nov 14, 2006
- 512 views
"_as_ in Euphoria"? You mean " is it the same in Euphoria" ? It's basically the same syntax as for masm/tasm, except you don't use directives like .DATA, .CODE etc. The mini assembler for euphoria comes with plenty of examples, as well as documentation. >From: Andy <guest at RapidEuphoria.com> >Reply-To: EUforum at topica.com >To: EUforum at topica.com >Subject: Re: ASM Tutorial >Date: Mon, 13 Nov 2006 03:53:19 -0800 > > >posted by: Andy <videogamefreak101 at hotmail.com> > >I know some ASM, but is it the same as in Euphoria > > > >