Assembly: video mode troubles | Sololearn: Learn to code for FREE!


Assembly: video mode troubles

in assembly i made a script that write a string without problems, but when i go into graphic mode with mov ah, 00h mov al, 13h int 10h, all the things on the screen disappears, how can i fix that? in graphic mode i tryied to draw a rectangle, the compiler says no error but the rect doesn't appear, how can i draw something? i tryied some examples but they doesn't work and i didn't find any guide what is the original video mode? i tryied to search on google and wikipedia but i cannot found anything

5/23/2018 7:04:35 PM


5 Answers

New Answer


I did some research. All points to 12h but the maximum you can set the palette to is 256 colours, which may still disagree with your display. You should maybe speak to your professor on this.


What hardware are you using? Your graphics adaptor probably doesn't support a resolution of 320x[240 | 200] you are trying to force upon it. When a mode is not compatible, the screen generally goes black.


You do realize that switching video modes clears the screen by default unless 80h is added to the video mode? You do understand that the Int 10h bios interface is a set of real mode software interrupts and you should be writing your OS in protected mode? As you are a beginner I would strongly discourage you from attempting to write an operating system. See for the reasons why.


Interrupt 10h function 13h is an old video bios call. How are you even getting this code to run? Support for 16-bit segmented memory model programs was dropped after Windows 7 and direct manipulation of the graphics card is not usually possible from user space programs on modern operating systems.


sorry i didnt explaine well, i use assembly for making OS, but i'm working with it only since march so i'm a beginner