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.
I don't like the way your code works. You should have two separate functions: one for printing characters and one for printing characters at a certain position. Your clear screen functions is really really bad, the most unoptimized function ever. Tomorrow I am going to make a GitHub account and edit your repository a bit and help you with your OS + commentary included. Try printing that string without calling your clear screen function.
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
octacone wrote:I don't like the way your code works. You should have two separate functions: one for printing characters and one for printing characters at a certain position. Your clear screen functions is really really bad, the most unoptimized function ever. Tomorrow I am going to make a GitHub account and edit your repository a bit and help you with your OS + commentary included. Try printing that string without calling your clear screen function.
writechar is different than writestring:
Write char writes a character at the specified foreground, background, x position, y position.
Write string uses write char to write a string using the same technique as used in the Bare Bones tutorial. Both can print characters at a certain position, but one writes strings and another writes characters.
iansjack wrote:You never write to the top left of the screen (row 0, column 0), so what appears there ("S") is what was left over from the BIOS.
All the same, an improvement on your previous efforts.
Thank you.
I also moved the string to 40, 10 and it displayed fine but that S was still there.
I'll make a terminal_init that clears the screen and that S.
EDIT: It doesn't clear. Must be a problem in my putchar.
iansjack wrote:You never write to the top left of the screen (row 0, column 0), so what appears there ("S") is what was left over from the BIOS.
All the same, an improvement on your previous efforts.
Thank you.
I also moved the string to 40, 10 and it displayed fine but that S was still there.
I'll make a terminal_init that clears the screen and that S.
EDIT: It doesn't clear. Must be a problem in my putchar.
iansjack wrote:You never write to the top left of the screen (row 0, column 0), so what appears there ("S") is what was left over from the BIOS.
All the same, an improvement on your previous efforts.
Thank you.
I also moved the string to 40, 10 and it displayed fine but that S was still there.
I'll make a terminal_init that clears the screen and that S.
EDIT: It doesn't clear. Must be a problem in my putchar.
Push my pull request
Pushed it. I think i'm unpushing it (code is wrong, various things are undefined and many things are defined for no reason and then never used, and the types in 2 functions don't even exist.)