D Bare Bones II: Difference between revisions

Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content deleted Content added
No edit summary
Fix D Bare bones: you can't pass non-standard arguments to void main()
Line 16: Line 16:


global start
global start
extern main ; Allow main() to be called from the assembly code
extern kmain ; Allow kmain() to be called from the assembly code
extern start_ctors, end_ctors, start_dtors, end_dtors
extern start_ctors, end_ctors, start_dtors, end_dtors


Line 130: Line 130:
}
}
void main(uint magic, uint addr) {
void kmain(uint magic, uint addr) {
puts("Hello, world".ptr); // Output "Hello, world!" to the console
puts("Hello, world".ptr); // Output "Hello, world!" to the console