home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
QBasic & Borland Pascal & C
/
Delphi5.iso
/
C
/
Samples
/
C-ASM_VI.ARJ
/
PROGASM.ZIP
/
PROG082.ASM
< prev
next >
Wrap
Assembly Source File
|
1988-04-10
|
910b
|
23 lines
;************************************************************************
; Read value of the pixel at 100,50 and return value in AX *
; Use BIOS function READ PIXEL to get the value. *
;************************************************************************
X EQU [BP+4] ;Formal parameters on stack
Y EQU [BP+6]
PUBLIC _BIOS_Pixel_Read
_BIOS_Pixel_Read PROC NEAR
PUSH BP
MOV BP,SP
MOV CX,X ;Load pixel (column)
MOV DX,Y ;Load raster (row)
MOV AH,0DH ;Function = READ PIXEL
INT 10H ;Ask BIOS to read the pixel
XOR AH,AH ;Clear upper bits of AX (since value in
POP BP
RET
_BIOS_Pixel_Read ENDP