Yeah I realized that the jmp was branching me somewhere it wasn't supposed to, but removing that instruction as in the reply before yours, and messing with those registers as niteice suggested didn't work either. For some reason the code produces the correct output on one emulator. However, when I try to put it in the bootsector of a floppy image and boot it in Bochs no output is produced. With a modification of other code It does work and I honestly can't tell why. This is the modified code from the bootstrapper of MenuetOS and I just stripped it down so that it would only display MenuetOS on the screen.
boot_program equ 07c00h ;position for boot code
jmp start_program
nop
start_program:
xor ax,ax
mov ss,ax
mov sp,boot_program
push ss
pop ds
mov si,loading+boot_program
loop_loading:
lodsb
or al,al
jz procura_arquivo_novamente
mov ah,0eh
mov bx,07h
int 010h
jmp loop_loading
procura_arquivo_novamente:
push ss
pop es
mov bp,16
newtry:
dec bp
loop_envio_mensagem:
lodsb
or al,al
jz espera_digitar_tecla
mov ah,0eh
mov bx,07h
int 010h
jmp loop_envio_mensagem
espera_digitar_tecla:
jmp $
loading db 13,10,'Starting MenuetOS ',00h
times 0x1fe-$ db 00h
db 55h,0aah ;boot signature I fail to understand why this works and my simpler code doesn't.