home *** CD-ROM | disk | FTP | other *** search
- ;════════════════════════════════════════════════════════════════════════════╗
- ; SCRMODE() ║
- ; Paul V. Slabowski ║
- ; October 28, 1988 ║
- ; ║
- ; Set the video mode to 3 (EGA ONLY) ║
- ; ║
- ; ex: Scrmode() ║
- ; ║
- ;════════════════════════════════════════════════════════════════════════════╝
-
- PUBLIC SCRMODE ; Declare this function public
-
- EXTRN __PARINFO:FAR ; Declare far functions
- EXTRN __RET:FAR
-
- _SCRMD segment byte 'PROG'
- ASSUME cs:_SCRMD
-
- SCRMODE PROC FAR
-
- setup: push bp ; Save registers
- mov bp,sp ; ·
- push ds ; ·
- push es ; ·
- push si ; ·
- push di ; ·
-
- parnumb: mov ax, 0 ; Set up call for # of params
- push ax ; ·
- call __PARINFO ; Call Clipper function to get
- ; # of params into ax
- add sp, 2 ; restore stack
- cmp ax, 0 ; If # of parameters sent was,
- jne quit ; not 0, then quit here,
- ; otherwise...
-
- doscall: mov ah, 00h ; Load registers for DOS call
- mov al, 03h ; Set screen mode 3 function
- int 10h ; Call to BIOS:Video Drivers
-
- quit: pop di ; Restore registers
- pop si ; ·
- pop es ; ·
- pop ds ; ·
- pop bp ; ·
-
- clean: call __RET ; Call Clipper function for return
- ret ; Actual return
-
- SCRMODE ENDP ; End of process
-
- _SCRMD ENDS
- END
-
- ; eof setmode.asm