The NeKernel Assembler Syntax: A Tour

The NeKernel Assembler Syntax

A Tour of the syntax.

#bits 64
#org 1073741824

public_segment .code64 __NECTI_bar
mov rbx, 17800
ret
public_segment .code64 __NECTI_foo
jmp __NECTI_bar
mov  rax, rbx
ret
public_segment .code64 __NECTI___ImageStart
jmp 1073741826
ret
Generated C++ code from the dev branch of NeCTI.

The Rationale of the NeKernel Syntax.

NeKernel needed its own assembly syntax for its Portable Executable Format (PEF) And a way to extend segment types, and gracefully handle virtual memory. Thus the syntax was born and implemented in the NeCTI codebase.

What ISA does it support?

It supports x64 (16, 32, 64-bits), POWER, and its own ISA (64k) Of course the objective is to keep it portable still. Which is why I'd recommend using the cppdrv tool as well. Which supports C and C++ based macro directives.

Conclusion

The NeKernel syntax is designed with NeKernel's ABI in mind. Thus the choices that favors the Portable Executable Format.

Amlal.