Use C++, a minimal operating system kernel that supports 32-bit.
your script head must is:
SECTION header vstart=0
program_length dd program_end
;用户程序入口点
code_entry dw start
dd section.code_1.start
realloc_tbl_len dw (header_end-code_1_segment)/4
code_1_segment dd section.code_1.start ;[0x0c]
code_2_segment dd section.code_2.start ;[0x10]
data_1_segment dd section.data_1.start ;[0x14]
data_2_segment dd section.data_2.start ;[0x18]
stack_segment dd section.stack.start ;[0x1c]
header_end:
; ---
; Your asm script
; ---
If you want to use system call,you must include "system/lib/stdc++.h". And you can you C++ Function. Just add:
#include <system/lib/stdc++.h>
#include <system/lib/std.h>
using namespace std;
int main(){
cout << "Hello World!" << endl;
return 0;
}