1 ;-----------------------------------------------------------
\r
3 ; MXPP.ASM - Get/put pixel functions
\r
4 ; Copyright (c) 1993,1994 by Alessandro Scotti
\r
6 ;-----------------------------------------------------------
\r
13 MX_TEXT SEGMENT USE16 PARA PUBLIC 'CODE'
\r
14 ASSUME cs:MX_TEXT, ds:NOTHING, es:NOTHING
\r
16 EXTRN mx_BytesPerLine : WORD
\r
17 EXTRN mx_VideoSegment : WORD
\r
18 EXTRN mx_ClipX1 : WORD
\r
19 EXTRN mx_ClipY1 : WORD
\r
20 EXTRN mx_ClipX2 : WORD
\r
21 EXTRN mx_ClipY2 : WORD
\r
23 ;-----------------------------------------------------------
\r
28 ; X, Y = pixel coordinates
\r
51 mov al, 04h ; Set read plane
\r
52 mov ah, BYTE PTR [X]
\r
57 mov ds, [mx_VideoSegment]
\r
59 mul [mx_BytesPerLine]
\r
63 mov al, ds:[si] ; Get pixel value
\r
71 ;-----------------------------------------------------------
\r
73 ; Puts a pixel of the specified color.
\r
76 ; X, Y = pixel coordinates
\r
77 ; Color = pixel color
\r
99 mov ds, [mx_VideoSegment]
\r
100 mul [mx_BytesPerLine]
\r
104 mov cl, BYTE PTR [X] ; Set write plane
\r
111 mov al, [Color] ; Write pixel
\r