home *** CD-ROM | disk | FTP | other *** search
- ; CTOGR.ASM
- ;
- ; written by John Bridges
- ;
- ; Call GRASP functions from your 'C' programs
- ;
- ; after assembling and linking this routine with your 'C' program, you would
- ; execute GRASP commands by entering 'C' function calls like:
- ;
- ; grasp("video a\r");
- ; grasp("pload picture1,1\r");
- ; grasp("pfade 20,1\r");
- ;
- ;
- codeseg segment para public 'code'
- assume cs:codeseg
-
- extrn strlen:near
- public grasp
-
- grasp proc near ; grasp(string)
- push bp
- mov bp,sp
- mov ax,4[bp] ; pointer to string
- push ax
- call strlen ; standard C function to return length
- add sp,2
- mov cx,ax ; put length into CX
- mov dx,4[bp] ; get pointer into DX
- mov ax,ds
- mov es,ax ; set ES to data segment
- mov ah,'G' ; load function number
- int 10h ; execute it!
- pop bp
- ret
- grasp endp
-
- codeseg ends
- end
-