A few questions about the x86 language

I was just starting to use assembly language (I felt that I had learned something new), and I came across several questions (for now) that all the tutorials that I looked at are not responding or are too old to know.

1) I tried several searches (maybe I just don’t know the right keywords), but I can’t find an updated list of graphic modes for changing the screen resolution, etc. The best I've found is: Assembler Tutorial , and I’m unlikely to think that 640x480 is the best resolution assembly language. Does anyone know of a more updated tutorial that I can use?

Edit: Interrupt 10h is old and does not support more than 640x480

2) Is it possible to "move" a value from a variable to another variable without first transferring it to the register? 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: This is not possible. You cannot move from memory to memory without using registers.

3) Going with question 1, is there a way to determine which graphic mode the user is using so that I can change it and change it after? (I suppose there is, but I'm not sure how to do this.)

Edit: You need to request an OS for graphical settings.

+3
source share
4 answers

For questions # 1 and # 3, check out the VESA BIOS Extensions . It was a bit of a standard for working with the "Super VGA" modes, popular in the 90s.

β„– 2, , MOV. : MOVS ( ), , dword DS: SI ES: DI. REP . , , , :

PUSH [mem1]
POP  [mem2]
+4

, 10 , , 640x480. ; .. Windows, .

+2

, DirectX Windows. DirectX - API , DOS- VGA.

+2

10h - ( BIOS). / , . , "" 10h, .

DOS Windows, DOS. Windows , . VGA ( ), .. VGA- ( ). 16- Windows .

, , , . :

  • (, Windows Linux DOS )
  • .

If you are still interested in assembly language, I suggest you try writing a toy kernel. By doing this, you will learn a mountain of things.

Leave a comment if you want more information.

+1
source

Source: https://habr.com/ru/post/1717355/


All Articles