x86 asm graphics settings for resolutions higher than 640x480?
assembly, bios, graphics, x86
Solution
For questions #1 and #3, look into the VESA BIOS Extensions. This was something of a standard for dealing with "Super VGA" modes, popular in the 90s.
As for #2, in general the answer is no, you can't MOV memory to memory. But it's not strictly true: there is MOVS (move string), which moves a byte, word, or dword from DS:SI to ES:DI. Usually this instruction is used in conjunction with a REP prefix to move blocks of memory. Also, assuming you have a stack set up, you can move memory-to-memory without clobbering a register by pushing and popping:
PUSH [mem1]
POP [mem2]
Problem
I've just started using assembly language (felt like learning something new), and have run into a few questions (so far) that all the tutorials I've been looking through don't answer, or are too old to know. 1) I've tried a few searches (maybe I just don't know the right keywords), but I can't find an updated list of graphics modes for changing screen resolutions, etc. The best I've found is: Assembler Tutorial, and I'd hardly think that 640x480 is the best resolution assembly language can use. Does anyone know of a more updated tutorial I can use? Edit: Interrupt 10h is old, and doesn't quite support more than 640x480 2) Is it possible to "mov" a value from a variable to another variable without moving it to a register first? Example: ``` jmp start n1 dw 0 n2 dw 0 res dw 0 start: mov n1,5 mov n2,6 mov res,n1 add res,n2 ...etc... ``` Edit: It is not possible. You cannot go from memory to memory without using registers. 3) Going with question 1, is there a way to detect what graphics mode a user is currently using, so that I can change it, and change it back after? (I assume there is, but am not sure how to do it.) Edit: Need to query OS for graphics settings.