Re: Embedding machine code

new topic     » goto parent     » topic index » view thread      » older message » newer message

----- Original Message ----- 
From: "Juergen Luethje" <j.lue at gmx.de>
To: <EUforum at topica.com>
Subject: Re: Embedding machine code


> 
> 
> Derek wrote:
> 
> > I wanted to use Juergen's 'bit.e' library for doing 32-bit manipulations
> > because he uses machine code to achieve get over Euphoria's lack of
> > 32-bit integers.
> 
> Thanks. smile
> 
> > However, the code doesn't work because it has lines like this ...
> >
> >
> >   SHIFT_LEFT = define_c_func("", SHL_SPACE, {C_INT, C_INT}, C_INT)
> >
> > but that gives the error message ...
> >
> > c:\euphoria\include\dll.e:50 in function define_c_func()
> > type_check failure, lib is {}
> 
> As others already wrote, 'bit.e' only works with Eu 2.4 or later, sorry. sad

Oooops!  I've forgotten to change my 'EUDIR' environment symbol back to point to
the 2.4 version. Silly me!


I'm trying to implement the TEA (Tiny Encryption Algorithm -
http://www.ftp.cl.cam.ac.uk/ftp/papers/djw-rmn/djw-rmn-tea.html ) in Euphoria.
This is a very simple algo but it works on packets of 4-bytes using shifts, xors,
adds, and mults so I very quickly get bit overflows. I'm wanting to use machine
code to improve the speed as I'll be using it for real-time encoding/decoding of
traffic over a LAN.

-- 
Derek

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu