OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 2:41 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: [SOLVED] int 10h bad working
PostPosted: Fri Jul 19, 2019 1:11 pm 
Offline

Joined: Fri Jul 19, 2019 1:03 pm
Posts: 7
I have this code:
Code:
BITS 16

start:
   mov ax, 07C0h   
   add ax, 288      
   mov ss, ax
   mov sp, 4096

   mov ax, 07C0h   
   mov ds, ax


   mov si, text_string
   call print_string   

   jmp $   


   text_string db 'This is my cool new OS!', 0


print_string:   
   mov ah, 0Eh

.repeat:
   lodsb   
   cmp al, 0
   je .done   
   int 10h
   jmp .repeat

.done:
   ret


   times 510-($-$$) db 0
   dw 0xAA55


I build it with NASM.
It works on qemu, but not on my machine. Only 'This' is displayed.
I add that 0xB8000 also displays a bit of message.


Last edited by md37 on Sat Nov 28, 2020 3:53 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: int 10h bad working
PostPosted: Fri Jul 19, 2019 1:58 pm 
Offline
Member
Member

Joined: Fri Aug 26, 2016 1:41 pm
Posts: 671
If you are booting using USB on real hardware you may be seeing this if your BIOS is booting using floppy disk emulation (FDD) and because you don't have a BIOS Parameter Block (BPB) in your bootloader. Likely your BIOS has blindly overwritten some of your bootloader with drive geometry info which has altered it so it doesn't work correctly. If this is a USB booting issue you may wish to read my Stackoverflow answer on the subject: https://stackoverflow.com/a/47320115/3857942


Top
 Profile  
 
 Post subject: Re: int 10h bad working
PostPosted: Fri Jul 19, 2019 2:44 pm 
Offline

Joined: Fri Jul 19, 2019 1:03 pm
Posts: 7
Problem solved, thank you! It is worth to write about it on Wiki.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: 8infy, DotBot [Bot] and 61 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group