My first beam assembler hack

Tony Rogvall tony@REDACTED
Mon Dec 5 12:37:08 CET 2005


On Dec 5, 2005, at 10:31 AM, Peter Lund wrote:

>
> Found this in the online docs about the compiler:file/2 options...
> ||
>
> ||
> |asm|
>    The input file is expected to be assembler code (default file  
> suffix
>    ".S"). Note that the format of assembler files is not documented,
>    and may change between releases - this option is primarily for
>    internal debugging use.
>
>
> I was not able to find the 'form_asm' option, but maybe I was  
> looking in the wrong place or something.
>
Should have been +from_asm.
Some kind of internal flag to the compiler I think (The code is there  
for every one to read :-)

/Tony

> /Peter
>
> Ulf Wiger (AL/EAB) wrote:
>
>> Interesting.
>>
>> Beam assembler certainly is the language of choice
>> for the discriminating hacker.  (:
>>
>> I guess this might be a nice alternative to my
>> plain_fsm hack (which relies on parse transforms).
>>
>> Now, how stable/documented is the .S format?
>>
>> /Uffe
>>
>>> -----Original Message-----
>>> From: Tony Rogvall [mailto:tony@REDACTED] Sent: den 4 december  
>>> 2005 23:55
>>> To: Ulf Wiger (AL/EAB)
>>> Cc: Erlang Users' List
>>> Subject: My first beam assembler hack
>>>
>>> Just want to share some beam assembler hack with you ;-)
>>>
>>> Attach a assembler module called message.S
>>>
>>> compile it with:
>>>
>>> 	erlc +form_asm message.S
>>>
>>> Then I wrote a module mbox.erl that can use some of the features  
>>> in message.S
>>>
>>> Have fun
>>>
>>> /Tony
>>>
>>>
>>
>>




More information about the erlang-questions mailing list