| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | Newsletters | VB Forums | Developer.com |
|
|||||||
| Assembly Questions and Answers for Assembly here! |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
programming an OS (Drawing to screen)
How may I draw on the screen?
This is what I got Code:
[bits 16] [ORG 0x7C00] ; sets up video mode to mode 13 mov ax, 0x0013 int 0x10 jmp main ; Just a loop to try and draw anything to screen main: mov [eax], bl inc bl inc eax cmp eax, 0x0000A000 + 0xC000 je .reset .back1 cmp bl, 0xFF je nebx jmp main .reset mov eax, 0x0000A000 jmp .back1 nebx: mov bl, 9 jmp main times 510 - ($-$$) db 0 dw 0xAA55
__________________
01101000011001010110110001101100011011110010000001110011011001010111100001111001 |
|
#2
|
|||
|
|||
|
Re: programming an OS (Drawing to screen)
[ Moved thread ]
__________________
Ciao, Andreas "Software is like sex, it's better when it's free." - Linus Torvalds Article(s): Allocators (STL) Function Objects (STL) |
|
#3
|
||||
|
||||
|
Re: programming an OS (Drawing to screen)
http://doorknobsoft.tripod.com/asm_tutorial.html
read that tutorial, it has a few chapters about graphics to the screen. wish i could tell you more, but i'm still reading it at the moment
__________________
http://www.white-scorpion.nl |
|
#4
|
||||
|
||||
|
Re: programming an OS (Drawing to screen)
What about 32bits addressing? As I read using 32bits there is no need for haveing a segment or an offset. Lets say we take a segment 0xA000 and offset of 0x0000. If I would address that in 32bits would it be '0xA000 0000'? Doing something similer doesn't work
mov eax, 0xA0000000 mov byte [eax], 0xFF but what's told on the site works. I don't understand why.
__________________
01101000011001010110110001101100011011110010000001110011011001010111100001111001 |
![]() |
| Bookmarks |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|