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 need a little bit of help, it deals with pixel plotting.
1. Why are there gaps? Do I need to make the colour attribute different? (I notice there are no gaps in some areas).
2. How can I draw to the full 640 by 480 pixels? I can't get past 1000-2000.
Is this 640x480x4 VGA mode or are you using VBE? If VBE, whats your exact mode? Also, how are you plotting the pixels to video memory? I suspect its VBE do to comment 2. If it is, look into changing bank switching (in the VBE manual) or using a LFB mode to solve the issue. Cant solve problem 1 without knowing your video mode and how you are writing to it.
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
Your mode number - 0x4F02 has bit 14 set which enables the mode for an LFB. You need to use int 0x10 VBE function 1 (return VBE mode info) and use PhysBasePtr member of the returned ModeInfoBlock structure. Use this pointer as video display - it may not be 0xa0000 do to it being a large LFB video mode. Information on this interrupt can be found online and in the VBE documentation.
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}