En cours

x86 assembly language task

I need help from assembly language coder .

Detail task below

1. write code to switch the display adapter into VGA mode 13h (320 x 200 x 256 colours).

You should then write a function that draws a line between any two points using a specified colour. Each point has an x and y coordinate.

The two points and the colour must be passed into the function as parameters via registers and your function MUST implement an x86 assembly language implementation of Bresenham’s line drawing algorithm.

To demonstrate that your function works, your submission should include code that demonstrates the use of this line drawing function to draw at least ten different lines from different starting and ending points.

[login to view URL] requirements for stage 2 are similar to stage 1, but the parameters to the function that draws a line must be passed on the stack rather than via registers.

The function should implement a correct stack frame and must remove the parameters from the stack before returning to the caller. In addition, the function must preserve the contents of any registers affected by the function and must not require any statically allocated data (i.e. it should not require any data allocated using db, dw, etc).

must include code that demonstrates the use of this line drawing function to draw at least ten different lines.

[login to view URL] of graphical applications, particularly games, soon realised that using the BIOS to plot each pixel had a severe impact on performance.

So they started to write directly to video memory rather than using the BIOS function to plot a pixel. For stage 3, you should use stage 2 as a starting point, but should replace the use of the BIOS function to plot a pixel with direct writes to video memory (you will still use the BIOS function to switch video modes). Video memory begins at memory address A0000h. In the video mode we are using, each pixel occupies one byte in memory (hence a maximum of 256 colours).

The actual memory address of a particular pixel can be calculated as: A0000h + (y * 320) + x Writing a byte to that memory location will set the pixel at (x, y) to the colour specified by the byte.

Remember that you are limited to accessing 64K segments in real-mode so the challenge for this stage is how to efficiently use the segment registers. writing directly to video memory, it is important that the error handling in your function ensures that the function does not attempt to plot a pixel outside the bounds of the screen.

Thanks.

Compétences : Assembly, Assembleur x86/x64, Architecture Logicielle, Programmation C, Programmation C++

en voir plus : x86 assembly language project calculator, can convert x86 assembly language, x86 assembly language design interfacing, x86 assembly language, assembly language x86, should i learn assembly language, pentester academy - x86 assembly language and shellcoding on linux download, x86 assembly language and shellcoding on linux download, pentester academy - x86 assembly language and shellcoding on linux, assembly language for x86 processors, what can i do with assembly language, assembly language for x86 processors programming exercises solutions, assembly language for x86 processors 7th edition, assembly language for x86 processors 7th edition answers, assembly language for x86 processors pearson, assembly language for x86 processors website, assembly language for x86 processors answers, assembly language for x86 processors 7th edition solution manual pdf, x86-64 assembly language programming with ubuntu, x86 assembly language debugging

Concernant l'employeur :
( 2 commentaires ) Phnom Penh, Cambodia

Nº du projet : #27878354