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.
Why do you use the register: 0x3D5 to calcuate your offset?
I have build a print function as well but I don't use 0x3D5 to get my offset, I just store an x and an y globally, and then I calculate the offset with this.
I assume you work in (80 * 25) so then to calculate the offset I use:
0x3D5 is for input too the screen,
I think I'm already know, 0x3D4 = 14 & 15 contains the cursor position but the register is 8 - 15 bits or something. I think, I need to shiftback too get on the right position.
But what I don't get is that the second IN contruction is ORed and that the Video-Memory contains offset multiplied by 2.
[offtopic]
Jeej!, eindelijk meer Nederlanders die zich bezighouden met OS development
btw, mijn msn is [email protected]
[/offtopic]
the bitshift-8, is that because the two registers holding the cursor but starts at bit 8 so it have to shiftback to 0?
Why does offset ored by in(0x3D5)?
The bitshift and the OR are the result of reading a word (2 byte) value one byte at a time in little endian format.
and why does offset multiplied with 2 and added by the video-pointer.
The video pointer points to the start of the video mem. Adding the calculated offset to it will make the result point to the cursor (somewhere half-way video memory). It has to be multiplied with 2, beceause each letter in the console is represented by 2 bytes, one for the letter and one for the color.
Trouwens nooit geweten dat Nederlanders zulke enthousiaste os bouwers waren!