[nhc-users] G-Code generated by nhc
Arun Kumar S Jadhav
arunk@it.iitb.ac.in
Fri, 1 Aug 2003 18:41:18 +0530
> Use the -gcode option enclosed with +CTS -CTS brackets. e.g.
>
> $ cat hello.hs
> main =3D putStrLn "hello world"
> $ nhc98 -c hello.hs +CTS -gcode -CTS
> =3D=3D=3D=3D=3D=3D=09G Code:
> STARTFUN 143(Main.main)
> NEEDSTACK 1
> HEAP_VAP 146 (LAMBDA146)
> PUSH_HEAP
> HEAP_VAP 26 (Prelude.putStrLn)
> HEAP_OFF -2
> RETURN_EVAL
>
> =3D=3D=3D=3D=3D=3D=09G Code:
> STARTFUN 146(LAMBDA146)
> NEEDSTACK 1
> PUSH_STRING "hello world"
> STRING
> RETURN_EVAL
>
> You can compare this with the final bytecode output produced in a
> .hc file by "nhc98 -C".
Thanks a ton !! Btw it would really be great if I can get hold of semanti=
cs
of "all" the g-instructions that are possibly produced by nhc.
Regards,
Arun