Write a program in a boot loader running in real time. Try to deal with the graphics, namely 320х200 pixels, when working with sprites voznikaet twink, found that you need a second buffer did like everything right, and already 100 times were checked in emulyator, virtual reality works, and when run on hardware all the time, not only filled the screen in some color, if no fill, so a lot of weirdness.
org 7c00h use16 jmp start e: mov ax,cs mov ds,ax mov es,ax ret put_clear: mov ax,8000h mov ds,ax mov al,200 mov ah,al mov bx,0000h put_clear0: mov [bx],ax add bx,02h cmp bx,0FFFEh jz e jmp put_clear0 put_sprite: mov ax,8000h mov es,ax mov di,0 mov bx,sprite put_sprite0: mov al,[bx] cmp al,00h jz e stosb inc bx jmp put_sprite0 draw: mov ax,8000h mov ds,ax mov ax,0A000h mov es,ax mov bx,0000h mov di,0000h draw0: mov al,[bx] stosb cmp bx,0FFFFh jz e inc bx jmp draw0 start call e mov ax,0013h int 10h call put_clear ;; Fill in some color in the buffer call put_sprite ;; box sprite buffer call draw ;; display the buffer on screen mov ah,0 int 16h db 250 db 250 db 250 db 200 db 200 db 200 ;; so I checked the bug, made the distance between the code and the sprite :D sprite db 50,150,50,0
Code shortened as I could. To make it easier to understand that as a Yes but essentially still the same code, filling a buffer, a sprite buffer ( here very simplified ), and transfer buffer in А000:0000.
PS: Not very cool coder, ie not at all, just learning!