flat assembler
Message board for the users of flat assembler.
  
|  Index
      > OS Construction > beginner boot program issues | 
| Author | 
 | 
| revolution 18 Dec 2020, 11:35 Your segment register DS hasn't been initialised.     Code: mov al,[cs: edx] | |||
|  18 Dec 2020, 11:35 | 
 | 
| VexisMorlock 18 Dec 2020, 14:21 revolution wrote: Your segment register DS hasn't been initialised. I am assuming that has to do with segmented registers after spending a bunch of time looking into it, and now hate myself. It may be because I don't really know how to implement this but I just ended up with only 'X' for the output. I did get my code to do what I wanted after spending a bunch of time looking at tuts online here. I changed the 2nd line to Code: org 0x7c00    and the 2nd to last line to: Code: times 510-($-$$) db 0 I'm going back to the books to try and understand this a bit better. Thank you for trying to help me. If you can recommend any resources for learning about segmentation it would be awesome. It's not super easy to find. | |||
|  18 Dec 2020, 14:21 | 
 | 
| Mac2004 17 Jul 2021, 04:38 I took a quick look at your code. 
 Firstly you are not setting a stack pointer at all. Secondly you are not setting proper values for int 10h call. (https://en.wikipedia.org/wiki/INT_10H), which says' ... Teletype output AH=0Eh AL = Character, BH = Page Number, BL = Color (only in graphic mode) ...' The character needs to be in AL, which you are doing. BH register is not set by you and BH register is probably in a state where bios has left. Regards M2004 | |||
|  17 Jul 2021, 04:38 | 
 | 
| < Last Thread | Next Thread > | 
| Forum Rules: 
 | 
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.