# hello-world.S - ClaudeOS user-mode hello world application # Assembled as flat binary, loaded at USER_CODE_START (0x08048000) # # Uses INT 0x80 system calls: # SYS_WRITE(1): EAX=1, EBX=fd, ECX=buf, EDX=len # SYS_EXIT(0): EAX=0, EBX=code .code32 .section .text .globl _start _start: /* SYS_WRITE(stdout, "Hello, World\n", 13) */ movl $1, %eax /* SYS_WRITE */ movl $1, %ebx /* fd = stdout */ movl $msg, %ecx /* buf = absolute address of message */ movl $13, %edx /* len = 13 */ int $0x80 /* SYS_EXIT(0) */ movl $0, %eax /* SYS_EXIT */ movl $0, %ebx /* exit code = 0 */ int $0x80 /* Safety: infinite loop (should never reach here) */ jmp . msg: .ascii "Hello, World\n"