How can I make my all operating system in one .ASM file? I examined MikeOS and it works with multiply files (like string.asm, screen.asm etc.). How can I work and write codes after boot signature? In MikeOS, I understood that it loads kernel.asm file into memory. Why it loads into memory? Why does not it work in one file?
Example code:
bits 16
org 7c00h
mov si, bootmsg
call ps
call hidecursor
jmp $
bs:
    pusha
    mov al, 8 ;BACKSPACE
    mov ah, 0eh
    int 10h
    mov al, 32 ;SPACE
    mov ah, 0eh
    int 10h
    mov al, 8 ;BACKSPACE
    mov ah, 0eh
    int 10h
    popa
    ret
nl:
    pusha
    mov al, 13
    mov ah, 0eh
    int 10h
    mov al, 10
    mov ah, 0eh
    int 10h
    popa
    ret
ps:
    pusha
    .test:
    lodsb
    cmp al, 0h
    je .eof
    mov ah, 0eh
    int 10h
    jmp .test
    .eof:
    popa
    ret
hidecursor:
    pusha
    mov ah, 1
    mov cx, 2607h
    int 10h
    popa
    ret
showcursor:
    pusha
    mov ah, 1
    mov cx, 0607h
    int 10h
    popa
    ret
bootmsg db 'Hi', 0
times 510 - ($ - $$) db 0
dw 0xaa55
