Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Assembly language

by shmem (Chancellor)
on Dec 22, 2019 at 00:53 UTC ( [id://11110497]=note: print w/replies, xml ) Need Help??


in reply to Assembly language

There is an interesting connection between perl and assembly as jcb already noted. Yes, perl is implemented in C, but its runtime makes a syntax tree or execution stack out of the program it runs, which looks like a baroque FORTH engine. This old language also has an interpreter and compiler built in, and is a macro language for assembly (which in turn is a macro language for machine code).

One could say that "perl is to C what FORTH is to assembly". The major difference is that FORTH passes its parameters on the stack, while C makes heavy use of registers - which could also be done by FORTH at compilation of new FORTH words, given its capabilities of introspection.

When I retire, I might (if I have still interest in that sort of stuff, that is) tackle an implementation of perl in FORTH, create a perl CPU and die rich. Hah!

perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11110497]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (8)
As of 2024-04-23 09:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found