video memory addressing
-
- Posts: 8
- Joined: Wed Mar 02, 2011 11:41 pm
video memory addressing
Okay, just a quick question. How would you go about writing to an address like a000:013f? I've tried various things like a000:[013f] but none seem to work?
Re: video memory addressing
Firstly, what language are you trying to use?
Secondly, can you show us the code that isn't working?
Thirdly, what about it isn't working?
Secondly, can you show us the code that isn't working?
Thirdly, what about it isn't working?
Re: video memory addressing
question is how would i write? wtf. i would use for eg. mov/movs/stos, or a bios function.
this is address of a graphic mode of video controller. Have you set it go graphic mode? Maybe you dont see pixel. TRy reading it back.
Have you set cache to uc/wc/wt? if its wb it wont work well, and wp you wont read correct data but pixel wil lstill display correctly.
this is address of a graphic mode of video controller. Have you set it go graphic mode? Maybe you dont see pixel. TRy reading it back.
Have you set cache to uc/wc/wt? if its wb it wont work well, and wp you wont read correct data but pixel wil lstill display correctly.
Re: video memory addressing
That's a real mode address. I.e., the 0xa000 must be loaded to a segment register, and the actual access be offset by the 0x013f.wannabedeveloper wrote:How would you go about writing to an address like a000:013f?
Code: Select all
Mov BX, a000h
Mov ES, BX
Mov BX, 013fh
Mov AL, [ES:BX]
Last edited by Solar on Thu Mar 10, 2011 11:14 pm, edited 1 time in total.
Every good solution is obvious once you've found it.
Re: video memory addressing
Code: Select all
push 0a000h
pop es
mov byte ptr es:[13fh],whatever
Re: video memory addressing
It's not 'sector register' but a 'segment register'. Anyway, well done Solar.Solar wrote:That's a real mode address. I.e., the 0xa000 must be loaded to a sector register, and the actual access be offset by the 0x013f.wannabedeveloper wrote:How would you go about writing to an address like a000:013f?
Of course, things are different in protected mode.Code: Select all
Mov BX, a000h Mov ES, BX Mov BX, 013fh Mov AL, [ES:BX]
Programming is not about using a language to solve a problem, it's about using logic to find a solution !