writing pixels to the screen 
Author Message
 writing pixels to the screen

Does the instruction  mov    es:[bx], al      (in tasm ? )

mean the same thing as mov [es:bx], al     ( in nasm?)       ?



Fri, 10 Oct 2003 02:40:06 GMT  
 writing pixels to the screen

Quote:

> Does the instruction  mov    es:[bx], al      (in tasm ? )

> mean the same thing as mov [es:bx], al     ( in nasm?)       ?

Yup.

;------------------
; nasm -f bin -o myprog.com myprog.asm

org 100h

segment .text
       ; switch to (lame but easy) graphics mode 13h
   mov ax, 13h
   int 10h
       ; video segment in es
   mov bx, 0A000h
   mov es, bx
       ; start around the middle
   mov bx,320 * 200 /2 - 168
   mov cx,10h ; 16 pixels ought to be enough
   mov al,75   ; 256 colors available
more:
   mov [es:bx],al
   inc bx
   loop more
       ; pause to admire our artwork
   mov ah,0
   int 16h
       ; back to text mode
   mov ax,3
   int 10h
       ; go bye-bye
   mov ah,4Ch
   int 21h
;-------------------

Best,
Frank



Fri, 10 Oct 2003 00:34:34 GMT  
 writing pixels to the screen

Quote:
> Does the instruction  mov    es:[bx], al      (in tasm ? )

> mean the same thing as mov [es:bx], al     ( in nasm?)       ?

Yes, I hope...


Fri, 10 Oct 2003 00:36:37 GMT  
 writing pixels to the screen
Yes.

Justin Dubs


Quote:
> Does the instruction  mov    es:[bx], al      (in tasm ? )

> mean the same thing as mov [es:bx], al     ( in nasm?)       ?



Fri, 10 Oct 2003 00:36:45 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Win32 ASM programming of Sound and Painting to screen Pixel by pixel

2. Win32 ASM programming of Sound and Painting to screen Pixel by pixel

3. Screen scrolling by pixel...

4. Programming 1 pixel on the screen! In 13h

5. colorpicker - select screen pixel color ?

6. bad screen distance "1 pixel" (fwd)

7. bad screen distance "1 pixel"

8. WASM and VGA pixel write

9. Write Pixel Dot?

10. Question about changing a pixel by directly writing to video memory

11. Writing a single pixel to the display

12. Writing a single pixel to the display

 

 
Powered by phpBB® Forum Software