flat assembler
Message board for the users of flat assembler.
Index
> DOS > Where the x-y is calculated to paint the pixel? |
Author |
|
freecrac 04 Jan 2014, 16:53
Hello.
I found some hidden instructions in this line. arcangel wrote:
..and some more in other lines. How to optimize? Code: lea si, [si+1] ; inc si Dirk |
|||
04 Jan 2014, 16:53 |
|
arcangel 04 Jan 2014, 17:28
freecrac wrote: Hello. Thank you so much I have searched the internet "video mode 13H" and is linear. It is an array that begins on the A000 direction And the position of the array with the calculated value of AX right? I think I get it |
|||
04 Jan 2014, 17:28 |
|
freecrac 04 Jan 2014, 17:59
arcangel wrote: Thank you so much Yes you are right. We do not need this DS-segment override prefix: Code: [ 71] 015F: 3E 88 1D mov ds:[di],bl ; moving our point to the memory Because DS is the default segment, if we are using DI, SI, or BX for to build an address-register. (Only for BP and SP the default segment is the stacksegment SS.) Segment override prefixe we only need, if we do not want to use the default segment. One byte schorter: Code: [ 71] 015F: 88 1D mov [di],bl ; moving our point to the memory Dirk |
|||
04 Jan 2014, 17:59 |
|
arcangel 04 Jan 2014, 20:16
Code: [ 71] 015F: 3E 88 1D mov ds:[di],bl ; moving our point to the memory First move to the value of bl at ds: [di] and then The pixel will be written in the array pociscion ds: [di] Right? Is it always like this? How interesting! Code: [ 38] 0115: 33 C0 xor ax,ax ;AX=0 [ 39] 0117: EE out dx,al ;let's write R to graphics port (R=0) [ 40] 0118: EE out dx,al ;let's write G to graphics port (G=0) [ 41] 0119: 8A C3 mov al,bl ;AL=BL [ 42] 011B: D0 E8 D0 E8 shr al,2 ;AL=AL/4 [ 43] 011F: EE out dx,al ;let's write B to graphics port (B=AL) The color of the pixel is RR + GG + BB, why do I have three statements out? Why there is not one with the three colors? Thank you so much |
|||
04 Jan 2014, 20:16 |
|
freecrac 06 Jan 2014, 08:36
arcangel wrote:
Yes and then the data are moving to screen with "rep movsb". Quote:
I think its because the blue part have to become other values and if we want to use "rep OUTSB" the values have to be stored in a ram location before. The io_port of the ramdac provide only a byte access. For the red, green and blue palette we can use values between 0 - 63. Dirk |
|||
06 Jan 2014, 08:36 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.