I know that my asm print function works in .bin format (have tried it in bochs), but as soon as I compile it to aout format (so that ld can handle it) it gets weird.
Here is the print function (only used in 80x25 mode that's why it's so simple).
Code: Select all
print_string_real:
;ds:esi - String addr
;es:edi - Screen offset
;ecx - String Length
;ah - Color attribute
load_save_loop:
lodsb
stosw
loop load_save_loop
ret
Code: Select all
cpuid_works db '386+ CPU detected' ;Len: 17
Code: Select all
mov ax,0000h
mov ds,ax
mov esi,cpuid_works
mov ax,(SCREEN_ADDR/16)
mov es,ax
mov edi,0000h+0*160
mov ecx,17
mov ah,STANDARD_COLOR
call near print_string_real
Let me know if you need more info