]> 4ch.mooo.com Git - 16.git/blobdiff - 16/xlib/xpoint.asm
wwww
[16.git] / 16 / xlib / xpoint.asm
index a2be8bfe5dcbc3b04a3c08e73af787d0f31e09b9..7b7dc910d9ab70d2c5ad9eaad41be603f8d523a1 100755 (executable)
@@ -33,21 +33,22 @@ include xpoint.inc
 ;\r
 ;\r
 \r
-_x_put_pix  proc    \r
-       ARG X:word,Y:word,PgOfs:word,Color:word\r
+_x_put_pix  proc\r
+       ;ARG X:word,Y:word,PgOfs:word,Color:word\r
        push bp                   ;preserve caller's stack frame\r
        mov  bp,sp                ;point to local stack frame\r
 \r
        mov  ax,[_ScrnLogicalByteWidth]\r
-       mul  [Y]                  ;offset of pixel's scan line in page\r
-       mov  bx,[X]\r
-       shr  bx,2                 ;X/4 = offset of pixel in scan line\r
+       mul  [BP+6]                  ;offset of pixel's scan line in page\r
+       mov  bx,[BP+4]\r
+       shr  bx,1                 ;X/4 = offset of pixel in scan line\r
+       shr  bx,1                 ;X/4 = offset of pixel in scan line\r
        add  bx,ax                ;offset of pixel in page\r
-       add  bx,[PgOfs]           ;offset of pixel in display memory\r
+       add  bx,[BP+8]           ;offset of pixel in display memory\r
        mov  ax,SCREEN_SEG\r
        mov  es,ax                ;point ES:BX to the pixel's address\r
 \r
-       mov  cl,byte ptr [X]\r
+       mov  cl,byte ptr [BP+4]\r
        and  cl,011b              ;CL = pixel's plane\r
        mov  ax,0100h + MAP_MASK  ;AL = index in SC of Map Mask reg\r
        shl  ah,cl                ;set only the bit for the pixel's\r
@@ -55,7 +56,7 @@ _x_put_pix  proc
        mov  dx,SC_INDEX          ;set the Map Mask to enable only the\r
        out  dx,ax                ; pixel's plane\r
 \r
-       mov  al,byte ptr [Color]\r
+       mov  al,byte ptr [BP+10]\r
        mov  es:[bx],al           ;draw the pixel in the desired color\r
 \r
        pop   bp                  ;restore caller's stack frame\r
@@ -73,21 +74,21 @@ _x_put_pix   endp
 \r
 \r
 _x_get_pix   proc\r
-       ARG x:word,y:word,PageBase:word\r
+       ;ARG x:word,y:word,PageBase:word\r
        push bp                   ;preserve caller's stack frame\r
        mov  bp,sp                ;point to local stack frame\r
 \r
        mov  ax,[_ScrnLogicalByteWidth]\r
-       mul  [Y]                  ;offset of pixel's scan line in page\r
-       mov  bx,[X]\r
+       mul  [bp+6]                  ;offset of pixel's scan line in page\r
+       mov  bx,[bp+4]\r
        shr  bx,1\r
        shr  bx,1                 ;X/4 = offset of pixel in scan line\r
        add  bx,ax                ;offset of pixel in page\r
-       add  bx,[PageBase]        ;offset of pixel in display memory\r
+       add  bx,[bp+8]        ;offset of pixel in display memory\r
        mov  ax,SCREEN_SEG\r
        mov  es,ax                ;point ES:BX to the pixel's address\r
 \r
-       mov  ah,byte ptr [X]\r
+       mov  ah,byte ptr [bp+4]\r
        and  ah,011b              ;AH = pixel's plane\r
        mov  al,READ_MAP          ;AL = index in GC of the Read Map reg\r
        mov  dx,GC_INDEX          ;set the Read Map to read the pixel's\r
@@ -100,8 +101,3 @@ _x_get_pix   proc
         ret\r
 _x_get_pix   endp\r
         end\r
-\r
-\r
-       end\r
-\r
-\1a
\ No newline at end of file