home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
assemblr
/
library
/
asm_kit
/
testline.asm
< prev
next >
Wrap
Assembly Source File
|
1983-07-27
|
2KB
|
56 lines
PAGE,132
EXTRN DRAWLINE:FAR
; DAN ROLLINS (213) 246-5021
;
; TESTLINE---sample driver for DRAWLINE
;---------------------------------------------------------------
STACK SEGMENT PARA STACK 'STACK '
DB 64 DUP('STACK ')
STACK ENDS
;---------------------------------------------------------------
DATA SEGMENT PARA PUBLIC 'DATA'
PARMS DW 7 DUP (?)
;equates make it easier to program access to arguments
X1 EQU WORD PTR [SI]
Y1 EQU WORD PTR [SI+2]
X2 EQU WORD PTR [SI+4]
Y2 EQU WORD PTR [SI+6]
COLOR EQU WORD PTR [SI+8]
LEN EQU WORD PTR [SI+10]
SKIP EQU WORD PTR [SI+12]
DATA ENDS
;---------------------------------------------------------------
TESTSEG SEGMENT PARA PUBLIC 'CODE'
ASSUME CS:TESTSEG, DS:DATA
TESTLINE PROC FAR
PUSH DS ;save program prefix segment for exit
XOR AX,AX
PUSH AX ;word of 0000 for exit return address
MOV AH,0 ;set mode function
MOV AL,4 ;med-res graphics
INT 10H ;initialize graphics mode
MOV AX,DATA
MOV DS,AX ;set up data segment
MOV SI,OFFSET DS:PARMS ;point si to line parameter block
MOV COLOR,3 ;white
MOV X1,0 ;start is top left of screen
MOV Y1,0
MOV X2,319 ;end is bottom right
MOV Y2,199
MOV LEN,0 ;display entire line
MOV SKIP,0
CALL DRAWLINE
RET ;program exits to DOS (or DEBUG)
TESTLINE ENDP
TESTSEG ENDS
END TESTLINE