I'm using emu8086 on Windows 10 with VGA mode and 8-bit fixed RGBA pixel format, learning the basics of graphics and ASM just for fun. I found a way to draw one pixel at a time as shown in the code below:
org 100h
mov ax, 13h
int 10h
mov ax, 40960
mov ds, ax
mov ax, 2Fh
mov bx, 0 ; will hold addr of pxl to paint in.
pntLnClr:
mov [bx],ax ; paint color in ax into pixel at bx.
inc bx
cmp bx, 40
JL pntLnClr
mov ah, 0
int 16h
ret
I want to write an ASM program that would paint multiple pixels at the same time instead of looping from pixel to pixel, making it look like a trail. I've been bouncing around SO and the rest of the Web trying to find a base code for accomplishing the objective but couldn't find anything. The accepted answer here seems like the closest thing to an answer, although it is unclear to me whether I actually need something like an extra segment and techniques like pushing and popping to access and write to multiple pixel addresses. Not only that, I tried the code from the answer, and the assembler told me that BITS is an illegal instruction and that the parameters in mov [es:di],dx
are wrong.
[EDIT:] This question is coming from the idea of satisfying the goal of creating a 2D game-like demo with low resolution, something as simple as a board where the sprites and the background are on the same flat layer.