Ok Clyde, first you need a pointer.
DIM PNTR AS UINTEGER PTR
PNTR = @BUFFER(LOCATION)
Where LOCATION is the location to start drawing.
The STOSD command is not strange, it just means "Store String"
You could have;
STOSB, STOSW, STOSD.
They all use different registers to grab the data from.
STOSB uses AL And stores a BYTE.
STOSW uses AX And stores a WORD.
STOSD uses EAX And stores a DOUBLE WORD.
What they all have in common is that they store the word, byte or double word they grab at the memory address it gets from the register EDI.
So... you could just have (to plot one pixel at 100 * 100 in white);
DIM PNTR AS UINTEGER PTR
PNTR = @BUFFER(100*(100*XRES))
CLR=&HFFFFFF
asm
MOV EAX,DWORD PTR[CLR]
MOV EDI, [PNTR]
STOSD
end asm
You can repeat the storestring in a kind of loop by preceeding the STOSB, STOSW, STOSD instruction with rep.
Rep looks in the register ECX to see how many times to repeat it (incrimenting the address it writes to each time). So to draw a 50 pixel long line in white at 100 * 100 do;
DIM PNTR AS UINTEGER PTR
PNTR = @BUFFER(100*(100*XRES))
CLR=&HFFFFFF
WIDTH = 50
asm
MOV EAX,DWORD PTR[CLR]
MOV EDI, [PNTR]
MOV ECX,WIDTH
REP STOSD
end asm
That's probably the method you should use tbh Clyde, I don't know of much that's faster.. For information rep stosb,rep stosw,rep stosd are all 2 bytes, and all 3 clock cycles + the count of bytes, words or dwords they have to move, or to put it simply the length of the line you want to draw.