Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
iansjack wrote:'X' = 0x58, you get 0x18
'o' = 0x6F, you get 0x0F
Do you spot the pattern? You haven't set the number of data bits, so it looks like it has defaulted to 5 bits rather than 7 or 8.
Yeah, @f2 also mentioned it.
Reading the entire wiki can sometimes be useful.
The number of bits in a character is variable. Having fewer bits is, of course, faster, but they store less information. If you are only sending ASCII text, you probably only need 7 bits.
Set this value by writing to the two least significant bits of the Line Control Register [PORT + 3].
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
I see on the third line that you are sending the value 0x03 to portaddr and not to portaddr + 3, as you can see in the init_serial() function.
Can you change the line outb(portaddr,0x03) to outb(portaddr+3,0x03) and see if that fixes your problem?
EDIT: removed a comma, thanks octacone
Thanks a lot, I appreaciate that.
It's still same, but atleast fixed a bit.
iansjack wrote:'X' = 0x58, you get 0x18
'o' = 0x6F, you get 0x0F
Do you spot the pattern? You haven't set the number of data bits, so it looks like it has defaulted to 5 bits rather than 7 or 8.
As F2 spotted the problem, it was because I was writting it on wrong port. But it's still same. Althrough it's 00:19 there; I shall continue on osdeving for 10 -15 hrs.
iansjack wrote:'X' = 0x58, you get 0x18
'o' = 0x6F, you get 0x0F
Do you spot the pattern? You haven't set the number of data bits, so it looks like it has defaulted to 5 bits rather than 7 or 8.
As F2 spotted the problem, it was because I was writting it on wrong port. But it's still same. Althrough it's 00:19 there; I shall continue on osdeving for 10 -15 hrs.
I wanted to mention something, does COM0 even exist?
10-15 hours that is perfectly fine.
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
iansjack wrote:'X' = 0x58, you get 0x18
'o' = 0x6F, you get 0x0F
Do you spot the pattern? You haven't set the number of data bits, so it looks like it has defaulted to 5 bits rather than 7 or 8.
As F2 spotted the problem, it was because I was writting it on wrong port. But it's still same. Althrough it's 00:19 there; I shall continue on osdeving for 10 -15 hrs.
I wanted to mention something, does COM0 even exist?
10-15 hours that is perfectly fine.
Of course that COM0 exists, I said that my code can detect is there COM0 or not.
It won't output anything if it didn't exist, but the thing that it outputs is random.