Pregunta

Me escribió un corto programa que analiza un "programa" por medio de pitón y la convierte en ensamblador, lo que me permite compilar mi pequeña lengua proramming a un ejecutable.

Puedes leer mi blog para más información aquí http: //spiceycurry.blogspot.com/2010/05/simple-compilable-programming-language.html

mi pregunta es ... ¿Dónde puedo encontrar más comandos del kernel para que pueda ampliar aún más en mi guión en el blog anterior?

¿Fue útil?

Solución

I'd rather recomment using LLVM:

  • It allows you not to bother with low-level details like register allocations (you provide only SSA form)
  • It does optimizations for you. It can be faster then the hand-written and well-optimized compiler as the LLVM pipeline in GHC is showing (at the beginning - before much optimalization it had equal or better performance than mature native code generator).
  • It is cross-platform - you don't tight yourself to for example x86

I'n not quite sure what you mean by 'kernel' commands. If you mean opcodes:

  • There are Intel manuals
  • There is Wikipedia page containing all of the documented memnonics (however not the opcodes and not always description)
  • There is NASM manual

However the ARM or PowerPC have totally different opcodes.

If you mean the operating systen syscalls (system calls) then:

  • You can just use C library. It is in every operating system and is cross platform.
  • You can use directly syscalls. However they are harder to use, may be slower (libc may use additional buffering) and are not cross platform (Linux syscalls on x86 - may be not up-to-date).
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top